Make pages inherit their sidebar/header/footer from parent directories regardless of the current 'page_file_dir' of the wiki. refs #413 (https://github.com/github/gollum/issues/413)
This commit is contained in:
@@ -126,7 +126,7 @@ module Precious
|
||||
|
||||
redirect "/#{page.escaped_url_path}"
|
||||
end
|
||||
|
||||
|
||||
get '/create/*' do
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
@name = params[:splat].first
|
||||
@@ -136,7 +136,7 @@ module Precious
|
||||
mustache :create
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
post '/create' do
|
||||
name = params[:page]
|
||||
path = sanitize_empty_params(params[:path])
|
||||
@@ -294,9 +294,8 @@ module Precious
|
||||
def show_page_or_file(fullpath)
|
||||
path = extract_path(fullpath)
|
||||
name = extract_name(fullpath)
|
||||
# This breaks headers, footers, and sidebars.
|
||||
# wiki_options = settings.wiki_options.merge({ :page_file_dir => path })
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||
wiki_options = settings.wiki_options.merge({ :page_file_dir => path })
|
||||
wiki = Gollum::Wiki.new(settings.gollum_path, wiki_options)
|
||||
|
||||
if page = wiki.page(name)
|
||||
@page = page
|
||||
|
||||
Reference in New Issue
Block a user