Gem Version Build Status Dependency Status Code Climate Coverage Status

Slippery

The most flexible, customizable way to generate slides from Markdown.

How to use

Create a markdown file, say presentation.md, that will be the source of your presentation. use --- to separate slides.

In the same directory, create a Rakefile, here's a basic example :

task :build_presentation do
  doc = Slippery::Document.new(File.read('presentation.md'))
  presentation = Slippery::Presentation.new(doc, type: :reveal_js)
  File.write('presentation.html', presentation.to_html)
end

The presentation object responds to the Hexp DSL, so you can manipulate it before writing it out. In fact, Slippery contains several "processor objects" for common tasks.

Processors

These are defined in the Slippery::Processors namespace.

GraphvizDot

The "Dot" language is a DSL (domain specific language) for describing graphs. Using the GraphvizDot processor, you can turn "dot" fragments into inline SVG graphics.

In your presentation :

````dot
graph dependencies {
  node[shape=circle color=blue]
  edge[color=black penwidth=3]

  slippery[fontcolor=red];

  slippery -> hexp -> equalizer;
  slippery -> kramdown;
  hexp -> ice_nine;
}
````

In the Rakefile

task :build_presentation do
  include Slippery::Processors
  doc = Slippery::Document.new(File.read('presentation.md'))
  presentation = Slippery::Presentation.new(doc, type: :reveal_js)
    .process(GraphvizDot)

  File.write('presentation.html', presentation.to_html)
end

And the result:

dependencies

slippery slippery

hexp hexp

slippery->hexp

kramdown kramdown

slippery->kramdown

equalizer equalizer

hexp->equalizer

ice_nine ice_nine

hexp->ice_nine