Skip to content

Comments

Add support for callout syntax (#1875)#1879

Closed
leandrobbraga wants to merge 1 commit intoastral-sh:mainfrom
leandrobbraga:mkdocs-callout
Closed

Add support for callout syntax (#1875)#1879
leandrobbraga wants to merge 1 commit intoastral-sh:mainfrom
leandrobbraga:mkdocs-callout

Conversation

@leandrobbraga
Copy link

@leandrobbraga leandrobbraga commented Dec 13, 2025

This resolves the issue of Markdown callouts not rendering in MkDocs.

I used https://github.com/sondregronas/mkdocs-callouts, which is compatible with the syntax already being used in this specific part of the documentation.

Before

image

After

image

Alternative Solution

An alternative solution would be to not add a new dependency and change the callout syntax in the original code. This was implemented in astral-sh/ruff#21961.

!!! warning "Deprecated"
    This option has been deprecated. Use `environment.root` instead.
image

Closes #1875

@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Dec 13, 2025
@leandrobbraga leandrobbraga marked this pull request as draft December 13, 2025 15:51
@leandrobbraga leandrobbraga marked this pull request as ready for review December 13, 2025 15:54
@leandrobbraga leandrobbraga marked this pull request as draft December 13, 2025 15:57
@leandrobbraga leandrobbraga changed the title Add support for GitHub's style callout syntax (#1875) Add support for callout syntax (#1875) Dec 13, 2025
@leandrobbraga leandrobbraga marked this pull request as ready for review December 13, 2025 16:02
@MichaReiser
Copy link
Member

Thank you. Do you know how this plugin is different from mkdocs-github-admonitions-plugin which we use in ruff

@leandrobbraga
Copy link
Author

leandrobbraga commented Dec 13, 2025

My understanding is that they serve similar purposes: mkdocs-callout converts from Obsidian’s format, and mkdocs-github-admonitions-plugin converts from GitHub’s format.

The issue is that the syntax used is > [!WARN] "Deprecated", which is compatible with Obsidian’s format but not GitHub’s. GitHub uses WARNING, not WARN, and it does not support titles such as "Deprecated."

I believe the better solution is to use the admonitions format directly: !!! warning "Deprecated". This format is already used throughout the codebase and does not introduce a new dependency.

Some examples:

!!! note "Added in Ruff `0.9.8`"

    The **Inline JSON configuration** option was introduced in Ruff `0.9.8`.

I’ve opened this alternative solution at astral-sh/ruff#21961.

@leandrobbraga leandrobbraga deleted the mkdocs-callout branch December 14, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-rendered callout in documentation

3 participants