Metadata-Version: 2.4
Name: mkdocs-pygments
Version: 0.1.0
Summary: Highlighting themes for code blocks.
Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
License-Expression: ISC
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Project-URL: Homepage, https://pawamoy.github.io/mkdocs-pygments
Project-URL: Documentation, https://pawamoy.github.io/mkdocs-pygments
Project-URL: Changelog, https://pawamoy.github.io/mkdocs-pygments/changelog
Project-URL: Repository, https://github.com/pawamoy/mkdocs-pygments
Project-URL: Issues, https://github.com/pawamoy/mkdocs-pygments/issues
Project-URL: Discussions, https://github.com/pawamoy/mkdocs-pygments/discussions
Project-URL: Gitter, https://gitter.im/mkdocs-pygments/community
Project-URL: Funding, https://github.com/sponsors/pawamoy
Requires-Python: >=3.10
Requires-Dist: pygments>=2.19
Description-Content-Type: text/markdown

# MkDocs Pygments

[![ci](https://github.com/pawamoy/mkdocs-pygments/workflows/ci/badge.svg)](https://github.com/pawamoy/mkdocs-pygments/actions?query=workflow%3Aci)
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://pawamoy.github.io/mkdocs-pygments/)
[![pypi version](https://img.shields.io/pypi/v/mkdocs-pygments.svg)](https://pypi.org/project/mkdocs-pygments/)
[![gitter](https://img.shields.io/badge/matrix-chat-4DB798.svg?style=flat)](https://app.gitter.im/#/room/#mkdocs-pygments:gitter.im)

Highlighting themes for code blocks.

## Installation

```bash
pip install mkdocs-pygments
```

## Usage

Configure it in `mkdocs.yml`:

```yaml
# mkdocs.yml
plugins:
- pygments:
    light: autumn
    dark: github-dark
```

To know which themes are available, you can either read our docs,
or use a theme that doesn't exist, to abort the build with an error
and a message listing the available themes:

```yaml
# mkdocs.yml
plugins:
- pygments:
    light: wodjweofijwqefd
    dark: github-dark
```

```console
$ mkdocs serve
INFO    -  Building documentation...
INFO    -  Cleaning site directory
ERROR   -  pygments: Unknown theme: 'wodjweofijwqefd'. Available themes:
           abap, algol, algol_nu, arduino, autumn, bw, borland, coffee,
           colorful, default, dracula, emacs, friendly_grayscale, friendly,
           fruity, github-dark, gruvbox-dark, gruvbox-light, igor, inkpot,
           lightbulb, lilypond, lovelace, manni, material, monokai, murphy,
           native, nord-darker, nord, one-dark, paraiso-dark, paraiso-light,
           pastie, perldoc, rainbow_dash, rrt, sas, solarized-dark,
           solarized-light, staroffice, stata-dark, stata-light,
           tango, trac, vim, vs, xcode, zenburn
```

---

It's possible to instruct MkDocs Pygments
to ignore the background color set by a theme,
in order to make it work for both light and dark
color schemes.

For example, to use the `autumn` style (which is a light theme),
for both light and dark schemes while adapting the background color:

```yaml
# mkdocs.yml
plugins:
- pygments:
    light: autumn
    respect_light_background: true  # default value
    dark: autumn
    respect_dark_background: false
```

To use the `github-dark` style (which is a dark theme),
for both light and dark schemes while adapting the background color:

```yaml
# mkdocs.yml
plugins:
- pygments:
    light: github-dark
    respect_light_background: false
    dark: github-dark
```

By default, the background color is respected,
so you don't have to actually specify `respect_<light/dark>_background: true`.

## Sponsors

<!-- sponsors-start -->
<!-- sponsors-end -->
