Skip to content

Instantly share code, notes, and snippets.

@hardywu
Created July 5, 2013 10:58
Show Gist options
  • Save hardywu/5933778 to your computer and use it in GitHub Desktop.
Save hardywu/5933778 to your computer and use it in GitHub Desktop.
config.ru script to set up a personal wiki on './public'
#!/usr/bin/env ruby
require 'rubygems'
require 'gollum/app'
# disable :run
# configure :development, :staging, :production do
# set :raise_errors, true
# set :show_exceptions, true
# set :dump_errors, true
# set :clean_trace, true
# end
gollum_path = File.expand_path(File.dirname(__FILE__)) + '/public/' # CHANGE THIS TO POINT TO YOUR OWN WIKI REPO
wiki_options = {}
wiki_options[:mathjax] = true
# wiki_options[:base_path] = gollum_path
wiki_options[:universal_toc] = false
Precious::App.set(:gollum_path, gollum_path)
Precious::App.set(:default_markup, :markdown) # set your favorite markup language
Precious::App.set(:wiki_options, wiki_options)
run Precious::App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment