final
This commit is contained in:
@@ -157,6 +157,7 @@ Gollum comes with the following command line options:
|
|||||||
| --template-dir | [PATH] | Specify custom mustache template directory. |
|
| --template-dir | [PATH] | Specify custom mustache template directory. |
|
||||||
| --help | none | Display the list of options on the command line. |
|
| --help | none | Display the list of options on the command line. |
|
||||||
| --version | none | Display the current version of Gollum. |
|
| --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:**
|
**Notes:**
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -151,7 +151,9 @@ MSG
|
|||||||
opts.on("--template-dir [PATH]", "Specify custom mustache template directory.") do |path|
|
opts.on("--template-dir [PATH]", "Specify custom mustache template directory.") do |path|
|
||||||
wiki_options[:template_dir] = path
|
wiki_options[:template_dir] = path
|
||||||
end
|
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 ""
|
||||||
opts.separator " Common:"
|
opts.separator " Common:"
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ module Precious
|
|||||||
@css = settings.wiki_options[:css]
|
@css = settings.wiki_options[:css]
|
||||||
@js = settings.wiki_options[:js]
|
@js = settings.wiki_options[:js]
|
||||||
@mathjax_config = settings.wiki_options[:mathjax_config]
|
@mathjax_config = settings.wiki_options[:mathjax_config]
|
||||||
|
@template_page=wiki_page("/_Template").page.raw_data if settings.wiki_options[:template_page]
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/' do
|
get '/' do
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ module Precious
|
|||||||
def default_markup
|
def default_markup
|
||||||
Precious::App.settings.default_markup
|
Precious::App.settings.default_markup
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#QND - sets default template page if specified
|
||||||
|
def content
|
||||||
|
@template_page
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user