<p>A framework for easily creating beautiful presentations using HTML. <ahref="http://lab.hakim.se/reveal-js/">Check out the live demo</a>.</p>
<p>reveal.js comes with a broad range of features including <ahref="https://github.com/hakimel/reveal.js#markup">nested slides</a>, <ahref="https://github.com/hakimel/reveal.js#markdown">markdown contents</a>, <ahref="https://github.com/hakimel/reveal.js#pdf-export">PDF export</a>, <ahref="https://github.com/hakimel/reveal.js#speaker-notes">speaker notes</a> and a <ahref="https://github.com/hakimel/reveal.js#api">JavaScript API</a>. It's best viewed in a browser with support for CSS 3D transforms but <ahref="https://github.com/hakimel/reveal.js/wiki/Browser-Support">fallbacks</a> are available to make sure your presentation can still be viewed elsewhere.</p>
<p>Slides are written using HTML or markdown but there's also an online editor for those of you who prefer a more traditional user interface. Give it a try at <ahref="http://www.rvl.io">www.rvl.io</a>.</p>
<p>Presentations are written using HTML or markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at <ahref="http://slid.es">http://slid.es</a>.</p>
<p>Markup heirarchy needs to be <code><div class="reveal"><div class="slides"><section></code> where the <code><section></code> represents one slide and can be repeated indefinitely. If you place multiple <code><section></code>'s inside of another <code><section></code> they will be shown as vertical slides. The first of the vertical slides is the "root" of the others (at the top), and it will be included in the horizontal sequence. For example:</p>
<p>Markup hierarchy needs to be <code><div class="reveal"><div class="slides"><section></code> where the <code><section></code> represents one slide and can be repeated indefinitely. If you place multiple <code><section></code>'s inside of another <code><section></code> they will be shown as vertical slides. The first of the vertical slides is the "root" of the others (at the top), and it will be included in the horizontal sequence. For example:</p>
<p>It's possible to write your slides using Markdown. To enable Markdown, add the <code>data-markdown</code> attribute to your <code><section></code> elements and wrap the contents in a <code><script type="text/template"></code> like the example below.</p>
<p>This is based on <ahref="https://gist.github.com/1343518">data-markdown</a> from <ahref="https://github.com/paulirish">Paul Irish</a>which in turn uses<ahref="https://github.com/coreyti/showdown/">showdown</a>. Sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks).</p>
<p>This is based on <ahref="https://gist.github.com/1343518">data-markdown</a> from <ahref="https://github.com/paulirish">Paul Irish</a>modified to use <ahref="https://github.com/chjj/marked">marked</a> to support<ahref="https://help.github.com/articles/github-flavored-markdown">Github Flavoured Markdown</a>. Sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks).</p>
<p>You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file.</p>
<p>At the end of your page you need to initialize reveal by running the following code. Note that all config values are optional and will default as specified below.</p>
@ -105,6 +115,9 @@
<spanclass="c1">// Enable keyboard shortcuts for navigation</span>
<p>All presentations have a normal size, that is the resolution at which they are authored. The framework will automatically scale presentations uniformly based on this size to ensure that everything fits on any given display or viewport. </p>
<p>See below for a list of configuration options related to sizing, including default values:</p>
<p>Reveal.js doesn't <em>rely</em> on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example:</p>
<p>All presentations have a normal size, that is the resolution at which they are authored. The framework will automatically scale presentations uniformly based on this size to ensure that everything fits on any given display or viewport.</p>
<p>See below for a list of configuration options related to sizing, including default values:</p>
<spanclass="mi">13</span><spanclass="o">:</span><spanclass="s1">'next'</span><spanclass="p">,</span><spanclass="c1">// go to the next slide when the ENTER key is pressed</span>
<spanclass="mi">27</span><spanclass="o">:</span><spanclass="kd">function</span><spanclass="p">()</span><spanclass="p">{},</span><spanclass="c1">// do something custom when ESC is pressed</span>
<spanclass="mi">32</span><spanclass="o">:</span><spanclass="kc">null</span><spanclass="c1">// don't do anything when SPACE is pressed (i.e. disable a reveal.js default binding)</span>
<p>If you set <code>data-state="somestate"</code> on a slide <code><section></code>, "somestate" will be applied as a class on the document element when that slide is opened. This allows you to apply broad style changes to the page based on the active slide.</p>
<p>Furthermore you can also listen to these changes in state via JavaScript:</p>
<p>An 'slidechanged' event is fired each time the slide is changed (regardless of state). The event object holds the index values of the current slide as well as a reference to the previous and current slide HTML nodes.</p>
<p>If you set <code>data-state="somestate"</code> on a slide <code><section></code>, "somestate" will be applied as a class on the document element when that slide is opened. This allows you to apply broad style changes to the page based on the active slide.</p>
<p>Furthermore you can also listen to these changes in state via JavaScript:</p>
<p>Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page background colors or images by applying a <code>data-background</code> attribute to your <code><section></code> elements. Below are a few examples.</p>
<spanclass="nt"><h2></span>This background image will be sized to 100px and repeated.<spanclass="nt"></h2></span>
<spanclass="nt"></section></span>
</pre></div>
<p>Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing <code>backgroundTransition: 'slide'</code> to the <code>Reveal.initialize()</code> call. Alternatively you can set <code>data-background-transition</code> on any section with a background to override that specific transition.</p>
<p>The global presentation transition is set using the <code>transition</code> config value. You can override the global transition for a specific slide by using the <code>data-transition</code> attribute:</p>
<p>It's easy to link between slides. The first example below targets the index of another slide whereas the second targets a slide with an ID attribute (<code><section id="some-slide"></code>):</p>
@ -282,9 +363,10 @@
<spanclass="nt"><a</span><spanclass="na">href=</span><spanclass="s">"#"</span><spanclass="na">class=</span><spanclass="s">"navigate-next"</span><spanclass="nt">></span><spanclass="c"><!-- Next vertical or horizontal slide --></span>
<p>Fragments are used to highlight individual elements on a slide. Every elmement with the class <code>fragment</code> will be stepped through before moving on to the next slide. Here's an example: <ahref="http://lab.hakim.se/reveal-js/#/16">http://lab.hakim.se/reveal-js/#/16</a></p>
<p>Fragments are used to highlight individual elements on a slide. Every element with the class <code>fragment</code> will be stepped through before moving on to the next slide. Here's an example: <ahref="http://lab.hakim.se/reveal-js/#/16">http://lab.hakim.se/reveal-js/#/16</a></p>
<p>The default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment:</p>
<p>By default, Reveal is configured with <ahref="http://softwaremaniacs.org/soft/highlight/en/">highlight.js</a> for code syntax highlighting. Below is an example with clojure code that will be syntax highlighted:</p>
<p>By default, Reveal is configured with <ahref="http://softwaremaniacs.org/soft/highlight/en/">highlight.js</a> for code syntax highlighting. Below is an example with clojure code that will be syntax highlighted. When the <code>data-trim</code> attribute is present surrounding whitespace is automatically removed.</p>
<p>Embedded HTML5 <code><video></code>/<code><audio></code> and YouTube iframes are automatically paused when your navigate away from a slide. This can be disabled by decorating your element with a <code>data-ignore</code> attribute.</p>
<p>Add <code>data-autoplay</code> to your media element if you want it to automatically start playing when the slide is shown:</p>
<p>Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use <ahref="http://google.com/chrome">Google Chrome</a>.
<p>Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use <ahref="http://google.com/chrome">Google Chrome</a>.
Here's an example of an exported presentation that's been uploaded to SlideShare: <ahref="http://www.slideshare.net/hakimel/revealjs-13872948">http://www.slideshare.net/hakimel/revealjs-13872948</a>.</p>
<ol>
@ -374,9 +471,29 @@ Here's an example of an exported presentation that's been uploaded to SlideShare
<p>The framework comes with a few different themes included:</p>
<ul>
<li>default: Gray background, white text, blue links</li>
<li>beige: Beige background, dark text, brown links</li>
<li>sky: Blue background, thin white text, blue links</li>
<li>night: Black background, thick white text, orange links</li>
<li>serif: Cappuccino background, gray text, brown links</li>
<li>simple: White background, black text, blue links</li>
</ul><p>Each theme is available as a separate stylesheet. To change theme you will need to replace <strong>default</strong> below with your desired theme name in index.html:</p>
<p>If you want to add a theme of your own see the instructions here: <ahref="https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md">/css/theme/README.md</a>.</p>
<p>reveal.js comes with a speaker notes plugin which can be used to present per-slide notes in a separate browser window. The notes window also gives you a preview of the next upcoming slide so it may be helpful even if you haven't written any notes. Append <code>?notes</code> to the presentation URL or press the 's' key on your keyboard to open the notes window.</p>
<p>reveal.js comes with a speaker notes plugin which can be used to present per-slide notes in a separate browser window. The notes window also gives you a preview of the next upcoming slide so it may be helpful even if you haven't written any notes. Press the 's' key on your keyboard to open the notes window.</p>
<p>By default notes are written using standard HTML, see below, but you can add a <code>data-markdown</code> attribute to the <code><aside></code> to write them using Markdown.</p>
@ -389,7 +506,8 @@ Here's an example of an exported presentation that's been uploaded to SlideShare
<spanclass="nt"></section></span>
</pre></div>
<h2>Server Side Speaker Notes</h2>
<h2>
<aname="server-side-speaker-notes"class="anchor"href="#server-side-speaker-notes"><spanclass="octicon octicon-link"></span></a>Server Side Speaker Notes</h2>
<p>In some cases it can be desirable to run notes on a separate device from the one you're presenting on. The Node.js-based notes plugin lets you do this using the same note definitions as its client side counterpart. Include the required scripts by adding the following dependencies:</p>
@ -412,59 +530,193 @@ Here's an example of an exported presentation that's been uploaded to SlideShare
<p>The multiplex plugin allows your audience to view the slides of the presentation you are controlling on their own phone, tablet or laptop. As the master presentation navigates the slides, all client presentations will update in real time. See a demo at <ahref="http://revealjs.jit.su">http://revealjs.jit.su/</a>.</p>
<p>The multiplex plugin needs the following 3 things to operate:</p>
<ol>
<li>Master presentation that has control</li>
<li>Client presentations that follow the master</li>
<li>Socket.io server to broadcast events from the master to the clients</li>
<p>The multiplex plugin allows your audience to view the slides on their own phone, tablet or laptop. As the master navigates the slides, all clients will update in real time. See a demo at <ahref="http://revealjs.jit.su">http://revealjs.jit.su/</a>.</p>
<p>Served from a static file server accessible (preferably) only to the presenter. This need only be on your (the presenter's) computer. (It's safer to run the master presentation from your own computer, so if the venue's Internet goes down it doesn't stop the show.) An example would be to execute the following commands in the directory of your master presentation: </p>
<p>Configuration is via the multiplex object in <code>Reveal.initialize</code>. To generate unique secret and token values, visit <ahref="revealjs.jit.su/token">revealjs.jit.su/token</a>. Below is an example configuration with the multiplex plugin enabled:</p>
<ol>
<li><code>npm install node-static</code></li>
<li><code>static</code></li>
</ol><p>If you want to use the speaker notes plugin with your master presentation then make sure you have the speaker notes plugin configured correctly along with the configuration shown below, then execute <code>node plugin/notes-server</code> in the directory of your master presentation. The configuration below will cause it to connect to the socket.io server as a master, as well as launch your speaker-notes/static-file server.</p>
<p>You can then access your master presentation at <code>http://localhost:1947</code></p>
<spanclass="c1">// Example values. Generate your own.</span>
<spanclass="nx">secret</span><spanclass="o">:</span><spanclass="s1">'13652805320794272084'</span><spanclass="p">,</span><spanclass="c1">// Obtained from the socket.io server. Gives this (the master) control of the presentation</span>
<spanclass="nx">id</span><spanclass="o">:</span><spanclass="s1">'1ea875674b17ca76'</span><spanclass="p">,</span><spanclass="c1">// Obtained from socket.io server</span>
<spanclass="nx">url</span><spanclass="o">:</span><spanclass="s1">'revealjs.jit.su:80'</span><spanclass="c1">// Location of socket.io server</span>
<spanclass="p">},</span>
<spanclass="c1">// Optional libraries used to extend on reveal.js</span>
<p><code>multiplex.secret</code> should only be configured on those pages you wish to be able to control slide navigation for all clients. Multi-master configurations work, but if you don't want your audience to be able to control your slides, set the secret to <code>null</code>. In this master/slave setup, you should create a publicly accessible page with secret set to <code>null</code>, and a protected page containing your secret.</p>
<p>You are very welcome to use the server running at reveal.jit.su, however availability and stability are not guaranteed. For anything mission critical I recommend you run your own server. It is simple to deploy to nodejitsu or run on your own environment.</p>
<p>Served from a publicly accessible static file server. Examples include: GitHub Pages, Amazon S3, Dreamhost, Akamai, etc. The more reliable, the better. Your audience can then access the client presentation via <code>http://example.com/path/to/presentation/client/index.html</code>, with the configuration below causing them to connect to the socket.io server as clients.</p>
<h2>Theming</h2>
<p>Example configuration:</p>
<p>The framework comes with a few different themes included:</p>
<li>default: Gray background, white text, blue links</li>
<li>beige: Beige background, dark text, brown links</li>
<li>sky: Blue background, thin white text, blue links</li>
<li>night: Black background, thick white text, orange links</li>
<li>serif: Cappuccino background, gray text, brown links</li>
<li>simple: White background, black text, blue links</li>
</ul><p>Each theme is available as a separate stylesheet. To change theme you will need to replace <strong>default</strong> below with your desired theme name in index.html:</p>
<spanclass="c1">// Example values. Generate your own.</span>
<spanclass="nx">secret</span><spanclass="o">:</span><spanclass="kc">null</span><spanclass="p">,</span><spanclass="c1">// null so the clients do not have control of the master presentation</span>
<spanclass="nx">id</span><spanclass="o">:</span><spanclass="s1">'1ea875674b17ca76'</span><spanclass="p">,</span><spanclass="c1">// id, obtained from socket.io server</span>
<spanclass="nx">url</span><spanclass="o">:</span><spanclass="s1">'revealjs.jit.su:80'</span><spanclass="c1">// Location of socket.io server</span>
<p>If you want to add a theme of your own see the instructions here: <ahref="https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md">/css/theme/README.md</a>.</p>
<p>Server that receives the slideChanged events from the master presentation and broadcasts them out to the connected client presentations. This needs to be publicly accessible. You can run your own socket.io server with the commands:</p>
<p>reveal.js is built using the task-based command line build tool <ahref="http://gruntjs.com">grunt.js</a> (<ahref="https://github.com/gruntjs/grunt#installing-grunt">installation instructions</a>). With Node.js and grunt.js installed, you need to start by running <code>npm install</code> in the reveal.js root. When the dependencies have been installed you should run <code>grunt watch</code> to start monitoring files for changes.</p>
<ol>
<li><code>npm install</code></li>
<li><code>node plugin/multiplex</code></li>
</ol><p>Or you use the socket.io server at <ahref="http://revealjs.jit.su">http://revealjs.jit.su</a>.</p>
<p>You'll need to generate a unique secret and token pair for your master and client presentations. To do so, visit <code>http://example.com/token</code>, where <code>http://example.com</code> is the location of your socket.io server. Or if you're going to use the socket.io server at <ahref="http://revealjs.jit.su">http://revealjs.jit.su</a>, visit <ahref="http://revealjs.jit.su/token">http://revealjs.jit.su/token</a>.</p>
<p>You are very welcome to point your presentations at the Socket.io server running at <ahref="http://revealjs.jit.su">http://revealjs.jit.su</a>, but availability and stability are not guaranteed. For anything mission critical I recommend you run your own server. It is simple to deploy to nodejitsu, heroku, your own environment, etc.</p>
<h5>
<aname="socketio-server-as-file-static-server"class="anchor"href="#socketio-server-as-file-static-server"><spanclass="octicon octicon-link"></span></a>socket.io server as file static server</h5>
<p>The socket.io server can play the role of static file server for your client presentation, as in the example at <ahref="http://revealjs.jit.su">http://revealjs.jit.su</a>. (Open <ahref="http://revealjs.jit.su">http://revealjs.jit.su</a> in two browsers. Navigate through the slides on one, and the other will update to match.) </p>
<spanclass="c1">// Example values. Generate your own.</span>
<spanclass="nx">secret</span><spanclass="o">:</span><spanclass="kc">null</span><spanclass="p">,</span><spanclass="c1">// null so the clients do not have control of the master presentation</span>
<spanclass="nx">id</span><spanclass="o">:</span><spanclass="s1">'1ea875674b17ca76'</span><spanclass="p">,</span><spanclass="c1">// id, obtained from socket.io server</span>
<spanclass="nx">url</span><spanclass="o">:</span><spanclass="s1">'example.com:80'</span><spanclass="c1">// Location of your socket.io server</span>
<spanclass="p">},</span>
<spanclass="c1">// Optional libraries used to extend on reveal.js</span>
<p>It can also play the role of static file server for your master presentation and client presentations at the same time (as long as you don't want to use speaker notes). (Open <ahref="http://revealjs.jit.su">http://revealjs.jit.su</a> in two browsers. Navigate through the slides on one, and the other will update to match. Navigate through the slides on the second, and the first will update to match.) This is probably not desirable, because you don't want your audience to mess with your slides while you're presenting. ;)</p>
<p>If you want to customise reveal.js without running grunt.js you can alter the HTML to point to the uncompressed source files (css/reveal.css & js/reveal.js).</p>
<spanclass="c1">// Example values. Generate your own.</span>
<spanclass="nx">secret</span><spanclass="o">:</span><spanclass="s1">'13652805320794272084'</span><spanclass="p">,</span><spanclass="c1">// Obtained from the socket.io server. Gives this (the master) control of the presentation</span>
<spanclass="nx">id</span><spanclass="o">:</span><spanclass="s1">'1ea875674b17ca76'</span><spanclass="p">,</span><spanclass="c1">// Obtained from socket.io server</span>
<spanclass="nx">url</span><spanclass="o">:</span><spanclass="s1">'example.com:80'</span><spanclass="c1">// Location of your socket.io server</span>
<spanclass="p">},</span>
<h3>Folder Structure</h3>
<spanclass="c1">// Optional libraries used to extend on reveal.js</span>
<p>The <strong>basic setup</strong> is for authoring presentations only. The <strong>full setup</strong> gives you access to all reveal.js features as well as the development tasks needed to make changes to the source.</p>
<p>The core of reveal.js is very easy to install. You'll simply need to download a copy of this repository and open the index.html file directly in your browser.</p>
<ol>
<li><p>Download the latest version of reveal.js from <ahref="https://github.com/hakimel/reveal.js/releases">https://github.com/hakimel/reveal.js/releases</a></p></li>
<li><p>Unzip and replace the example contents in index.html with your own</p></li>
<li><p>Open index.html in a browser to view it</p></li>
<p>Some reveal.js features, like external markdown, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.</p>