Skip to content

Conversation

@boboqun
Copy link
Contributor

@boboqun boboqun commented Jan 23, 2026

  • normalize admonition types to lowercase (e.g., !!! Note -> ::: note) to match VitePress custom container expectations.
  • automatically strip dangling code fences from admonition content to prevent rendering errors caused by malformed markdown (e.g., in docs/coil/compose.md).

fix(docs): enhance mkdocs admonition support for unicode and stability

  • Relax regex to \S+ to support non-ASCII admonition types (e.g., !!! 注意).
  • Add specific mapping for !!! 注意 to render as ::: note 注意.
  • Normalize standard admonition types to lowercase (e.g., !!! Note -> ::: note).
  • Automatically strip dangling code fences from admonition content to fix rendering issues in files like docs/coil/compose.md.

- normalize admonition types to lowercase (e.g., `!!! Note` -> `::: note`) to match VitePress custom container expectations.
- automatically strip dangling code fences from admonition content to prevent rendering errors caused by malformed markdown (e.g., in `docs/coil/compose.md`).

Solution:
- Replaced the fixed `height` on `.card` with `min-height` to allow cards to grow dynamically with their content.
- Added a `line-height` to `.cardTitle` to ensure multi-line titles are legible.
- Introduced media queries (`@media`) to:
  - Decrease `padding` within `.cardContent` on smaller screens.
  - Scale down `font-size` for titles and descriptions on mobile viewports for a more balanced layout.
- Relax regex to `\S+` to support non-ASCII admonition types (e.g., `!!! 注意`).
- Add specific mapping for `!!! 注意` to render as `::: note 注意`.
- Normalize standard admonition types to lowercase (e.g., `!!! Note` -> `::: note`).
- Automatically strip dangling code fences from admonition content to fix rendering issues in files like `docs/coil/compose.md`.
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