Skip to content

feat: GitHub-style markdown alerts as callouts - #404

Open
Ibochkarev wants to merge 2 commits into
modxorg:masterfrom
Ibochkarev:feature/github-alerts-admonitions
Open

feat: GitHub-style markdown alerts as callouts#404
Ibochkarev wants to merge 2 commits into
modxorg:masterfrom
Ibochkarev:feature/github-alerts-admonitions

Conversation

@Ibochkarev

Copy link
Copy Markdown
Contributor

What does it do?

Renders GitHub-style alert blockquotes as the existing .c-callout UI:

  • [!NOTE] → info
  • [!TIP] → success
  • [!IMPORTANT] → warning
  • [!WARNING] / [!CAUTION] → alert

Optional spaces in the marker ([! NOTE]) work. Nested markdown inside the alert is preserved (parsed by CommonMark first, then rewritten).

Adds unit tests and documents the syntax in the README. Also adds phpunit/phpunit as a require-dev dependency so composer test / ./vendor/bin/phpunit can run.

Why is it needed?

  • DocsApp #353 asked for modern markdown admonitions
  • Docs #40 asked for visual NOTE/WARNING/TIP/IMPORTANT tags (that part belongs in DocsApp)

Site-wide docs changelog UI is not in this PR. Per-page git history already exists via the history index; a dedicated changelog feed can be a follow-up.

Related issue(s)/PR(s)

Convert > [!NOTE|TIP|IMPORTANT|WARNING|CAUTION] blockquotes into
existing .c-callout markup after CommonMark. Addresses DocsApp modxorg#353
and the visual-tag part of modxorg/Docs#40.
@Ibochkarev

Copy link
Copy Markdown
Contributor Author

@Mark-H please check

@Mark-H

Mark-H commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

This will likely need to be rebuilt on the major-maintenance branch as that has incorporated a ton of other work related to the dependencies. https://github.com/modxorg/DocsApp/tree/major-maintenance

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.

Add modern markdown tags

2 participants