Home

Awesome

Workflow - Quick prototyping script for creating rich html and pdfs from markdown documents

Workflow is a small script for generating nice-looking web pages and pdf documents from markdown using a CSS switcher. This means that creating a webpage or pdf is simply a matter of writing some content in markdown and choosing a CSS template, which can drastically reduce the amount of time required to put documentation online.

Requirements

Usage

Given a plain markdown document, Workflow by default will create an html file with an embedded switcher, allowing you to cycle interactively through a list of CSS templates to see which one works best with your document. You can try this by cloning or downloading the project and running the following command on this readme file from within the project directory:

/.workflow.rb README.md

Once you have decided on a CSS template, just run workflow.rb again with the -s option to generate a permanent file with your chosen CSS included:

./workflow.rb -s siimple README.md

Use the -p option to create a PDF using your selected CSS template:

./workflow.rb -ps siimple README.md

You can view an online demo or download a pdf which is the result of running the above commands.

Code highlighting

Syntax highlighting for code blocks uses pygments-css via the Pygments CSS Stylesheets Previewer.

Use the -c option to turn on syntax highlighting.

./workflow.rb -cps siimple README.md

To use a different highlighting theme than the default, specify a Pygments CSS style using the -C option. For example, to use the Solarized Light theme:

./workflow.rb -cps siimple -C solarized-light README.md

To see all the available syntax highlighting themes, take a look at the online style switcher for Pygments CSS, with sample code in a variety of programming languages.

Options

Related projects

License

MIT.