Installing reveal-skel
Reveal-skel is a forkable template for a presentation based on the Reveal.js HTML framework.
Travis-CI config
runs a Node.js project,
calling Grunt tasks to
build the presentation as a website and
deploy it on Github Pages via the gh-pages
branch.
- Fork the reveal-skel project
- Or in your own git repo, run
git remote add upstream https://github.com/sermons/reveal-skel
- Or in your own git repo, run
- Setup a Github token for Travis (see below)
- Edit package.json:
- Package name, git repo, CNAME
- Change
sample.md
toslides.md
- Generate a new multiplex ID (see below)
- Your slide content goes in slides/slides.md
- You may also want to customize:
- user name, email in package.json
pretty_url
defaults to the CNAME if it exists
- README, favicon
- user name, email in package.json
- Static assets (CSS, JS, images, etc) go in
static
- Grunt will copy this dir as-is to the root of the deployed site
- Connect Travis to your Github account, if you haven't already
- On Github, create an access token: Settings → Developer Settings → Personal access tokens → Generate new token
- Token description: e.g., "Travis push to gh-pages"
- Select scopes: check "repo"
- Press the Generate token button at the bottom
- Copy and save the token outside the repo:
echo "github_key=...MY_GITHUB_TOKEN..." > ~/.travis-key.conf
- Install the Travis gem
- See note in the travis-key script for details
- Run
./travis-key
to securely store the token in Travis: - Commit, push, and check the build log for errors
If you don't want Travis to have full write-access
to all your repos, you may want to create a
special user just for pushing to the gh-pages
branch. This is what I do:
- Create a new Github user (a 'bot')
- In the bot account, create an access token as above
- Save the token out-of-repo in
~/.travis-key.conf
- Save the token out-of-repo in
- In your main account, add the bot as a collaborator on your repo:
- "Settings" → "Collaborators & teams" → "Collaborators"
- Give the bot Write access so it can push
- Or: add the bot to an organization
- Prevent the bot from pushing to master:
- "Settings" → "Branches" → "Protected branches" → "master"
- Check "Protect this branch" and "Restrict who can push to this branch"
- Now the bot can only push to gh-pages
- Run the script
./travis-key
in each repo
Don't use the default multiplex socket ID in the template, or your presentation can be controlled by anyone with the corresponding secret key (which I've made public). You could get random slide changes.
If you want to setup your own remote control, you'll need a multiplex server. You may use mine (please let me know if you do), or just setup your own. on a VPS.
Get a token from the multiplex server, and
put the socket ID in your package.json
.
Run the master presentation by appending /?s=00SECRET00
to your URL
(replacing 00SECRET00
with your secret key).
- reveal-multiplex Socket.io server
- generator-reveal Yeoman script
- gist-reveal
- Reveal.js