diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-12-19 22:54:57 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-12-19 22:54:57 -0500 |
commit | 1ae0b08d1ad384f85e72fa40835ee68992aee150 (patch) | |
tree | 2f4866afef62016a34444d381a59ee44ed926634 /lib/sisu/v3/sysenv.rb | |
parent | debian/changelog (3.1.8-1) (diff) | |
parent | v3: html, seg output, index.html fixes (diff) |
Merge commit 'sisu_3.1.9' into debian/sid
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 98a58f72..436e1d7f 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -3740,7 +3740,7 @@ WOK def html_seg_index ft='.html' if @env.output_dir_structure.by_language_code? - 'toc' + ft + 'index' + ft else 'index' + @md.lang_code_insert + ft end @@ -5155,18 +5155,16 @@ WOK @vz_home=SiSU_Viz::Home.new end def homepage - homepage_path=nil + home_pages_manually_created=nil @env.sys.rc_path.each do |v| - if FileTest.file?("#{v}/home/index.html") - homepage_path="#{v}/home/index.html" + home_pages_manually_created=Dir.glob("#{v}/home/*.html") + if home_pages_manually_created.length > 0 break end end FileUtils::mkdir_p("#{@env.path.webserv}/#{@env.path.stub_pwd}") unless FileTest.directory?("#{@env.path.webserv}/#{@env.path.stub_pwd}") - if homepage_path \ - and FileTest.file?(homepage_path) - FileUtils::cp(homepage_path,"#{@env.path.webserv}/#{@env.path.stub_pwd}/index.html") - FileUtils::cp(homepage_path,"#{@env.path.webserv}/#{@env.path.stub_pwd}/toc.html") + if home_pages_manually_created + FileUtils.cp(home_pages_manually_created,"#{@env.path.webserv}/#{@env.path.stub_pwd}") else doc_skin=nil sk_doc='doc/skin_sisu.rb' |