Skip to content

Ship a companion MarpToPptx.Themes content NuGet package #141

Description

@jongalloway

Summary

MarpToPptx currently requires users to supply external CSS files via --theme-css or inline front-matter style:. There are no built-in or bundled themes — the theme: front-matter directive stores the name but doesn't resolve to anything without a matching CSS file.

We should ship a companion content NuGet package (MarpToPptx.Themes) that bundles popular community themes and our own DiagramForge-shared themes so users have a solid starter set out of the box.

Motivation

  • Users shouldn't need to author CSS just to get a polished dark or branded deck.
  • DiagramForge is rolling out shared themes (Cyberpunk, Synthwave) — a shared package keeps both projects in sync.
  • Marp CLI ships built-in themes (default, gaia, uncover); we should offer parity.

Proposed Design

New project: MarpToPptx.Themes

  • Content-only NuGet package that packs .css files as contentFiles so they land at a predictable path in consuming projects.
  • Versions independently from the core MarpToPptx package.

CLI --theme <name> resolution

Add a new --theme <name> option to the CLI that resolves a theme name to a CSS file by searching (in order):

  1. Current directory / relative path
  2. NuGet content folder (from MarpToPptx.Themes)
  3. User themes directory (~/.marp2pptx/themes/)
  4. MARP2PPTX_THEMES environment variable path

Falls back to --theme-css <path> for fully custom CSS.

Initial theme set

Bundle the existing samples/themes/ collection plus the top-level sample themes:

# Theme Origin
1 community-beam Community-inspired
2 community-graph-paper Community-inspired
3 community-wave Community-inspired
4 community-dracula Community-inspired
5 popular-gaia Marp built-in inspired
6 diagramforge-cyberpunk DiagramForge shared
7 diagramforge-synthwave DiagramForge shared
8 editorial Repo sample (03-theme.css)
9 showcase Repo sample (08-showcase.css)
10 diagrams Repo sample (09-diagrams.css)

Tasks

  • Create src/MarpToPptx.Themes/ project with NuGet content packaging
  • Copy/organize theme CSS files into the package with stable names
  • Add --theme <name> CLI option with search-path resolution
  • Add theme name resolution to MarpCompiler API for library consumers
  • Update documentation (doc/using-templates.md, CLI --help, README)
  • Add tests for theme resolution logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions