Metadata-Version: 2.5
Name: vexy-mkdocs-markdown-in-template
Version: 1.0.6
Summary: A MkDocs plugin that lets you use Markdown inside the theme's Jinja2 template files.
Project-URL: Documentation, https://vexy.dev/vexy-mkdocs-markdown-in-template/
Project-URL: Homepage, https://github.com/vexyart/vexy-mkdocs-markdown-in-template
Project-URL: Repository, https://github.com/vexyart/vexy-mkdocs-markdown-in-template
Project-URL: Issues, https://github.com/vexyart/vexy-mkdocs-markdown-in-template/issues
Project-URL: Changelog, https://github.com/vexyart/vexy-mkdocs-markdown-in-template/blob/main/CHANGELOG.md
Author-email: Adam Twardoch <adam+github@twardoch.com>
License-Expression: MIT
License-File: LICENSE
Keywords: jinja,markdown,mkdocs,template,theme
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: MkDocs
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Requires-Python: >=3.12
Requires-Dist: jinja2>=3.0.3
Requires-Dist: markdown>=3.3.6
Requires-Dist: mkdocs>=1.5.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: types-markdown>=3.6; extra == 'dev'
Description-Content-Type: text/markdown

# vexy-mkdocs-markdown-in-template

[![CI](https://github.com/vexyart/vexy-mkdocs-markdown-in-template/actions/workflows/ci.yml/badge.svg)](https://github.com/vexyart/vexy-mkdocs-markdown-in-template/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/vexy-mkdocs-markdown-in-template.svg)](https://pypi.org/project/vexy-mkdocs-markdown-in-template/)
[![Python](https://img.shields.io/pypi/pyversions/vexy-mkdocs-markdown-in-template.svg)](https://pypi.org/project/vexy-mkdocs-markdown-in-template/)

**Documentation:** https://vexy.dev/vexy-mkdocs-markdown-in-template/

Write Markdown inside your MkDocs theme's Jinja2 templates.

Theme partials are HTML; your content is Markdown. This plugin lets you write
Markdown right in a template, wrapped in `{% md %} ... {% mdend %}`, and renders it
to HTML while the page builds. The block uses your site's own `markdown_extensions`
and `mdx_configs`, so tables, footnotes, and admonitions behave exactly as they do
in a page body.

## Installation

```bash
pip install vexy-mkdocs-markdown-in-template
```

## Configuration

In `mkdocs.yml`, list the plugin as early as possible so later plugins see the
rendered HTML:

```yaml
plugins:
  - markdown-in-template
```

## Usage

In any HTML template partial, wrap Markdown in `{% md %}` and `{% mdend %}`:

```html
<article>
{% md %}
# Heading

Regular and **bold** text
{% mdend %}
</article>
```

The plugin strips the block's common leading indentation, using the first
non-blank line as the baseline — so you can indent Markdown to line up with the
surrounding HTML without it being read as a code block.

## Development

```bash
pip install -e .[dev]
pytest          # unit + full mkdocs-build integration test
ruff check .    # lint
mypy            # type check
```

## Documentation

Full docs: <https://vexy.dev/vexy-mkdocs-markdown-in-template/>

## License

MIT — see [LICENSE](LICENSE).
