Search code examples
markdownreveal.js

How to configure markdown with reveal.js?


I want to use reveal.js with markdown. I followed the full set up installation guide

  1. install node.js
  2. Clone the reveal.js repository
  3. Move to the reveal.js folder and install dependencies
  4. run npm start inside reveal.js folder

and then I have modified the index.html page to add markdown following the documentation

<section data-markdown>
<textarea data-template>
## slide 1 
please add me another slide

---
## slide 2
I _need_ it 

---
## slide 3
</textarea>
</section>

However the markdown is not fully working : reveal.js problem with markdown

Everything is on the same slide and the 2nd line should be a paragrapher. what should I do ?

[email protected]


Solution

  • I think you need to specify the data separator, in the example is "---"

    <section data-markdown data-separator="---">
    

    :)

    and take into account what the documentation says

    Note that this is sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks).