mdformat-frontmatter
An mdformat plugin for parsing / ignoring frontmatter.
Decision gist · record as of 2026-08-14
Yes, if you use mdformat with markdown files that contain YAML front matter. The plugin is actively maintained, has no security vulnerabilities, and solves a specific but real problem for Jekyll users and documentation projects. Install it only if you need front matter preservation; it adds no value for plain markdown files.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or higher.
- Low friction install with three straightforward runtime dependencies (mdformat, mdit-py-plugins, ruamel-yaml).
- The package is actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-05-23 (83 days) · last repo commit 2026-07-22 · 16 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,188,261 downloads/mo, #4,245 on PyPI
Alternatives
Verify before relying
pip install mdformat-frontmatter
import mdformat
markdown_text = """---
test: yaml
---
# Heading
Content here."""
formatted = mdformat.text(markdown_text)- Whether the plugin handles edge cases like malformed YAML front matter gracefully or if it produces unpredictable output as the description suggests.
- Performance characteristics when processing large markdown files with complex front matter.
- Compatibility with other mdformat plugins when used together in a formatting pipeline.
What it is and what it does
mdformat-frontmatter extends the mdformat markdown formatter to recognize and preserve YAML front matter blocks—the metadata headers used by static site generators like Jekyll. When mdformat processes a markdown file, this plugin ensures that properly formed YAML blocks at the beginning of the file are left intact rather than being reformatted or stripped. The plugin works by integrating with mdformat's plugin system and depends on ruamel-yaml for YAML parsing and mdit-py-plugins for markdown-it integration.
The plugin is straightforward in scope: it validates that YAML front matter appears only at the file's start (first one or two lines) and allows well-formed blocks to pass through unchanged. The maintainers note that the plugin is not sophisticated about handling malformed YAML—incorrectly structured blocks may produce unexpected behavior—so it works best when front matter is already valid.
Use it for
- Format markdown files for Jekyll or other static site generators that rely on YAML front matter for configuration and metadata.
- Integrate mdformat into a documentation build pipeline without losing front matter headers during formatting passes.
- Ensure consistent markdown style across a project while preserving metadata used by automation tools.
- Enforce markdown formatting standards in a monorepo where some files use YAML front matter for site generation.
- Combine with pre-commit hooks to automatically format markdown while respecting front matter structure.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use mdformat with markdown files that contain YAML front matter.
The plugin is actively maintained, has no security vulnerabilities, and solves a specific but real problem for Jekyll users and documentation projects. Install it only if you need front matter preservation; it adds no value for plain markdown files.
Install
mdformat-frontmatter on PyPI
Before you install
Low friction install with three straightforward runtime dependencies (mdformat, mdit-py-plugins, ruamel-yaml). The package is actively maintained with a recent release and no known vulnerabilities.
Requires Python 3.10 or higher.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install mdformat-frontmatter
import mdformat
markdown_text = """---
test: yaml
---
# Heading
Content here."""
formatted = mdformat.text(markdown_text)
Verify before relying
- Whether the plugin handles edge cases like malformed YAML front matter gracefully or if it produces unpredictable output as the description suggests.
- Performance characteristics when processing large markdown files with complex front matter.
- Compatibility with other mdformat plugins when used together in a formatting pipeline.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesmdformatmdit-py-pluginsruamel-yaml |
| Maintenance | Actively maintained 83 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,188,261 / month, #4,245 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries :: Python Modules |
Evidence: mdformat_frontmatter-2.1.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mdformat plugin yaml frontmatter”
- mdformat-frontmattermdformat-frontmatter is an mdformat plugin that preserves YAML front…
- mdformat-front-mattersA plugin for mdformat that normalizes YAML, TOML, and JSON front…
- python-frontmatterParses and manages text files with YAML (or JSON, TOML) front matter,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also mdformat-front-matters · python-frontmatter · mdformat-footnote · mdformat_myst · mdformat_tables · mdformat_deflist · mdformat · mdformat-mkdocs · mdformat-ruff · mdformat-black