diff --git a/README.md b/README.md index d8d9aa62..7f6c10b5 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,13 @@ are named `_Sidebar.ext` where the extension is one of the supported formats. Sidebars affect all pages in their directory and any subdirectories that do not have a sidebar file of their own. +## HEADER FILES + +Header files allow you to add a simple header to your wiki. Header files must +be named `_Header.ext` where the extension is one of the supported formats. +Like sidebars, headers affect all pages in their directory and any +subdirectories that do not have a header file of their own. + ## FOOTER FILES Footer files allow you to add a simple footer to your wiki. Footer files must @@ -113,7 +120,6 @@ be named `_Footer.ext` where the extension is one of the supported formats. Like sidebars, footers affect all pages in their directory and any subdirectories that do not have a footer file of their own. - ## HTML SANITIZATION For security and compatibility reasons Gollum wikis may not contain custom CSS diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 05db3563..01ab8d82 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -63,6 +63,7 @@ module Precious update_wiki_page(wiki, page, params[:content], commit, name, params[:format]) + update_wiki_page(wiki, page.header, params[:header], commit) if params[:header] update_wiki_page(wiki, page.footer, params[:footer], commit) if params[:footer] update_wiki_page(wiki, page.sidebar, params[:sidebar], commit) if params[:sidebar] committer.commit diff --git a/lib/gollum/frontend/templates/page.mustache b/lib/gollum/frontend/templates/page.mustache index 8d29fb4c..4400181b 100644 --- a/lib/gollum/frontend/templates/page.mustache +++ b/lib/gollum/frontend/templates/page.mustache @@ -20,6 +20,13 @@