Skip to content

Latest commit

 

History

History
78 lines (68 loc) · 4.04 KB

INSTALL.md

File metadata and controls

78 lines (68 loc) · 4.04 KB

Installing reveal-skel

Intro

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.

Usage

  • Fork the reveal-skel project
    • Or in your own git repo, run git remote add upstream https://github.com/sermons/reveal-skel
  • Setup a Github token for Travis (see below)
  • Edit package.json:
    • Package name, git repo, CNAME
    • Change sample.md to slides.md
    • Generate a new multiplex ID (see below)
  • Your slide content goes in slides/slides.md
  • You may also want to customize:
  • Static assets (CSS, JS, images, etc) go in static
    • Grunt will copy this dir as-is to the root of the deployed site

Github token for Travis

  • Connect Travis to your Github account, if you haven't already
  • On Github, create an access token: SettingsDeveloper SettingsPersonal access tokensGenerate 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
  • Run ./travis-key to securely store the token in Travis:
  • Commit, push, and check the build log for errors

Bot user for Travis deploy

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
  • In your main account, add the bot as a collaborator on your repo:
  • 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

Multiplex (remote-control)

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).

References