I've had this small project called Slidox laying around since August 2014. It was only yesterday when I noticed it and decided to spend few more hours to wrap it up and release it (backup the code on Github and Rubygems). Nothing fancy, just wiring up some simple Ruby tooling for converting Markdown to PDF with preference for syntax highlighting.
A while back I changed my blog to a new build process of markup processing and code syntax highlighting based on Github's preference to building HTML from Markdown. So, I thought why not use the same tools and build PDF from the HTML with wkhtmltopdf. Then, I have Slidox, an automated tool for building simple presentations and even small books.
Dependencies and installation
Slidox has few system dependencies like
wkhtmltopdf (which is actually installed as a gem, wkhtmltopdf-binary).
Start by installing the system dependencies first:
sudo apt-get install libicu-dev sudo apt-get install cmake
gem install slidox
Create new slidox project called
slidox new example
cd into the new directory with
cd example and you will see the project structure:
├── assets │ ├── elephants.jpg │ ├── jellybeans.css │ ├── line_numbers.css │ ├── main.css │ └── OpenSans-Light-webfont.ttf ├── config.yml └── slides ├── 1.md └── 2.md
assets directory contains basic styles to get you started.
slides dir is where you add the slides to build.
config.yml contains few configutation options for the PDF export from pdfkit and build targets for both HTML and PDF formats.
To build the project:
Then, Slidox creates new
build directory with HTML and PDF files inside. Here's the PDF preview: