From 9ef4a603a90b8d5363404fc23f4dc1b8f2aa0c4f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 19 Dec 2011 22:20:50 -0500 Subject: v3: sysenv, html files in _sisu/home (*.html) copied as home pages --- lib/sisu/v3/sysenv.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 98a58f72..e18a82c8 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -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' -- cgit v1.2.3