Markdown to HTML Presentation Generator
Project description
mdpres
Markdown to HTML presentation generator.
Installation
# Clone the repository
git clone <repo-url>
cd html-presentation
# Install dependencies
uv sync
Quick Start
# Create an example presentation
uv run mdpres example
# Build HTML
uv run mdpres build example.md
# Open in browser
open example.html
Usage
Commands
# Build presentation
uv run mdpres build slides.md
# With output file and theme
uv run mdpres build slides.md -o presentation.html --theme nord
# Create example file
uv run mdpres example
# List available themes
uv run mdpres themes
Markdown Format
Slides are separated by horizontal rule ---:
---
title: Presentation Title
author: Author Name
---
# Title
First slide (title slide)
---
## Second Slide
- Item 1
- Item 2
- Item 3
---
## Code
```python
def hello(name):
return f"Hello, {name}!"
Diagram
graph LR
A[Input] --> B[Process]
B --> C[Output]
### Supported Elements
| Element | Syntax |
|---------|--------|
| Headers | `# H1`, `## H2`, `### H3` |
| Bold | `**text**` or `__text__` |
| Italic | `*text*` or `_text_` |
| Code | `` `code` `` |
| Links | `[text](url)` |
| Images | `` |
| Lists | `- item` or `1. item` |
| Blockquotes | `> quote` |
| Code blocks | ` ```language ... ``` ` |
| Mermaid | ` ```mermaid ... ``` ` |
### Slide Directives
Add HTML comments to customize slides:
```markdown
<!-- class: centered special -->
<!-- type: custom -->
# Slide with classes
Themes
| Theme | Description |
|---|---|
dark |
Dark theme (default) |
light |
Light theme |
nord |
Nordic color palette |
dracula |
Popular dark theme |
uv run mdpres build slides.md --theme dracula
Presentation Navigation
| Key | Action |
|---|---|
Right / Space / PageDown |
Next slide |
Left / PageUp |
Previous slide |
Home |
First slide |
End |
Last slide |
f |
Toggle fullscreen |
On mobile devices use swipe gestures.
Development
# Install dev dependencies
uv sync
# Run tests
uv run pytest
# Linter
uv run ruff check .
# Format code
uv run ruff format .
# Type checking
uv run pyrefly check
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mdpres-0.1.0.tar.gz
(34.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdpres-0.1.0.tar.gz.
File metadata
- Download URL: mdpres-0.1.0.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a979d6d078ecc314cdb8a51ec8345a5d9ea5191128e52d102a243b77a6412439
|
|
| MD5 |
ab48a967b513dfb5166f692de40b05a6
|
|
| BLAKE2b-256 |
e1cd7b40a0de4ea157fc614235dd0541c5ce1dfb699616f18b3ca610e957c155
|
File details
Details for the file mdpres-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mdpres-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4173b08d19d52a89fd0a0289d02c81bd20a13ba152b8b4403ae97ae3daafe14
|
|
| MD5 |
742739da2f9497eed447f1a0b241d96d
|
|
| BLAKE2b-256 |
bb1c403b08065bd5eb8d053d75e70e3a854fd084da5034a8dd1651dbe11741d6
|