Skip to content

fix(docs): enable admonition extension so !!! blocks render#214

Merged
lesnik512 merged 1 commit into
mainfrom
fix-docs-admonition-rendering
Jun 14, 2026
Merged

fix(docs): enable admonition extension so !!! blocks render#214
lesnik512 merged 1 commit into
mainfrom
fix-docs-admonition-rendering

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Problem

While verifying the docs site renders correctly after the UX audit work, I found a pre-existing site-wide bug: the admonition Markdown extension was never enabled in mkdocs.yml. Every !!! note / !!! warning / !!! caution block — used on 7 pages (to-1.x, to-2.x, alias, context, factories, lifecycle, fixtures) — rendered as literal text instead of a styled callout. As a downstream effect, code fences nested inside those admonitions (e.g. the context-propagation example) rendered as broken language-text blocks showing literal ```python.

Fix

Add admonition and the standard pymdownx.details pairing to markdown_extensions.

Verification (local mkdocs build --strict)

  • Build exit 0, no broken-link/nav warnings.
  • Before: 7 pages had literal <p>!!! … admonitions; context.md had 4 broken code fences.
  • After: 0 literal admonitions, 0 broken fences across all 32 pages; 14 admonition blocks and 11 tabbed code-sets render correctly.

🤖 Generated with Claude Code

The 'admonition' Markdown extension was never enabled, so every !!! note/
warning/caution across 7 pages rendered as literal text — and code fences
nested inside them broke (e.g. context.md). Add 'admonition' + the standard
'pymdownx.details' pairing. Verified: mkdocs --strict clean, 14 admonition
blocks and 11 tab-sets now render, no literal !!! or broken fences remain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit 5127ae3 into main Jun 14, 2026
6 checks passed
@lesnik512 lesnik512 deleted the fix-docs-admonition-rendering branch June 14, 2026 07:15
lesnik512 added a commit that referenced this pull request Jun 14, 2026
Adds a 'docs-build' just recipe (uvx + docs/requirements.txt, mkdocs build
--strict) and a 'docs' job to the reusable _checks workflow, so broken
links, missing nav entries, and config errors fail CI on every PR. CI
previously only ran lint + pytest and never built the docs, so the recent
admonition-extension regression (#214) would not have been caught.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lesnik512 added a commit that referenced this pull request Jun 14, 2026
Adds a 'docs-build' just recipe (uvx + docs/requirements.txt, mkdocs build
--strict) and a 'docs' job to the reusable _checks workflow, so broken
links, missing nav entries, and config errors fail CI on every PR. CI
previously only ran lint + pytest and never built the docs, so the recent
admonition-extension regression (#214) would not have been caught.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant