aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-12-19 22:20:50 -0500
committerRalph Amissah <ralph@amissah.com>2011-12-19 22:52:14 -0500
commit9ef4a603a90b8d5363404fc23f4dc1b8f2aa0c4f (patch)
treed98463c020574cf3e4a974678f2e5dd45281e6c4
parentv3: options, --find & --glob, use for general search in base directory (diff)
v3: sysenv, html files in _sisu/home (*.html) copied as home pages
-rw-r--r--data/doc/sisu/CHANGELOG_v33
-rw-r--r--lib/sisu/v3/sysenv.rb12
2 files changed, 8 insertions, 7 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3
index 12b062cb..057ea338 100644
--- a/data/doc/sisu/CHANGELOG_v3
+++ b/data/doc/sisu/CHANGELOG_v3
@@ -21,6 +21,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.9.orig.tar.xz
sisu_3.1.9-1.dsc
sisu_3.1.9-1.debian.tar.gz
+ * manually created html files in _sisu/home (*.html) copied as home pages
+ (previous behavior was only to copy _sisu/home/index.html)
+
* options, behavior of --find & --glob, can only be used on base directory
level, (it is not possible to limit the glob to say en/... or fr/...), for
now prints a message that sub-directories may not be provided for --find or
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'