An LFE/Exemplar Wrapper for Reveal.js
You always wanted to build your presetnations in LFE (Lisp Flavored Erlang), right? With HTML as S-Expressions?
We thought so.
Now's your chance.
This project assumes that you have the following already installed:
- lfetool (somwhere in your
- rebar (you can install rebar with
lfetool install rebar)
The remaining dependencies are installed for you automatically, downloaded
deps directory when you execute the appropriate
They are as follows:
- LFE (Lisp Flavored Erlang; needed only to compile)
- lfeunit (needed only to run the unit tests)
- Exemplar - HTML as S-Expressions
The following dependencies are bundled with lfe-reveal-js and are in the project repo:
To download the dependencies and compile them, do this:
$ git clone https://github.com/lfe/lfe-reveal-js.git $ cd lfe-reveal-js $ make compile
Assuming you'v already gotten the deps and compiled them, to view the demo you will need to do the follwoing:
$ make dev
Then visit localhost:5099 to run through the demo slide deck.
For those too lazy to clone and run this, we offer you the chance to bail with a youtube video of the demo (running on YAWS, of course): https://www.youtube.com/watch?v=jpMXn30iL-M.
Building Your Own
If you'd like to build your own slide deck with lfe-reveal-js, just clone
this repo, and start adding your slides in
Running the Deck
Just like the demo, all you need to do to check out your new masterpiece is:
$ make dev
And then visit localhost:5099.
As mentioned, lfe-reveal-js uses Exemplar, which defines macros for all of HTML5.
In addition to these, lfe-reveal-js defines a handful of convenience macros:
(deck ...)- For creating the slide deck itself.
(title-page ...)- For creating a cover page.
(chapter ...)- For creating a new chapter in your slide deck.
(slide ...)- For making a new slide in a chapter.
Take a look at the code for the demo slide deck to see example usage of
src/demo.lfe. For a full list of supported convenience macros,
be sure to read
Generating a Static File
By default, YAWS serves the slide deck dynamically -- regenerated on page load. Here's how you create a static HTML file from the REPL:
And here's a
make target so you can do this from the command line:
Generating a Release
If you would like to make a release (zip/tarball) for easy uploading/sharing,
simply run this
This project is inspired by another that I wrote in Clojure/ClojureScript using the Hoplon library. That project was:
A special thanks to the Hoplon crew for all their hard work and their help in getting me started on Hoplon and making contributions to that community.