Skip to content

Instantly share code, notes, and snippets.

@rinx
Last active December 23, 2015 02:39
Show Gist options
  • Save rinx/6568135 to your computer and use it in GitHub Desktop.
Save rinx/6568135 to your computer and use it in GitHub Desktop.
convert markdown to reveal.js via pandoc
#!/bin/sh
#
# convert markdown to reveal.js via pandoc
#
# this script requires...
# git, pandoc
#
# Usage...
# $ markdown2reveal -o output.html input.md
# (--variable theme="beige" --variable transition="linear" etc...)
#
# Also see this gist...
# https://gist.github.com/aaronwolen/5017084#file-slides-md
#
# The MIT License
# Copyright (c) 2013 Rintaro Okamura
#
if [ ! -f ./.reveal.js ]; then
git clone https://github.com/hakimel/reveal.js.git .reveal.js.tmp 2>&1 1>/dev/null
mv ./.reveal.js.tmp/css ./css
mv ./.reveal.js.tmp/js ./js
mv ./.reveal.js.tmp/lib ./lib
mv ./.reveal.js.tmp/plugin ./plugin
rm -rf ./.reveal.js.tmp
touch ./.reveal.js
fi
[ ! -d ./.pandoc_tmp ] && git clone https://gist.github.com/5017084.git .pandoc_tmp
pandoc --section-divs -t html5 -s --template ./.pandoc_tmp/template-revealjs.html $@
@rinx
Copy link
Author

rinx commented Sep 15, 2013

たぶんmarkdown以外にも使えるのでは

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment