Table of Contents TL;DR How to build presentation with Markdown, Reveal.js And Github Pages. We can export it as html presentation, ppt, Google Slides, pdf and other formats. Write Once, Share Anywhere. Why Build Presentation With Markdown, Reveal.js And Github Pages Why Markdown Focus on the content, easy to store/edit the content locally Great editor: Atom Easy to export to pdf, html, ppt(powerpoint or Google Slides), and other formats using one source markdown file. Why Reveal.js Works well with markdown, pandoc We can’t directly put the html slide generated Reveal.js into blogger: it shows nothing. We have to first publish the html slide online, then use iframe to refer it. Github Pages is Free. How Use Pandoc To Generate Html Slides We can use pandoc -t revealjs -s "${md}" -V revealjs-url=https://revealjs.com
to generate html slides. Usually we also want to change Reveal.js configuration: such as add custom css or use font-awesome, we can create one template html with __reveal_slides__
that can be replaced with the new slide content replace_reveal_slides.bash Publish it to Github Pages Share the Slide to blogger Use iframe to refer the html slides we can also generate html from the original markdown and append it in the post. Reveal.js Features slideout menu { src: ‘https://denehyg.github.io/reveal.js-menu/plugin/reveal.js-menu/menu.js’ } toolbar Reveal.js Shortcuts N , SPACE Next slide P Previous slide ← , H Navigate left → , L Navigate right ↑ , K Navigate up ↓ , J Navigate down Home , Shift ← First slide b black the screen End , Shift → Last slide B , . Pause F Fullscreen ESC, O Slide overview S Speaker notes view
"https?://jefferyyuan.github.io/*" f,F,?,O,o,b,B
Customize reveal.js Customize Reveal.initialize to add plugins, controls. Customize the css. Markdown Slides Different Syntax Pandoc Slides Syntax We can test it locally, no need to run web server or deploy it firstpandoc -t revealjs -s “${md}” -V revealjs-url=https://revealjs.com Pandoc Syntax Heading identifiers Use it to specify slide attributes {data-background-color=“#ff0000” data-transition=“slide-in fade-out”} Inserting pauses: a paragraph containing . . .
change theme: -V theme:Warsaw
global level: parallaxBackgroundImage: /path/to/my/background_image.png slide level: {data-background-image=“/path/to/special_image.jpg”} How to have content in the top slide in 2D reveal.js slideshows Slide show formats behavior change: content under headers less than slide level is no longer ignored, but included in the title slide (for HTML slide shows) or in a slide after the title slide (for beamer). This change makes possible 2D reveal.js slideshows with content in the top slide on each stack (#4317, #5237).
Must also run pandoc with --slide-level=2
::: incremental
:::
> -
<!-- Speaker notes -->
::: notes
:::
# Title {data-transition="fade" data-background="#A0C66B"}
[Hello, world!](http://example.com/){target="blank"}
Traps The title/author must be at the title meta data block.No content(including comment) before it There should no content at h1 title. Reveal.js External Markdown Syntax [Cons of Reveal.js External Markdown Approach] The problem with this approach is the extra separator “—” or “—-”More type and more error-prone It pollutes the output of raw html or pdf