---
layout: default
title: Setting up Jekyll on GitHub
math: "yes"
last_major_revision_date: 2014-04-15
license: "CC-BY"
tags: jekyll, github, linux
status: notes
---
There are already well-written guides for setting up Jekyll on GitHub Pages, and it would be pointless for me to add another.
This page is here mostly as a quick reference for myself.
See the references at the bottom for actual tutorials.
I think Jekyll is designed to run automatically on GitHub, as long as you are in your website repository (USERNAME.github.io
) or in the gh-pages
branch in any other repository.
The most important file is called \_config.yml
, and must be placed in the main directory.
If one is using GitHub pages on one’s website repository, it should look like:
```yaml
markdown: redcarpet
baseurl: ""
exclude: ['README.md']
```
For any other repository, the baseurl
must be modified:
`````yaml
markdown: redcarpet
baseurl: /REPONAME
exclude: ['README.md']
`````
This website itself is created using Jekyll and is hosted on GitHub, so looking at the [source](https://github.com/riceissa/riceissa.github.io) may be useful.
To generate the Jekyll site locally run:
``` bash
jekyll serve --watch --baseurl ""
```
# Typesetting math
See [here](http://cwoebker.com/posts/latex-math-magic), [here](http://doswa.com/2011/07/20/mathjax-in-markdown.html), and [here](http://rangerway.com/way/latex-note-and-jekyll/) ([Internet archive](https://web.archive.org/web/20150104014255/http://rangerway.com/way/latex-note-and-jekyll/), [archive.today](https://archive.today/qmBdX)) for more (they should be identical).
See [this page](http://stackoverflow.com/a/11093303/3422337) for the “big picture”.
The idea is that we want the Markdown processor to leave potential LaTeX code untouched so that MathJax can access it.
See [here](https://riceissa.github.io/math/math-test.html) for an extensive list of what works and what doesn’t.