doersino / markdeep-slides

Build presentation slides with Markdeep and present them right in your browser.
https://doersino.github.io/markdeep-slides/demo.md.html
BSD 2-Clause "Simplified" License
172 stars 13 forks source link
markdeep markdeep-slides markdown presentation presentation-slides slides

markdeep-slides

Build presentation slides with Markdeep and present them right in your browser.

💻 Try out a demo presentation and take a look at its Markdeep source code.

Also, check out markdeep-thesis and markdeep-diagram-drafting-board!

Getting started

Setup

This repository contains copies of all dependencies (Markdeep, MathJax, and the webfonts used by the built-in themes) by design – it'll work offline (unless you include YouTube videos or something in your slides). You don't want to rely on wifi being available when and where you'll present – that's just asking for trouble.

📦 Clone this repository or download a ZIP.

Then simply...

  1. navigate to demo.md.html,
  2. open it in your text editor and browser of choice, and
  3. start building your slides. Easy!

Shortcuts

Use the following keyboard shortcuts to steer your presentation. Press...

Options

At the bottom of demo.md.html, right before a bunch of essential JavaScript files are loaded, you'll find a set of options. Their default values (each of which is automatically applied if you omit the corresponding option) are:

<script>
markdeepSlidesOptions = {
    aspectRatio: 16 / 9,      // aspect ratio of your slides
    theme: 'simple',          // theme – "simple", "deepsea", "serif" or path of a stylesheet
    fontSize: 28,             // base font size, relative to slide display size
    diagramZoom: 1.0,         // markdeep diagram scaling factor
    totalSlideNumber: false,  // show total number of slides next to slide number?
    progressBar: true,        // show a presentation progress bar on each slide?
    breakOnHeadings: false,   // start a new slide not only on encountering "---", but also level 1 and 2 headings?
    slideChangeHook: (oldSlide, newSlide) => {},  // function executed whenever the current slide changes, receives old and new slide number
    modeChangeHook: (newMode) => {}               // function executed whenever the mode changes, receives new mode, e.g. "draft" or "presentation"
};
</script>

Modify them to your liking, but don't decrease the font size too much (nobody wants to read novel-length slides). Additionally, you can tweak some aspects of each theme by overriding CSS variables – take a look at the relevant file in markdeep-slides/themes/.

Exporting to PDF

It's best to use Chrome for generating a PDF version of your slides – it respects the page size that's automatically specified in CSS based on your chosen aspect ratio (unlike all other browsers). In Chrome's print window, set "Margins" to "None" and make sure to keep the "Background graphics" option enabled.

In my experience, once you've dialled in this print configuration, you can run Chrome headlessly for future exports (you may need to boost the --virtual-time-budget depending on the complexity of your slides):

chrome --headless --disable-gpu --print-to-pdf=demo.md.html.pdf --no-margins --virtual-time-budget=5000 demo.md.html

Examples

Here's a list of presentations that folks have built using this tool:

Contributing

Got an idea on how to improve something? Ran into unexpected behavior? Found a bug? (Maybe even fixed that bug?)

Please file an issue or send a pull request! I'll be glad to take a look at it.

I'd love to hear from you (or take a peek at your slides) if you've used this tool in practice.


Notes

Making your own theme

Known issues

If you know of an elegant way of fixing these, I'd very much appreciate a heads up.

License

You may use this repository's contents under the terms of the BSD 2-Clause "Simplified" License, see LICENSE.

However, the subdirectory markdeep-slides/lib/ contains third-party software with its own licenses: