Skip to content
Rob Simmons edited this page Aug 29, 2011 · 7 revisions

This repository consists primarily of the Wiki (see link above) for the C0 tutorial. It also contains some code used in the tutorial itself.

Tools for generating the wiki

We can build the wiki with the same tools that GitHub uses, more or less. Everything is either written in Python or Ruby, both of which have build systems with mostly reasonable defaults.

Git Repository

You need to have a git repository checkout of the wiki (wherever you see C0-Tutorial below, it's referring to the git repository directory).

To get a read-only copy, you can do this (NOTE: don't do the optional Gollum install below if you check out a read-only copy):

$ git clone git://github.com/frankpfenning/C0-Tutorial.wiki.git

If you want to enter your password a lot, you can do this:

$ git clone https://robsimmons@github.com/frankpfenning/C0-Tutorial.wiki.git

If you give GitHub your public key, you can do this:

$ git clone git@github.com:frankpfenning/C0-Tutorial.wiki.git

As long as you never edit files in this directory directly (only by using a separate repository and/or the GitHub web interface and/or the optional Gollum option), you only need to know two git commands.

Pull from GitHub:

$ git pull --rebase

Push to GitHub:

$ git push

Pygments

You'll want the specialized version of Pygments that supports C0 syntax.

First, get the source:

$ hg clone https://bitbucket.org/robsimmons/pygments-main
$ cd pygments-main
$ hg update c0

Then, install pygments from source

$ [sudo] python setup.py install

Gollum-site

Gollum-site is the tool that builds C0. There's nothing special to do here: the offical gollum-site is the one you want:

$ [sudo] gem install rdiscount
$ [sudo] gem install gollum-site

On OSX you'll probably also need to do sudo gem update --system. On Ubuntu this will be a pain: see this StackOverflow discussion for help, I think.

Now you can build the tutorial statically.

$ cd C0-Tutorial
$ gollum-site --base_path /path/to/static/wiki/ generate

Optional: Gollum

Once you can use gollum-site, gollum lets you do live editing. In order to get the right style, you'll want to download Rob's fork of gollum from https://github.com/robsimmons/gollum-c0

$ git clone git://github.com/robsimmons/gollum-c0.git
$ gem build gollum.gemspec
  Successfully built RubyGem
  Name: gollum
  Version: 1.3.1
  File: gollum-1.3.1.gem
$ [sudo] gem install gollum-1.3.1.gem

You may have to replace 1.3.1 with whatever version "gem build" reports.

Then, you can build and edit the tutorial from your web browser, locally:

$ cd C0-Tutorial
$ gollum

(Now go to http://localhost:4567/ in your web broswer to view and edit the site "live.")

Clone this wiki locally