Advanced Html Generation

reveal-ck supports creating slides in Html, but once you've mastered Html you may find this too limiting.

And so, reveal-ck supports creating slides using the following technologies:

Approach

First become comfortable with creating slides in Html, and then convert over your presentations to the templating language of your choice.

To do this, put your slides content into a file named:

And then run reveal-ck generate and it should "just work."

But..

Nothing "just works," and so when you encounter a problem remember the following:

The content you put into your slides files is transformed into Html and placed into the slides directory at slides/slides.html before it is spliced into the final slides/index.html file.

This means that you can troubleshoot what's being generated by looking at this intermediate file.

contents_of

Some languages allow you to invoke functions when generating Html.

reveal-ck provides one such "helper" function out of the box, and this function is named contents_of.

It allows you to "inline" an arbitrary file into your slides.

If this is interesting to you, you can read more in the relishapp documentation for contents_of.

data

If you'd like to keep your data separate from your slides files, you can place it in your config.yml.

For example, imagine your config.yml contained:

  
data:
  arbitrary_value: 42
  

And your slides where in a file named slides.html.erb, and contained:

  
<section>
  <h1>Slide <%= config.data['arbitrary_value'] %></h1>
</section>
  

Then you'd end up with a Slide 42.

This can be helpful if you're referring to the same information in several places, or if your the data (say, a URL) is more easily remembered with a simple config/data combination.