, , ,

Every now and then I need to publish my presentation on the Web and – of course – each time I have to figure it out. So here is my recipe:

  1. I prepare my presentation on the branch in forked reveal.js repo. For example: this is source code for my talk at 4Developers Conference.
  2. When I’m done, I create new repo with a meaningful name (the name will be part of the url) – mytalk is just an example:

    git init
    git remote add origin https://github.com/username/mytalk
    git checkout -b gh-pages
    git remote add reveal.js https://github.com/username/reveal.js
    git fetch reveal.js
    git merge --ff-only reveal.js/mytalk
    git push -u origin gh-pages
    After some time (needed by GitHub to process repo) my presentation will show up at: http://username.github.io/mytalk/

You can also set custom (sub)domain for GitHub Pages:

  1. Add CNAME record via your DNS provider pointing from mytalk.mydomain.com to username.github.io.
  2. Add CNAME file to your repo (on gh-pages branch) containing single line with your domain (mytalk.mydomain.com). See working example: https://github.com/orient-man/4Dev2015/blob/gh-pages/CNAME