Skip to content

Instantly share code, notes, and snippets.

@raziele
Created July 16, 2022 14:26
Show Gist options
  • Save raziele/a928a89b2ccf6299d2d6a0c4d44c1ec3 to your computer and use it in GitHub Desktop.
Save raziele/a928a89b2ccf6299d2d6a0c4d44c1ec3 to your computer and use it in GitHub Desktop.
Create a new reveal.js presentation
#!/bin/bash
PRESENTATION_NAME=${1:?"Give a name to the presentation"}
DESTINATION=${2:-$(pwd)}
echo $DESTINATION
FULLPATH=$DESTINATION/$PRESENTATION_NAME
git clone https://github.com/hakimel/reveal.js.git $FULLPATH && cd $FULLPATH
echo "## Slide 1" > $FULLPATH/${PRESENTATION_NAME}.md
mv index.html index.bak
sed '/Slide 1/d; s/>Slide 2/ data-markdown="'${PRESENTATION_NAME}'.md" \n data-separator="---" \n data-separator-notes="^Note:" \n data-charset="iso-8859-15"> \n/' index.bak > index.html
cd $FULLPATH && npm install && npm start
tmux split-pane vim $FULLPATH/${PRESENTATION_NAME}.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment