
First, you can go to this link: https://github.com/hakimel/reveal.js/
Markdown: It is possible to write your slides using Markdown. To enable Markdown, add the data-markdown attribute to your elements and wrap the contents in alike the example below. You will also need to add the plugin/markdown/markdown.js script to the Reveal. Initialize the dependencies section at your HTML file.
Sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks).
<section data-markdown> | |
<textarea data-template> | |
## Page title | |
A paragraph with some text and a [link](http://hakim.se). | |
</textarea> | |
</section> |
External Markdown
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: the data-separator attribute defines a regular expression for horizontal slides (defaults to ^\r?\n—\r?\n$, a newline-bounded horizontal rule) and data-separator-vertical defines vertical slides (disabled by default). The data-separator-notes attribute is a regular expression for specifying the beginning of the current slide’s speaker notes (defaults to notes?:, so it will match both “note:” and “notes:”). The data-charset attribute is optional and specifies which charset to use when loading the external file.
When used locally, this feature requires that reveal.js runs from a local webserver.
Example:
<section data-markdown="example.md" | |
data-separator="^\n\n\n" | |
data-separator-vertical="^\n\n" | |
data-separator-notes="^Note:" | |
data-charset="iso-8859-15"> | |
<!-- | |
Note that Windows uses `\r\n` instead of `\n` as its linefeed character. | |
For a regex that supports all operating systems, use `\r?\n` instead of `\n`. | |
--> | |
</section> |
Element Attributes
Special syntax is available for adding attributes to Markdown elements. This is useful for fragments, amongst other things.
<section data-markdown> | |
<script type="text/template"> | |
- Item 1 <!-- .element: class="fragment" data-fragment-index="2" --> | |
- Item 2 <!-- .element: class="fragment" data-fragment-index="1" --> | |
</script> | |
</section> |
Slide Attributes
Special syntax is available for adding attributes to the slide elements generated by your Markdown.
<section data-markdown> | |
<script type="text/template"> | |
<!-- .slide: data-background="#ff0000" --> | |
Markdown content | |
</script> | |
</section> |
Configuring marked
We use marked to parse Markdown. To customize marked’s rendering, you can pass in options when configuring Reveal:
Reveal.initialize({ | |
// Options which are passed into marked | |
// See https://marked.js.org/#/USING_ADVANCED.md#options | |
markdown: { | |
smartypants: true | |
} | |
}); |
MotoShare.in provides the perfect two-wheeler for every occasion—daily commuting, weekend escapes, tourist exploration, or test-riding your dream bike. Simplify your mobility with us!