md-to-slides
Convert Markdown files into presentation slides — HTML (Reveal.js), PowerPoint (.pptx), or Google Slides.
Installation
pip install md-to-slides
For PowerPoint and Google Slides output, install the optional extra:
pip install md-to-slides[google]
Usage
md-to-slides convert talk.md
md-to-slides convert talk.md -f google
md-to-slides convert talk.md -f google --via-api \
--credentials client_secrets.json
Options
-o / --output | input stem + extension | Output file path |
-f / --format | html | Output format: html or google |
--via-api | off | Upload directly via Google Slides API (requires --credentials) |
--credentials | — | Path to OAuth2 client secrets JSON from Google Cloud Console |
Markdown format
Slides are separated by --- on its own line. An optional YAML front matter block sets the title and theme.
---
title: My Talk
theme: moon
---
# First Slide
- Bullet one
- Bullet two
---
# Second Slide
Some prose content here.
<!-- notes -->
Speaker notes go here.
<!-- /notes -->
Front matter fields
title | (empty) | Presentation title |
theme | black | Reveal.js theme: black, white, league, beige, sky, night, serif, simple, solarized, blood, moon |
Speaker notes
Wrap speaker notes in <!-- notes --> / <!-- /notes --> HTML comments anywhere in a slide. They appear in Reveal.js presenter view.
Output formats
HTML — Self-contained Reveal.js presentation loaded from CDN. Open the output file in any browser. Includes syntax highlighting via highlight.js.
PowerPoint (.pptx) — Standard .pptx file. Upload to Google Drive to open as a Google Slides presentation automatically.
Google Slides (via API) — Creates a presentation directly in your Google account and prints its URL. Requires a Google Cloud project with the Slides API enabled and an OAuth2 client secrets JSON file.
Google Slides API setup
- Go to Google Cloud Console → APIs & Services → Enable Google Slides API.
- Create an OAuth2 Desktop credential and download
client_secrets.json.
- Run
md-to-slides convert with --via-api --credentials client_secrets.json. A browser window opens for one-time authorization; a token.json is saved alongside the secrets file for future runs.
License
MIT