Skip to content

Files

Latest commit

Dec 28, 2021
bd6ccfd · Dec 28, 2021

History

History
This branch is 7 commits behind pandoc/lua-filters:master.

revealjs-codeblock

revealjs-codeblock

This filter overwrites the code block HTML for revealjs output to enable the code presenting features of reveal.js. A custom template is required to include highlight.js (which comes with reveal.js as a plugin).

Features

The filter passes the code block attributes to reveal.js. This enables the following reveal.js features:

Usage

You have to include highlight.js in your own custom template or use the provided template.html. It has two additional variables:

  • highlightjs to opt in highlight.js (default to false)
  • highlightjs-theme to select a theme. Currently reveal.js comes with monokai (default) and zenburn.
$ pandoc sample.md -o sample.html -t revealjs -L revealjs-codeblock.lua \
  --template template.html -V highlightjs -V highlightjs-theme:zenburn

Example

See sample.md for a recreation of the code presentation demo.