This commit is contained in:
Daniele Grandini
2016-08-25 10:11:22 +02:00
parent d3cc5a69c4
commit a50fcd31e2
4 changed files with 10 additions and 1 deletions
+1
View File
@@ -157,6 +157,7 @@ Gollum comes with the following command line options:
| --template-dir | [PATH] | Specify custom mustache template directory. |
| --help | none | Display the list of options on the command line. |
| --version | none | Display the current version of Gollum. |
| --template-page | none | Tell Gollum to use /_Template as the default content for new pages. _Template must be git committed. |
**Notes:**
+3 -1
View File
@@ -151,7 +151,9 @@ MSG
opts.on("--template-dir [PATH]", "Specify custom mustache template directory.") do |path|
wiki_options[:template_dir] = path
end
opts.on("--template-page", "Use _Template in root as a template for new pages.") do
wiki_options[:template_page] = true
end
opts.separator ""
opts.separator " Common:"
+1
View File
@@ -104,6 +104,7 @@ module Precious
@css = settings.wiki_options[:css]
@js = settings.wiki_options[:js]
@mathjax_config = settings.wiki_options[:mathjax_config]
@template_page=wiki_page("/_Template").page.raw_data if settings.wiki_options[:template_page]
end
get '/' do
+5
View File
@@ -56,6 +56,11 @@ module Precious
def default_markup
Precious::App.settings.default_markup
end
#QND - sets default template page if specified
def content
@template_page
end
end
end
end