Skip to content
jedcn edited this page Sep 27, 2014 · 10 revisions

General

What if I run reveal-ck generate and it doesn't work?

Try creating a Gemfile that contains this:

source 'https://rubygems.org'
gem 'reveal-ck'

And then running a bundle followed by a bundle exec reveal-ck generate

There's been at least one problem where this has helped isolate libraries in use.

Is it possible to automatically run the reveal-ck generate command each time I change my slides file?

You can use guard and the guard-shell to accomplish this.

Start with a gem install guard-shell, and then create a Guardfile that contains this content:

guard :shell do
  watch(/^slides\.\S{2,7}$/) do |m|
    puts "Matched with '#{m}'"
    `reveal-ck generate`
  end
  watch(/^config\.yml$/) do |m|
    puts "Matched with '#{m}'"
    `reveal-ck generate`
  end
end

Then run guard in your project. Any changes to a file beginning with "slides" (slides.md, slides.haml, etc) or the central configuration will cause a generate command to run.

You'll then be able to just refresh your browser and see the new content.

Is it possible to automatically advance the slides?

Yes, reveal.js supports this with a configuration option.

reveal-ck allows you to supply reveal.js configuration options via the config.yml file.

Create a file named config.yml and add the following to it:

revealjs_config:
  autoSlide: 15000

This will create a presentation where each slide automatically advance 15 seconds.

You can add loop and set it to true if you want the slides to repeat after they reach the end:

revealjs_config:
  autoSlide: 15000
  loop: true

Markdown

Can I put HTML into my markdown?

Sort of.

You can put HTML above or below your markdown, but it can't intermingle. This is allowed in the definition of markdown as "inline html."

Here's an example if you had a file named slides.md:

# Introduction
---
## Thesis
* Point 1
* Point 2

<p class="fragment">
  Conclusion.. which was not initially visible
</p>

Haml

Can I put Markdown into my Haml?

Yeah, you can. This is achieved using the "Haml Markdown Filter."

Here's an example of putting markdown into a %section in a slides.haml:

%section
  :markdown
    ## Thesis
    * Point 1
    * Point 2
Clone this wiki locally