Skip to content

Instantly share code, notes, and snippets.

@neelsmith
Created August 18, 2017 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neelsmith/474d3425cc3aa4febd8655ff8051c658 to your computer and use it in GitHub Desktop.
Save neelsmith/474d3425cc3aa4febd8655ff8051c658 to your computer and use it in GitHub Desktop.
Create reveal-js slide shows with pandoc
#!/bin/sh
#
# rjs.sh: use pandoc to write a reveal-js slide show.
#
# REQUIREMENTS
#
# A reveal.js template named "reveal.js" in same directory as markdown source.
# For the set up, see
# https://github.com/jgm/pandoc/wiki/Using-pandoc-to-produce-reveal.js-slides
#
# USAGE
#
# usage: rjs.sh SLIDES THEME
#
# SLIDES is the base name of a markdown source file assumed
# to end in .md.
# THEME is the name of a revealjs theme.
#
# The resulting html file is named SLIDES-THEME.html so you can
# easily experiment with multiple stylings of the same md source.
export PANDOC=`which pandoc`
if [ $# -eq 2 ]
then
$PANDOC -V theme=$2 -t revealjs -s -o $1-$2.html $1.md
else
echo "Usage: rjs.sh SLIDES THEME"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment