cleaver
cleaver copied to clipboard
deploy to github pages
Would be nice if cleaver presentations could be easily deployed to GitHub pages.
A bit like generator-bespoke does with gulp deploy
.
Great idea - been playing around with the idea for a long time but was never sure how others did it. Thanks for the example!
I was thinking about creating jekyll-plugin that would convert any *.cleaver.md files into html files, so you could use that with github-pages.
One issue I ran in - need to do the actual work - for this will need to reimplement the transform step in ruby, probably.
I got this to work for my simple case like this:
- Write my entire presentation in a single slides.md file. Set the
output
file option to index.html. - Build html with
cleaver slides.md
. - Commit and push to github -- first to master, then to a branch called
gh-pages
. The branch name has to be gh-pages to be picked up by github! - After a few minutes the presentation should be live at username.github.io/repo-name.
For example, here's my presentation repo: https://github.com/danpaz/eb-talk. More info on github pages: https://pages.github.com/.
Thanks for the detailed steps @danpaz. My only concern is that I'd like gh-pages
to not have any .md
or anything, just the output. I'm not 100% sure how to generate the file, move it somewhere temporarily, then move it back after making an (orphaned) gh-pages
branch.
Maybe there's a node module to access /tmp
on any OS. I'll have to look into it.
If anyone has any insights on this let me know!
I use the same method as @danpaz documents. (https://github.com/mike-ward/talk-nancyfx). I don't even bother pushing to master. I just edit and push everything to gh-pages
. Works nicely.
@mike-ward ha, good point - I guess there's no real need to switch branches.
@jdan What do you think about adding a section to the README with the steps above? I'm happy to make a PR for that if you think it makes sense, and maybe later we can revisit deploying from the cli with one command.
I don't think it's too useful for the README - we should just automate it if possible.
Maybe the best solution to this would be to add steps on the README describing how to achieve it.
In general, it's pretty simple. output: index.html
and push to gh-pages
.
I generally delete the master branch and always use gh-pages
for presentation repos.
gh-pages
or buildbranch
are useful and easy to use locally