mdformat-gfm-alerts
Format 'GitHub Markdown Alerts,' which use blockquotes to render admonitions
What it is and what it does
mdformat-gfm-alerts is a plugin that extends mdformat to recognize and format GitHub Flavored Markdown (GFM) Alerts—a GitHub-native syntax for rendering admonitions using blockquotes with alert markers like `[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, and `[!CAUTION]`. It ensures these alerts conform to GitHub's specification by normalizing their structure during markdown formatting.
The plugin works by integrating directly into mdformat's pipeline; once installed, it is automatically recognized and requires no additional configuration. By default, it follows strict GitHub behavior (folding custom titles into the alert body), but a `--custom-title` option allows preserving inline titles on the marker line for compatibility with other conventions like Hugo's alert syntax.
Use it for:
- Standardize GitHub alert syntax across a documentation repository to match GitHub's rendering behavior
- Auto-format markdown files in CI/CD pipelines using mdformat with consistent alert structure
- Convert or normalize alert blocks when migrating markdown between GitHub and other platforms
- Enforce alert formatting rules in pre-commit hooks alongside other markdown linting
- Integrate alert formatting into mdformat workflows without manual configuration
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A plugin for mdformat that formats GitHub Markdown Alerts (blockquote-based admonitions using `[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, `[!CAUTION]` syntax) according to GitHub's specification.
Yes, if you use mdformat and work with GitHub Markdown Alerts in your documentation. The plugin has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and integrates seamlessly into mdformat's workflow. Install it if you need consistent alert formatting; skip it if you don't use GFM alerts.
Install
mdformat-gfm-alerts on PyPI
pip
pip install mdformat-gfm-alertsuv
uv add mdformat-gfm-alertspoetry
poetry add mdformat-gfm-alertsInstalling mdformat-gfm-alerts
Before you install
Low install friction; pure Python wheel with only two runtime dependencies (mdformat and mdit-py-plugins). Active maintenance with a recent release 19 days ago.
License in practice
MIT license (permissive); you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
# Install alongside mdformat
pip install mdformat mdformat-gfm-alerts
# Format markdown files (plugin auto-recognized)
mdformat file.md
# Or import the plugin:
from mdformat_gfm_alerts.mdit_plugins import gfm_alerts_plugin
Requires Python >=3.10.0
Verify before relying
- Whether the plugin handles edge cases beyond the five canonical GitHub alert types
- Performance characteristics when formatting large markdown files with many alerts
- Full scope of HTML rendering capabilities and output format details
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — mdformat, mdit-py-plugins |
| Maintenance | actively maintained — 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 169,395/month — #10,418 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mdformat_gfm_alerts-2.1.0-py3-none-any.whl
Keywords: markdown, markdown-it, mdformat, mdformat_plugin_template
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
mdformat-gfmMdformat-gfm extends mdformat to format GitHub…
permissive · top 5,000 on PyPI
mdformat-mkdocsAn mdformat plugin that formats Markdown for…
permissive · top 15,000 on PyPI
mdformatMdformat is a CommonMark-compliant command-line…
permissive · top 5,000 on PyPI
mdformat_mystmdformat-myst is an mdformat plugin that…
permissive · top 15,000 on PyPI
mdformat-footnoteAdds footnote parsing and formatting support to…
permissive · top 15,000 on PyPI
mdformat-blackA plugin for mdformat that automatically…
permissive · top 15,000 on PyPI
mdformat-front-mattersA plugin for mdformat that normalizes YAML,…
permissive · top 15,000 on PyPI
markdown-calloutsAdds a cleaner block-level syntax to Markdown…
permissive · top 15,000 on PyPI
mdformat-ruffIntegrates ruff code formatting into mdformat…
permissive · top 15,000 on PyPI
mkdocs-github-admonitions-pluginA MkDocs plugin that converts GitHub-flavored…
permissive · top 15,000 on PyPI