diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index 21ee85624..12e47541a 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -98,6 +98,7 @@ def supported_useragent?(user_agent) forbid unless @allow_editing || request.request_method == "GET" Precious::App.set(:mustache, {:templates => settings.wiki_options[:template_dir]}) if settings.wiki_options[:template_dir] @base_url = url('/', false).chomp('/') + @page_dir = settings.wiki_options[:page_file_dir].to_s # above will detect base_path when it's used with map in a config.ru settings.wiki_options.merge!({ :base_path => @base_url }) @css = settings.wiki_options[:css] @@ -106,8 +107,7 @@ def supported_useragent?(user_agent) end get '/' do - page_dir = settings.wiki_options[:page_file_dir].to_s - redirect clean_url(::File.join(@base_url, page_dir, wiki_new.index_page)) + redirect clean_url(::File.join(@base_url, @page_dir, wiki_new.index_page)) end # path is set to name if path is nil. diff --git a/lib/gollum/templates/layout.mustache b/lib/gollum/templates/layout.mustache index 41ae03b53..3165df9b9 100644 --- a/lib/gollum/templates/layout.mustache +++ b/lib/gollum/templates/layout.mustache @@ -10,7 +10,7 @@ - {{#css}}{{/css}} + {{#css}}{{/css}} {{#noindex}}{{/noindex}}