Skip to main content

Slider generator with markdown

Project description

slidr

Slide generator with markdown.

For users

These steps are for people who just want to create and present slides. You do not need a Python dev setup.

Install (tool)

Install the CLI once and keep it available on your PATH.

uv tool install slidr

Run without installing

Use this if you only need slidr occasionally or just want it to run without pointing to a specific directory.

uvx slidr new my-deck
uvx slidr build my-deck/deck
uvx slidr serve my-deck/deck -p 8000

Basic workflow

Create a project, build HTML, and run a local preview server.

slidr new my-deck
cd my-deck
slidr build deck
slidr serve deck -p 8000

Slides are written in deck/deck.md using --- as slide separators. The build step generates deck/index.html.

Customization

Custom Themes

Create a theme.css file in your deck/ directory to customize the appearance:

# Your project structure
my-deck/
  deck/
    deck.md
    theme.css      # Your custom theme
    index.html

You can also use built-in themes by specifying them in front matter:

---
theme: dark-professional
---
# First Slide

Available built-in themes: default, dark-professional, minimal-light, corporate-brand, high-contrast, code-focused, academic, gradient, retro.

Custom Fonts

To use custom web fonts in your theme:

  1. Define fonts in your CSS (e.g., deck/theme.css):
/* Apply fonts to elements */
html, body {
  font-family: 'Inter', sans-serif;
}

.slide h1, .slide h2, .slide h3 {
  font-family: 'Outfit', sans-serif;
}

.slide code, .slide pre code {
  font-family: 'JetBrains Mono', monospace;
}
  1. Font loading is handled automatically - Slidr's template includes popular web fonts preloaded. If you need additional fonts, you'll need to modify the slides.html template to add <link> tags.

Important: Do not use @import statements in your CSS for web fonts, as they don't work reliably in inline styles. Font links must be added to the HTML template.

Front Matter Configuration

Configure your deck with YAML front matter at the top of your markdown file. Front matter must be placed at the very beginning of the file, enclosed by --- delimiters:

---
theme: dark-professional
title: My Awesome Presentation
align: center
code_highlight: monokai
---

# First Slide
Content starts here...

Available Front Matter Fields:

  • theme (string) - Specify which theme to use for your slides

    • Built-in themes: default, dark-professional, minimal-light, corporate-brand, high-contrast, code-focused, academic, gradient, retro
    • Custom themes: Path to a CSS file (e.g., custom-theme.css, ./themes/corporate.css)
    • Priority order: CLI --theme argument > front matter theme > deck/theme.css > default theme
  • title (string) - Set the HTML page title (appears in browser tab)

    • Default: "Slide Deck"
    • Example: title: Introduction to Python
  • align (string) - Control text alignment for all slides

    • Valid values: left, center, right
    • Default: left
    • Example: align: center
  • code_highlight (string) - Configure syntax highlighting for code blocks

    • Accepts any Pygments style name (e.g., monokai, github, dracula, solarized-dark, nord)
    • Disable highlighting: Use off, false, no, or none
    • Default: No highlighting unless specified
    • Example: code_highlight: monokai

Example with all fields:

---
theme: dark-professional
title: Advanced Python Techniques
align: left
code_highlight: dracula
---

# Welcome
This is my first slide...

---

# Code Example
```python
def hello():
    print("Hello, world!")

#### AI-Powered Theme Creation

Slidr includes the **slidr-theme-creator** AI skill that can generate custom CSS themes based on your requirements:

**Example requests to AI agents:**
- "Create a dark theme with blue gradients and modern fonts"
- "Generate a corporate theme using brand colors #0066cc and #003d7a"
- "Make a minimal light theme optimized for readability"
- "Design a code-focused theme with syntax highlighting colors"

The skill understands design patterns, accessibility requirements, brand identity, and modern web aesthetics. See [.agents/skills/slidr-theme-creator/SKILL.md](.agents/skills/slidr-theme-creator/SKILL.md) for details.

## Development

These steps are for contributors who are changing the codebase or running tests.

### Install (editable)
Create a local virtual environment and install in editable mode.
```bash
uv venv
uv pip install -e .

Test

Install dev dependencies and run the test suite with pytest.

uv pip install -e .[dev]
pytest

pre-commit

Install hooks to keep formatting and checks consistent before commits.

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Alternatives

I just wanted to use my own for no special reason, but these are some alternatives (almost surely they do the same or better).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slidr-0.0.6.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slidr-0.0.6-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file slidr-0.0.6.tar.gz.

File metadata

  • Download URL: slidr-0.0.6.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for slidr-0.0.6.tar.gz
Algorithm Hash digest
SHA256 452eb81345ed80e0d72c31e9837f4d6adad6c80918cee778f1e9fa0fb494ab8c
MD5 c1f972a61b5706db45a8ad7daac9e2c8
BLAKE2b-256 59927757a0cc5c8f0da5a301e52b39e08b5a1040276731df74baaa8bdce4efc2

See more details on using hashes here.

File details

Details for the file slidr-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: slidr-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for slidr-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 63537de0c61ec29b389b527c939a5ee6a6693b5703668b666a436de1d5aaa0ff
MD5 00e8d301a80784b4f2269135414fb80a
BLAKE2b-256 5f3981e18f3629d5ab9e0db654341b5a7a9df501f7d4322abf4143b81d5ac1c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page