Skip to content

Jorge-de-la-Flor/pdoc-modern-themes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README in Spanish

pdoc-modern-themes

Collection of modern themes for documentation with pdoc. // Colección de temas modernos para documentación con pdoc.

This repository provides a set of ready-to-use themes for pdoc so you can generate clean, modern HTML documentation for your Python projects.

Installation

You can use the themes directly by cloning or downloading this repository.

git clone https://github.com/Jorge-de-la-Flor/pdoc-modern-themes.git

Then point pdoc to the theme folder you want to use (see “Available themes”).

Alternatively, you can copy a specific theme folder into your project (for example into docs_theme/ or similar).

Usage

Generate static HTML documentation with one of the themes:

pdoc <module-or-dir> -t <theme-name> -o docs
  • <module-or-dir>: your package or module (for example apider).

  • <theme-name>: the folder name of the theme inside this repository (for example rust).

Run a local server while developing

pdoc <module-or-dir> -t <theme-name>

Example:

pdoc asyncio -t rust -o docs

This will generate the documentation for the standard library asyncio module using the rust-style theme into the docs/ directory.

Available themes

Current available themes are the ones not marked as WIP.

  • Rust: inspired by the official Rust documentation style.
  • Dracula: classic Dracula dark color scheme.
  • GitHub: GitHub-like dark/onedark style.
  • Svelte (WIP): inspired by the Svelte documentation layout.

Each theme lives in its own folder and can be referenced by that folder name in the -t option.

Preview

Visual previews of some themes:

Dracula preview GitHub/One Dark preview
Rust preview

Svelte WIP

If you want to see a theme in action, open its folder and follow the usage instructions with that theme name.

Development

The goal of this repository is to make it easy to create and extend pdoc themes using a shared set of CSS variables like var(--color-*).

  • Common colors and layout decisions are expressed as CSS variables.
  • You can start a new theme by copying an existing one and adjusting only the variables and small layout pieces.

This makes it straightforward to keep multiple themes consistent while still giving each one a distinct look.

Testing

To test a theme during development, you can use a local module with example content and run:

pdoc _project/core/ -t <theme-name>

Replace with the folder name of the theme you are working on.

Open the URL that pdoc prints in your browser (for example http://localhost:8080/…) and refresh as you tweak the templates and CSS.

Looking for themes for the legacy pdoc (pre-2024 versions)? You can use the syn themes here: https://github.com/nxtlo/syn

About

Collection of modern themes for documentation with pdoc. // Colección de temas modernos para documentación con pdoc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors