skillfed

mdformat-gfm-alerts

Format 'GitHub Markdown Alerts,' which use blockquotes to render admonitions

mdformat-gfm-alerts v2.1.0 169.4K downloads/30d#10,418 on PyPI9
Permissive license MIT Active released

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-alerts

uv

uv add mdformat-gfm-alerts

poetry

poetry add mdformat-gfm-alerts

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

github markdown alerts formattingmdformat gfm alerts pluginblockquote admonitions markdowngithub alerts syntax formattermarkdown alert standardizationgfm alerts mdformatgithub callout formatting
markdown-formattinggithub-alertsmdformat-plugin

More Python Modules packages