Converts paragraphs to HTML and wrap each slide in a header and footer.
slides
.*
.html
Setting | Description | Default |
---|---|---|
add-new-files | Boolean or list of extensions/patterns to match. | False |
added-in-version | Dexy version when this filter was first available. | 0.9.9.6 |
additional-doc-filters | Filters to apply to additional documents created as side effects. | {} |
additional-doc-settings | Settings to apply to additional documents created as side effects. | {} |
comment-char | Lines starting with this comment char will not show up in slides. | ; |
data-type | Alias of custom data class to use to store filter output. | generic |
examples | Templates which should be used as examples for this filter. | ['slides'] |
exclude-add-new-files | List of patterns to skip even if they match add-new-files. | [] |
exclude-new-files-from-dir | List of directories to skip when adding new files. | [] |
ext | File extension to output. | None |
extension-map | Dictionary mapping input extensions to default output extensions. | None |
extensions | Which Markdown extensions to enable. | {'nl2br': {}} |
help | Helpstring for plugin. | Converts paragraphs to HTML and wrap each slide in a header and footer. |
input-extensions | List of extensions which this filter can accept as input. | ['.*'] |
keep-originals | Whether, if additional-doc-filters are specified, the original unmodified docs should also be added. | False |
mkdir | A directory which should be created in working dir. | None |
mkdirs | A list of directories which should be created in working dir. | [] |
nodoc | Whether filter should be excluded from documentation. | False |
output | Whether to output results of this filter by default by reporters such as 'output' or 'website'. | False |
output-extensions | List of extensions which this filter can produce as output. | ['.html'] |
override-workspace-exclude-filters | If True, document will be populated to other workspaces ignoring workspace-exclude-filters. | False |
preserve-prior-data-class | Whether output data class should be set to match the input data class. | False |
require-output | Should dexy raise an exception if no output is produced by this filter? | True |
slide-footer | Content to append to end of each slide. | |
slide-header | Content to prepend to start of each slide. | |
split | String to use to split slides. | |
tags | Tags which describe the filter. | [] |
variables | A dictionary of variable names and values to make available to this filter. | {} |
vars | A dictionary of variable names and values to make available to this filter. | {} |
workspace-exclude-filters | Filters whose output should be excluded from workspace. | ['pyg'] |
workspace-includes | If set to a list of filenames or extensions, only these will be populated to working dir. | None |
The slides filter takes markdown content, like this:
# My Presentation ## This is a header Some paragraph text ## Another slide - foo - bar - baz
and lets you generate slides using javascript/css slide presentation tools such as impress.js or deck.js. Just leave 2 blank lines to indicate a new slide (this is configurable with the split setting).
Here is the HTML generated by the slides filter with default settings:
<section class="slide"> <h1>My Presentation</h1> </section> <section class="slide"> <h2>This is a header</h2> <p>Some paragraph text</p> </section> <section class="slide"> <h2>Another slide</h2> <ul> <li>foo</li> <li>bar</li> <li>baz</li> </ul> </section>
The default settings work for deck.js.
Here is a dexy configuration which inserts content from the slides.md source (as shown above) into a deck.html file which is a deck.js template:
- deck.html|jinja: - slides.md|jinja|slides: - output: False
Here are the resulting deck.js slides:
To use the slides filter with other presentation tools, change the slide-header and slide-footer settings to whatever each slide needs to be wrapped with. Here are settings which work with impress.js:
- impress.html|jinja: - impress.md|jinja|slides: - output: False - slides: { slide-header: "<div class=\"slide step\" id=\"slide%(number)s\">", slide-footer: "</div>" }
These header and footer strings are run through python string interpolation before they are wrapped around the content of each slide. Currently there is one variable available to this interpolation named number which gives you the slide number, starting with slide 1.
Here are the resulting impress.js slides:
Content © 2020 Dr. Ana Nelson | Site Design © Copyright 2011 Andre Gagnon | All Rights Reserved.