Overview

This is a high level description of how reveal-ck creates a presentation. Greater detail is available in the relishapp documentation for reveal-ck.

Making Slides

Slide generation centers around running the command reveal-ck generate.

The generate process takes a file containing your slides and creates a presentation in a new directory named slides.

What happens during this process?

Everything starts with your slides file.

If you author slide content in Markdown, your slides file will be named slides.md. If you write in html it's slides.html. If you write in erb it will be slides.html.erb. The same pattern holds true for slides.haml, slides.textile, slides.slim, and slides.rb.

Regardless of authoring technology, you put your slide content into the slides files and run reveal-ck generate.

And then what happens?

  1. The file config.yml is scanned, if it exists. Values within inform the generation process.
  2. The reveal-ck gem contains a recent copy of reveal.js within it. This copy is unpacked into the slides/ directory.
  3. If you have supporting files in directories named images/, css/, js/, or media/, these files are copied into the slides/ directory.
  4. Your slides file is transformed into html and stored at slides/slides.html.
  5. Pieces of a reveal.js's index.html (which serves as the demo) are also stored within the reveal-ck gem. These pieces are merged together with the content in slides/slides.html. The result is a stored at slides/index.html.
  6. The body of slides/index.html is run through a series of filters. These filters provide support for emoji , @mentions , and auto-linking.

The Slides File

Your slide content lives in a single file known as the slides file.

You can supply configuration and styling. You can have distinct images and audio files. You can even include text from other files, but everything revolves around the slides file. It is the core of your content.

config.yml

This (optional) file contains configuration directives that impact the generated presentation.

It can provide:

  • theme and transition settings
  • reveal.js initialization options
  • configuration info for filters
  • shared data accessible at render time

See configuration details.

Supporting Files

reveal-ck allows you to reduce a presentation to a single file, but what if you want to include images? CSS? mp3s? reveal-ck expects that supporting files are placed into directories.

Any images included in the images directory will be copied into the presentation. This mean they can be referenced relatively: <img src="image/foo.png"/>.

If you include a CSS file in the css directory, it will be automatically included in the generated presentation and linked into the <head/> of the final index.html.

Files in the media directory will be copied into the presentation. For example, mp3s can be referenced by <audio/> tags.

Files in the templates directory aren't copied into the presentation, but, they can be referenced via the slide DSL method when working with a slides.rb. This only matters if you're working in Ruby.

Filters

The last step in the creation of your presentation involves running filters over your the html content in your presentation.

The html-pipeline framework is used to support filtering. :emoji: is replaced, links are auto-linked, and @mentions are transformed into github user URLs. Some of these filters are configurable.

Web Server

You can show your slides by opening the generated index.html in a browser. However, presentation mode will not work unless they are served up via http.

You can type reveal-ck serve and an http server will startup on port 10000 serving up the content of your slides directory.

Just browse to http://localhost:10000 .