This document describes the steps required to enable Jekyll+Prose on a GitHub repository.
The commands included for some of the steps are for Linux (Ubuntu). If you are using Windows or Mac OS X, the commands may differ.
- The GitHub repository already exists.
- The GitHub repository is already cloned locally.
- Variables are identified using the following format:
[~variable name~].
- Install Ruby (Command:
sudo apt-get install ruby1.9.3). - Install the GitHub Jekyll environment (Command:
sudo gem install github-pages). - Install Travis (Command:
sudo gem install travis). - If you need to convert existing documents to Markdown, install pandoc (Command:
sudo apt-get install pandoc).
- Copy the files
.travis.ymlandbuild.shincluded in this Gist to the the root folder of your GitHub repository's local copy. - If the branch from which you build your gh-pages branch is any branch other than
master, replacemasterwith the name of your branch in thebranchessection of.travis.yml. - In
build.sh, replace[~GitHub user name~]with your GitHub user name and[~GitHub repository name~]with the name of the repository for which you want to enable Jekyll+Prose. - Make
build.shexecutable (Command:chmod +x build.sh). - On GitHub, go to Account Settings -> Applications.
- In the Personal Access Tokens section of the page, click on 'Create new token'.
- Give the new token a description (e.g.,
travis-push-[~name of the repository~]) and click 'Create token'. - Copy the token (Warning: If you do not copy the token now, you will not be able to view it again later. You will have to destroy the token and create a new one.).
- From the root folder of your GitHub repository's local copy, encrypt the token and the email address you use for GitHub to protect them (Command:
travis encrypt "GH_TOKEN=[~token you copied in the previous step~] GH_EMAIL=[~email you use for GitHub~]" --add global.env). - Add the Travis build status indicator to the
README.mdfile of your GitHub repository as described in http://about.travis-ci.org/docs/user/status-images/#Adding-Status-Images-to-README-Files. - Sign-in to Travis at http://travis-ci.org/.
- Click on your avatar/username at the top of the screen to go to your Profile page.
- In the Respositories tab, click on the Sync now button, then find the repository for which you want to enable Travis and turn Travis on.
- From the root directory of your GitHub repository's local copy, create a blank Jekyll site (Command:
jekyll new --force --blank .). - Copy the file
_config.ymlincluded in this Gist to the the root folder of your GitHub repository's local copy. - If the branch from which you build your gh-pages branch is any branch other than
master, replacemasterwith the name of your branch in the value of theprose_branchsection of_config.yml. - In
_config.yml, replace[~GitHub user name~]with your GitHub user name and[~GitHub repository name~]with the name of the repository for which you want to enable Jekyll+Prose. - Create one or more layout templates in the
_layoutfolder. - Create an include for the Prose edit link in the
_includesfolder (see the fileprose-edit-link.htmlincluded in this Gist for an example). - Add the line
editable: trueto the front matter of any document for which you want to enable Prose editing; add the lineeditable: falseto the front matter of any document for which you want to disable Prose editing. - Add a link to the file
CORS_check.jsincluded in this Gist at the end of the<body>of each of your layout templates to enable the fallback to the GitHub Web interface for browsers that do not support CORS, which is required by Prose.