Slideleech will extract sections of a Markdown file into new files that can be added to a reveal.js slideshow.
- Creates a full RevealJS presentation in your output directory. Read below for template customization.
- Delimit slides in you Markdown document with the opening
[item]: # (slide)
and closing[item]: # (/slide)
tags.
Review the CHANGELOG
Within a reveal.js slideshow, customizations can be performed via the index.html file. slideleech will automatically add your generated slides to the correct section using the following template markup. If you want to provide your own index.html
, just make sure you replace the pertinent part with the snippet below.
<div class="reveal">
<div class="slides">
{{range. -}}
<section data-markdown="{{.Content}}" data-background-color="#{{.Color}}"></section>
{{end}}
</div>
</div>
Currently, the project is hosted on Bitbucket. As a result, the standard go get
method won't work.
$ git clone ssh://git@bitbucket-eng-sjc1.cisco.com:7999/dll/slideleech.git
$ cd slideleech
$ go get gopkg.in/yaml.v2
$ go install
Create a .leech.yml
file:
---
input_file: ./README.md
output_directory: ./slides
output_filename: slide
reveal:
template:
template_color: FFFFFF
intro:
intro_title: Your Fancy Title
intro_author: John Doe / ACME, Inc. / @jdoe
intro_color: 049FD9
closing:
closing_message: Thank you!
closing_color: 049FD9
Key | Value | Required |
---|---|---|
input_file | The markdown file that you would like to generate slides from. | Yes |
output_directory | The directory name where to place the slides. | Yes |
output_filename | The string to use as the filename. (E.g., by entering slide as a value would produce slide.html, slide0.html, etc.) |
Yes |
reveal > template | An existing reveal template to use for slide generation. | No |
reveal > template_color | Background color for main slides. | Yes |
reveal > intro | Not used | No |
reveal > intro_title | The presentation title | Yes |
reveal > intro_author | The presentation author | Yes |
reveal > intro_color | Background color for intro slide | Yes |
reveal > closing | Not used | No |
reveal > closing_message | Closing slide message | Yes |
reveal > closing_color | Closing slide background color | Yes |
From within the directory that you are building your slides:
If you're starting from an existing Markdown file, insert the relevant sections in your Markdown file that are bracketed by the slideleech tags.
If you're starting a new project:
$ mkdir awesome-project
$ cd awesome-project
Create your Markdown file with the [item]: # (slide)
and [item]: # (/slide)
. See example for a brief example.
Start leeching!
$ slideleech
Author: asroach@cisco.com