-
Notifications
You must be signed in to change notification settings - Fork 32
Publishing Slides
The slides created by reveal-ck are static html.
Thankfully, static html is easily published and shared via Github Pages.
What follows is an introduction and general approach for publishing slides. If you'd prefer to see a working example, then you can jump to jedcn/publishing-reveal-ck-slides.
reveal-ck generates slides in the slides/
directory.
If you've added to images/
or css/
to support your presentation, these files are also copied into slides/images
or slides/css
.
The simple idea of "putting everything in slides/
" means that slides/
contains everything you need, and in turn this allows you to:
- zip up the contents of
slides/
and SFTP it to the server of your choice. - rsync the contents underneath
slides/
to the web server of your choice. - commit the content in
slides/
and then publish and share it via Github Pages.
If you're zipping or rsyncing, I presume you'll handle the details.
However-- if you're using Github Pages we can all follow a common approach.
And so, here's how I suggest you go forward:
- Track your main content (the
slides.md
, images, css) on themaster
branch. - Add
slides/
to your.gitignore
over onmaster
. - Create a
gh-pages
branch that's an "orphan" from yourmaster
branch - Clone
gh-pages
into yourslides/
directory - Generate slides as normal
If you do this, you'll commit changes to master
and you'll commit the generated slides to gh-pages
.
When you push gh-pages
up to origin, your slides will automatically be published.
- Use reveal-ck as you normally would to create slides.
- Start tracking these slides in git, but
.gitignore
theslides/
directory - Commit everything but the generated slides, create a repo for your talk, and push what you've got up to https://github.com.
- Let's imagine that your slides landed here: https://github.com/jedcn/publishing-reveal-ck-slides
Follow these directions provided by github for manually creating a gh-pages
branch. Pro Tip: cd /tmp
before you do the following.
I usually start these directions with cd /tmp
, meaning, I create a temporary clone on my local machine in the tmp directory. This lets me be sure that I won't impact my original slide presentation.
Once you've created a gh-pages
, then return to the original location where you cloned and built out your slides. Then..
- Add
slides
to your.gitignore
- Eliminate the generated
./slides
directory withrm -rf ./slides
- Clone the newly created
gh-pages
directory into./slides
by cloning a single branch, like so:git clone https://github.com/jedcn/publishing-reveal-ck-slides.git --branch gh-pages --single-branch ./slides
Now you've got the same repository cloned twice-- one version exists in the present working directory and a second, gh-pages
version, exists underneath ./slides
.
To publish changes (and make future changes):
- Regenerate your slides with
reveal-ck generate
- Change directory into
./slides
- Look at what's in
index.html
with your browser - Commit any changes and then push this branch back up to
gh-pages
, ala,git push origin gh-pages:gh-pages
- View what's at https://jedcn.github.io/publishing-reveal-ck-slides, and circulate this to your friends.
You're done!