aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/manifest.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-20 20:44:22 -0400
committerRalph Amissah <ralph@amissah.com>2013-03-20 20:44:22 -0400
commitb2a1d9c6f06750cd0b2ccf7d069fe98381c2afb8 (patch)
tree8ba96a2079b8a513f73645070b3591d23204f8d2 /lib/sisu/v4/manifest.rb
parentv4: version & changelog (diff)
v4: manifest & harvest, links to default site home page index.html
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