{"id":16729063,"url":"https://github.com/kyleking/mdformat-admon","last_synced_at":"2025-10-10T19:42:57.830Z","repository":{"id":65729359,"uuid":"571207083","full_name":"KyleKing/mdformat-admon","owner":"KyleKing","description":"An mdformat plugin for \"python-markdown\" admonitions","archived":false,"fork":false,"pushed_at":"2024-12-16T13:26:32.000Z","size":155,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T00:48:13.998Z","etag":null,"topics":["mdformat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KyleKing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-27T14:09:18.000Z","updated_at":"2024-12-16T13:26:37.000Z","dependencies_parsed_at":"2024-01-15T03:16:36.004Z","dependency_job_id":"912a2167-60bb-4501-b61c-9cefd865f0b8","html_url":"https://github.com/KyleKing/mdformat-admon","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.08695652173913049,"last_synced_commit":"726262380659718b5d17cb9e9080858a7fa346f9"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":"executablebooks/mdformat-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleKing%2Fmdformat-admon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleKing%2Fmdformat-admon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleKing%2Fmdformat-admon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleKing%2Fmdformat-admon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KyleKing","download_url":"https://codeload.github.com/KyleKing/mdformat-admon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244874158,"owners_count":20524576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mdformat"],"created_at":"2024-10-12T23:13:11.446Z","updated_at":"2025-10-10T19:42:57.822Z","avatar_url":"https://github.com/KyleKing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdformat-admon\n\n[![Build Status][ci-badge]][ci-link] [![PyPI version][pypi-badge]][pypi-link]\n\n\u003c!-- [![codecov.io][cov-badge]][cov-link]\n[cov-badge]: https://codecov.io/gh/executablebooks/mdformat-admon/branch/main/graph/badge.svg\n[cov-link]: https://codecov.io/gh/executablebooks/mdformat-admon\n --\u003e\n\nAn [mdformat](https://github.com/executablebooks/mdformat) plugin for formatting [`python-markdown` `admonitions`](https://python-markdown.github.io/extensions/admonition) and rendering the associated HTML.\n\n\u003e [!WARNING]\n\u003e `mdformat-admon` and `mdformat-mkdocs\u003e=4.0.0` are no longer compatible. If you have both, you'll want to remove `mdformat-admon`\n\u003e\n\u003e The stylistic formatting for `mkdocs` differs from Python Markdown ([#22](https://github.com/KyleKing/mdformat-admon/pull/22)), so this package is now *only* for Python Markdown without mkdocs.\n\n## `mdformat` Usage\n\nAdd this package wherever you use `mdformat` and the plugin will be auto-recognized. No additional configuration necessary. See [additional information on `mdformat` plugins here](https://mdformat.readthedocs.io/en/stable/users/plugins.html)\n\n### Pre-Commit\n\n```yaml\nrepos:\n  - repo: https://github.com/executablebooks/mdformat\n    rev: 0.7.19\n    hooks:\n      - id: mdformat\n        additional_dependencies:\n          - mdformat-admon\n```\n\n### pipx/uv\n\n```sh\npipx install mdformat\npipx inject mdformat mdformat-admon\n```\n\nOr with uv:\n\n```sh\nuv tool run --from mdformat-admon mdformat\n```\n\n## HTML Rendering\n\nTo generate HTML output, `python_markdown_admon_plugin` can be imported from `mdit_plugins`. More plugins will be added in the future. For more guidance on `MarkdownIt`, see the docs: \u003chttps://markdown-it-py.readthedocs.io/en/latest/using.html#the-parser\u003e\n\n```py\nfrom markdown_it import MarkdownIt\nfrom mdformat_admon.mdit_plugins import python_markdown_admon_plugin\n\nmd = MarkdownIt()\nmd.use(python_markdown_admon_plugin)\n\ntext = '!!! note \"\"\\n    *content*'\nmd.render(text)\n# \u003cdiv class=\"admonition note\"\u003e\n# \u003cp\u003e\u003cem\u003econtent\u003c/em\u003e\u003c/p\u003e\n# \u003c/div\u003e\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/KyleKing/mdformat-admon/blob/main/CONTRIBUTING.md)\n\n[ci-badge]: https://github.com/kyleking/mdformat-admon/workflows/CI/badge.svg?branch=main\n[ci-link]: https://github.com/kyleking/mdformat-admon/actions?query=workflow%3ACI+branch%3Amain+event%3Apush\n[pypi-badge]: https://img.shields.io/pypi/v/mdformat-admon.svg\n[pypi-link]: https://pypi.org/project/mdformat-admon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyleking%2Fmdformat-admon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyleking%2Fmdformat-admon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyleking%2Fmdformat-admon/lists"}