public
Description: A quick & dirty git-powered Sinatra wiki
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/sr/git-wiki.git
sr (author)
Fri Jun 06 10:06:34 -0700 2008
commit  735d262bb672f9828a2308efd5b9b90be82bf252
tree    8de6357a3a627a372b0dfa02225652aed6ec68f0
parent  e9e37d6665781f25d4143b83611cc76534bd242a
name age message
file .gitignore Thu Mar 27 16:36:33 -0700 2008 Ignore *.swp [sr]
file .gitmodules Fri Mar 28 12:15:48 -0700 2008 properly vendored haml and sinatra [sr]
file LICENSE Wed Feb 27 09:35:08 -0800 2008 Now has a proper license (WTFPL) [sr]
file README.markdown Sun May 04 04:33:29 -0700 2008 Fix markdown (looks like one of BlueCloth or Ma... [sr]
file Rakefile Sat Jun 07 13:22:47 -0700 2008 rakefile to easily install git-wiki [sr]
file git-wiki.d.in Fri Jun 06 10:14:47 -0700 2008 init script [sr]
file git-wiki.rb Sat Jun 07 13:22:52 -0700 2008 CamelCase constants [sr]
directory public/ Fri Mar 28 06:22:39 -0700 2008 Bind ctrl+h to homepage and ctrl+l to page list... [sr]
directory vendor/ Sun May 04 03:59:06 -0700 2008 update sinatra [sr]
README.markdown

git-wiki

git-wiki is a wiki that relies on git to keep pages' history and Sinatra to serve them. See git-wiki's homepage for more informations.

git-wiki relies on the fellowing gems:

  • git (the gem, as in gem install git)
  • BlueCloth
  • rubypants

Sinatra and HAML are vendored as git submodules. To get them, run the fellowing commands :

% cd git-wiki
% git submodule init
% git submodule update
# this step is needed because sinatra itself use git submodule
% cd vendor/sinatra
% git submodule init
% git submodule update

Note that git-wiki is released under the terms of the WTPL so really, you can do what the fuck you want with it.

Tip: run git-wiki as a daemon

  1. Install the gem daemons.

    % sudo gem install daemons

  2. Create a new service (don't forget to modify the path to git-wiki)

% sudo cat > /etc/init.d/git-wiki <<EOF
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
Daemons.run('/home/simon/src/git-wiki/git-wiki.rb',
     :dir_mode   => :system,
     :log_output => true,
     :mode       => :exec
)
EOF
  1. Install it as a boot service. On Ubuntu, run

    % sudo /usr/sbin/update-rc.d git-wiki defaults