Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Your ultimate haml to sexy-html-slides converter...

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 share
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 .yardopts
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 smooth.gemspec
Octocat-spinner-32 test.watchr


Smooth is a library, wrapped around the amazing haml-sass parser, to generate sexy html-slides from a haml file.

(README and documentation under heavy development)


1. Create a template.haml in your working directory for your slides:

- layout :default

  - about do
    -title    "My first Slides"
    -subtitle "Generated with Smooth"
    -author   "Your Name"

  - slides do
    -slide "Title of the first Slide" do
      %p This is something I wan't to say here
    -section "Syntax highlighting", :desc => "Follows on the next slide"
    -slide "Syntax highlighting" do
      %p we use the blackboard TextMate theme here
      ~ code :ruby, :blackboard  do
          class Slides
            def present
              "I present my slides, now!"

2. Call smooth build in the same directory

3. Watch the result of the File above

The helpers

Basically, it provides a bunch of useful and slide-related helpers and enhancements to haml.

Components mechanism

Smooth implements a component-helper, that generates dynamic methods in your template.

Example template: .my-template = header "my title", :subtitle => "something special" do %p content of the header

If the method header is not found in the render context, the component_resolver searches in configurable directories for component files. If such file is found ([gemdir]/share/components/header.haml or [your_project]/components/header.haml in this specific case) it is rendered.

The first argument is passed as an local variable called title, the block is accessible through yield.

The optional arguments hash creates variables identifyed by the key and set to the value. (Since these arguments are optional, they should only be used after checking their definition)

So, the header-component could look like this: .header %h1= title %h2= subtitle if defined? subtitle

  .content= yield

Note: Components are nestable.

Assets mechanism


How to use it?


  • Not a gem yet, so only direct usage of the repo possible
  • for executing bundle, this lib is required: apt-get install libonig-dev
  • then type bundle
  • you can use bin/smooth with relative path in your slide dir:
    • cd ../my_slides
    • ../smooth/bin/smiith build
Something went wrong with that request. Please try again.