diff --git a/README.md b/README.md index 0069260f..b4003127 100644 --- a/README.md +++ b/README.md @@ -532,6 +532,10 @@ Your Rack middleware can pass author details to Gollum in a Hash in the session ## WINDOWS FILENAME VALIDATION Note that filenames on windows must not contain any of the following characters `\ / : * ? " < > |`. See [this support article](http://support.microsoft.com/kb/177506) for details. +## CONFIG FILE + +Gollum optionaly takes a `--config file`. See [config.rb](https://github.com/github/gollum/blob/master/config.rb) for an example. + ## CONTRIBUTE If you'd like to hack on Gollum, start by forking my repo on GitHub: diff --git a/config.rb b/config.rb new file mode 100644 index 00000000..3f28df94 --- /dev/null +++ b/config.rb @@ -0,0 +1,28 @@ +# Example gollum config +# gollum ../wiki --config config.rb +# +# or run from source with +# +# bundle exec bin/gollum ../wiki/ --config config.rb + +# Remove const to avoid +# warning: already initialized constant FORMAT_NAMES +# +# only remove if it's defined. +# constant Gollum::Page::FORMAT_NAMES not defined (NameError) +Gollum::Page.send :remove_const, :FORMAT_NAMES if defined? Gollum::Page::FORMAT_NAMES +# limit to one format +Gollum::Page::FORMAT_NAMES = { :markdown => "Markdown" } + +=begin +Valid formats are: +{ :markdown => "Markdown", + :textile => "Textile", + :rdoc => "RDoc", + :org => "Org-mode", + :creole => "Creole", + :rest => "reStructuredText", + :asciidoc => "AsciiDoc", + :mediawiki => "MediaWiki", + :pod => "Pod" } +=end