layout: doc title: Contributing Documentation

Compojure's documentation is hosted by GitHub Pages, and stored in the gh-pages branch of the Compojure repository.

To begin contributing, fork Compojure on GitHub, and then clone a local copy of your fork using Git: \

git clone git@github.com:your-account/compojure.git
cd compojure

Once you have the repository, you'll need to create a tracking branch for the remote gh-pages branch:

git branch --track gh-pages origin/gh-pages
git checkout gh-pages

Now you're ready to begin writing documentation! The documentation is stored in the docs directory, and by convention written in Markdown format, with Jekyll providing extensions such as syntax highlighting.

The docs/getting-started.md file is a good example of the documentation format Compojure uses. Try to make your documentation file readable, and each line within 80 characters in width. If you are adding a new file, remember to add the link to the index.html file.

To see how your Markdown files will look as HTML, you'll need to download and install Jekyll:

sudo gem install jekyll

You can then run Jekyll in server mode in the root directory of your Compojure repository:

jekyll --pygments --auto --server

This will start a web server that you can access at http://localhost:4000. It will automatically update the HTML whenever you make changes to your file. Just hit the refresh button on your browser.

Once you are happy with your changes, commit and push:

git commit -am "Added documentation on sessions"
git push

And then ask me to merge your changes, either by sending me a pull request via GitHub, or just emailing me.