aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/manifest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v4/manifest.rb')
-rw-r--r--lib/sisu/v4/manifest.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb
index 1f5724c5..403271b5 100644
--- a/lib/sisu/v4/manifest.rb
+++ b/lib/sisu/v4/manifest.rb
@@ -833,14 +833,22 @@ WOK
elsif @f.output_dir_structure.by_language_code? \
or @f.output_dir_structure.by_filetype?
pth_local=@f.output_path.manifest.dir
- pth_rel='./'
+ pth_rel='.'
else
pth_local=@f.output_path.base.dir
- pth_rel='../'
+ pth_rel='..'
+ end
+ pth_rel_home=if @env.output_dir_structure.by? == :language
+ '../..'
+ elsif @env.output_dir_structure.by? == :filetype
+ '..'
+ elsif @env.output_dir_structure.by? == :filename
+ '..'
+ else '..'
end
harvest=(FileTest.file?("#{pth_local}/authors#{@fn_lng}.html") \
&& FileTest.file?("#{pth_local}/topics#{@fn_lng}.html")) \
- ? %{<p class="small">other document manifests: [<a href="#{pth_rel}authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}topics#{@fn_lng}.html">topics</a>]</p>}
+ ? %{<p class="small"><a href="#{pth_rel_home}/index.html">.:</a> other document manifests: [<a href="#{pth_rel}/authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}/topics#{@fn_lng}.html">topics</a>]</p>}
: ''
manifest_title=%{<p class="bold">#{@translate.manifest_description}</p>#{harvest}}
@manifest[:html] <<<<WOK