aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/sysenv.rb12
1 files changed, 5 insertions, 7 deletions
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'