Using from the Command Line

Commands are generally of the form:


The simple invocation below reads input from, parses it, and writes the resulting RevealJS slideshow to presentation.yaml.

premark -o presentation.html

SLIDE_SOURCE can be the name of a single markdown file (formatted as slides, as RevealJS expects) or the name of a folder with multiple such files inside along with a sections.yaml file.

Available options are below:




Show the version and exit.

-v, --verbose

Output debugging info.

-t, --title TEXT

HTML title of the presentation.

-o, --output-file FILENAME

Write the output to a file instead of STDOUT.

-m, --metafile TEXT

File definition for the order of section stitching. Only needed if using a sections folder.

-c, --css-file PATH

Custom CSS to be included inline.

--html-template PATH

Jinja2 template file for the presentation.


Show this message and exit.

Usage Examples

Breaking Markdown into Sections

Premark can combine multiple markdown files containing slide definitions into a single final presentation. Simply put all the markdown files in a single folder (say, slide_sections) along with a sections.yaml file like the below:

- file:
- file:
- file:

Then, when invoked with the below command, Premark will search that slide_sections directory for,, and, merging them and producing a single presentation from the result.

premark -o presentation.html slide_sections

Premark can even add title slides to each section. Simply provide a title key in the section metadata file:

- file:
- file:
  title: Agenda
- file:
  title: Final Thoughts

Sections without a title key will not have a title slide added and aren’t counted when numbering the sections.

Custom CSS or HTML

Premark allows you to specify your own CSS or HTML template to be used in the final presentation, through the --css-file and --html-template options.

premark -o presentation.html --css-file styles.css
premark -o presentation.html --html-template template.html