Demo: https://frutiger.github.io/arctor-demo.
A Jekyll theme for documentation that uses a solarized light colour palette and scrollNav.js to automatically generate a table of contents.
Create a new repository, write some beautiful markdown/ReStructuredText/etc,
put it all in docs
(or whichever branch you keep your documentation in).
For this example, we will use https://github.com/frutiger/arctor-demo as our
demo repo.
Add this repository as a remote and pull its contents:
$ git remote add arctor https://github.com/frutiger/arctor.git
$ git fetch arctor
Merge your documentation and the theme's contents into your gh-pages
branch:
$ git checkout gh-pages
$ git merge docs
$ git merge arctor/theme -m "merge theme content"
Push your gh-pages
branch:
$ git push origin gh-pages:gh-pages
You should now have human-readable plain-text generating beautiful pages at your GitHub Pages site.
If you make changes in your master
branch, to update your site, merge the
changes into your gh-pages
branch and re-push:
$ git checkout gh-pages
$ git merge docs
$ git push origin gh-pages:gh-pages
If changes are made to the arctor
theme, and you want to pull them in, fetch
those changes, merge them, and re-push:
$ git fetch arctor
$ git checkout gh-pages
$ git merge arctor/theme -m "merge theme content"
$ git push origin gh-pages:gh-pages
I personally don't care about keeping history in the gh-pages
branch, since
all the interesting history is in my docs
branch. So I run this
(warning: do this only if you know each command does!):
$ git checkout --detach docs
$ git merge --no-ff arctor/theme -m "merge theme content"
$ git push -f origin HEAD:refs/heads/gh-pages
$ git checkout -
Sections are generated from h1
and h2
elements while subsections are
generated from h3
elements. Any Jekyll
post that matches the 'default'
layout will have the appropriate styles applied to it.