A Sphinx extension for converting reStructuredText and Markdown to k1LoW/deck-compatible Markdown format.
sphinx-deck enables you to write presentations in familiar reStructuredText (reST) or Markdown syntax and convert them to deck-compatible Markdown for Google Slides generation.
- Support for both reST and Markdown source files
- Convert to deck-compatible Markdown with proper slide separators (
---) - Automatic conversion of section headers to deck format (currently h2 and h3 for titles)
$ pip install sphinx-deckFor Markdown support, also install:
$ pip install "myst-parser[linkify]"Add to your conf.py:
extensions = [
"sphinx_deck",
]extensions = [
"myst_parser",
"sphinx_deck",
]
myst_enable_extensions = [
"linkify",
]
myst_linkify_fuzzy_links = FalseFor detailed examples, please see the example/ directory in this repository.
- Write your presentation in reST:
Title
=====
First section
-------------
Content 1
^^^^^^^^^
Content 2
^^^^^^^^^- Or write in Markdown:
# Title
## First section
### Content 1
### Content 2- Build the deck-compatible Markdown:
$ sphinx-build -M markdown source buildThis generates deck-compatible Markdown in the build directory:
# Title
---
## First section
---
## Content 1
---
## Content 2- Use k1LoW/deck to create Google Slides:
$ deck new build/markdown/index.md
$ deck apply build/markdown/index.mdContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.