I wanted to write a presentation the same way I write blog posts (in Markdown). d-slides is a single HTML file that takes a .md file and turns it into a presentation in the browser. No build step, no npm, no server.

d-slides

Visit at d-slides

 

How it works

The whole thing is about 36 KB of HTML, CSS and JavaScript. The only dependency is marked (v12.0.2, loaded from cdnjs), that parses Markdown. The rest is a small layout engine that decides what each block should look like.

Headings define the structure:

# Title	Title slide
## Section	Section divider
### Slide	One slide
#### Item	One tile inside a slide

Content decides the layout

Each slide is a 6x4 CSS grid, and the content becomes tiles placed into it. The layout is picked from what is in the Markdown, not from anything I configure.

Loading and exporting

To load a deck, press Esc and do one of these:

  1. Drop a .md file onto the page.
  2. Paste a public URL (it needs CORS, so raw.githubusercontent.com works).
  3. Open the page with ?md=URL and it loads on start.

Keys are what you’d expect: arrows or Space to navigate, F for fullscreen, T for theme, G for a slide overview. The current slide is kept in the hash (#s3), so links to a specific slide work.

There are two export options. Standalone HTML bakes the Markdown and the parser into one file you can send to someone. Print / PDF uses a 1280x720 page size, with the animations disabled so everything is visible.