mdformat-frontmatter
An mdformat plugin for ensuring that yaml front-matter is respected.
Many tools (such as jekyll) use yaml front matter for automation purposes.
mdformat-frontmatter only supports yaml. For example:
---
test: yaml
---
# This looks okay
For some markdown code.
Frontmatter can only be at the first line or two of the code.
# This is not
---
test: yaml
---
Note: that at this stage this plugin is not that sophisticated. The principle objective is to allow properly formed yaml header blocks to pass through. Incorrectly formed blocks may result in strange behaviour.
Requirements
Python 3.10 or higher.
Development
This package was built from the template provided by executable books and customized (specifically to separate content PR's from the release cycle). This package uses hatch as the build engine, and tox for test automation.
To install development dependencies:
pip install -e ".[dev,test]"
To run the tests:
tox
and with test coverage:
tox -e py312-cov
The easiest way to write tests, is to edit tests/fixtures.md
To run the code formatting and style checks:
tox -e py312-pre-commit
or directly
pip install pre-commit
pre-commit run --all
To run the pre-commit hook test:
tox -e py312-hook
Release Process
Releases are fully automated using python-semantic-release and conventional commits:
- Merge PRs with conventional commit titles (e.g.,
fix:,feat:,chore:) - The CI workflow automatically analyzes commits, determines version bump, updates CHANGELOG, creates a tag, and publishes to PyPI
- Artifacts are signed with Sigstore for supply chain security
The release workflow uses PyPI Trusted Publishing (OIDC) and generates attestations for all published packages.
Metadata
Release files for mdformat-frontmatter 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mdformat_frontmatter-2.1.2.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdformat_frontmatter-2.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.4 kB
Release files / mdformat_frontmatter-2.1.2.tar.gz
| Download URL | mdformat_frontmatter-2.1.2.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c9c3159c38407f47e567202749c74ce7680017516cd158c82400f015c6a01d1
|
|
BLAKE2b-256 checksum How to use checksums |
4d90ae8a3d20066295367d9048ad480bcde3afe694eb592fec9c35bbdb7d68eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logRelease files / mdformat_frontmatter-2.1.2-py3-none-any.whl
| Download URL | mdformat_frontmatter-2.1.2-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcbb1dd7e35ce4387603acd32f2c092dd4518bbfaa2a4b801a0f29a4e69bf2ca
|
|
BLAKE2b-256 checksum How to use checksums |
53a020b6f53593139d8b64fa8e7f750033fbb580c096c241cd551b59907e6abe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency log