diff --git a/README.md b/README.md index 86a89943..28dcbcb6 100644 --- a/README.md +++ b/README.md @@ -105,13 +105,14 @@ Options: --js Inject custom js. Uses custom.js from root repository --template-dir [PATH] Specify custom template directory --page-file-dir [PATH] Specify the sub directory for all page files (default: repository root). - --base-path [PATH] Specify the base path. - --gollum-path [PATH] Specify the gollum path. + --base-path [PATH] Specify the base path for the served pages (default: /) Example: --base-path wiki yields the home page accessible at http://localhost:4567/wiki/. + --gollum-path [PATH] Specify the path to the git repository to be served. --ref [REF] Specify the repository ref to use (default: master). --no-live-preview Disables livepreview. --live-preview Enables livepreview. --allow-uploads [MODE] Allows file uploads. Modes: dir (default, store all uploads in the same directory), page (store each upload at the same location as the page). - --mathjax Enables mathjax. + --mathjax Enables mathjax for rendering mathematical equations. Uses the TeX-AMS-MML_HTMLorMML config with the autoload-all extension by default. + --mathjax-config [SOURCE] Inject custom mathjax config. Uses mathjax.config.js from root repository by default --user-icons [SOURCE] Set the history user icons. Valid values: gravatar, identicon, none. Default: none. --show-all Shows all files in file view. By default only valid pages are shown. --collapse-tree Collapse file view tree. By default, expanded tree is shown. diff --git a/bin/gollum b/bin/gollum index 3a4908e2..d85a8cf8 100755 --- a/bin/gollum +++ b/bin/gollum @@ -64,11 +64,11 @@ opts = OptionParser.new do |opts| wiki_options[:page_file_dir] = path end - opts.on("--base-path [PATH]", "Specify the base path.") do |path| + opts.on("--base-path [PATH]", "Specify the base path for the served pages (default: /) Example: --base-path wiki yields the home page accessible at http://localhost:4567/wiki/.") do |path| wiki_options[:base_path] = path end - opts.on("--gollum-path [PATH]", "Specify the gollum path.") do |path| + opts.on("--gollum-path [PATH]", "Specify the path to the git repository to be served.") do |path| wiki_options[:gollum_path] = path end @@ -89,10 +89,14 @@ opts = OptionParser.new do |opts| wiki_options[:per_page_uploads] = true if mode == :page end - opts.on("--mathjax", "Enables mathjax.") do + opts.on("--mathjax", "Enables mathjax for rendering mathematical equations. Uses the TeX-AMS-MML_HTMLorMML config with the autoload-all extension by default.") do wiki_options[:mathjax] = true end + opts.on("--mathjax-config [SOURCE]", "Inject custom mathjax config file. Uses mathjax.config.js from root repository by default") do |source| + wiki_options[:mathjax_config] = source || 'mathjax.config.js' + end + opts.on("--user-icons [SOURCE]", "Set the history user icons. Valid values: gravatar, identicon, none. Default: none.") do |source| wiki_options[:user_icons] = source end @@ -211,4 +215,4 @@ else # Rack::Handler does not work with Ctrl + C. Use Rack::Server instead. Rack::Server.new(:app => MapGollum.new(base_path), :Port => options['port'], :Host => options['bind']).start end -end \ No newline at end of file +end