GitHub Alerts
GitHub alerts let you highlight important information using a familiar blockquote syntax. The starlight-github-alerts plugin converts them into styled Starlight asides automatically.
Alert types
Section titled “Alert types”GitHub defines five alert types. Each one maps to a Starlight aside variant:
| GitHub Alert | Renders as Starlight | Appearance |
|---|---|---|
[!NOTE] | note | Blue info box |
[!TIP] | tip | Purple suggestion box |
[!IMPORTANT] | caution | Yellow warning box |
[!WARNING] | caution | Yellow warning box |
[!CAUTION] | danger | Red danger box |
Note that [!IMPORTANT] and [!WARNING] both render as the caution aside, while [!CAUTION] renders as the more severe danger aside.
Note → note
Section titled “Note → note”Tip → tip
Section titled “Tip → tip”Important → caution
Section titled “Important → caution”Warning → caution
Section titled “Warning → caution”Caution → danger
Section titled “Caution → danger”Syntax
Section titled “Syntax”The syntax mirrors what you’d write in a GitHub issue or PR:
> [!NOTE]> Your note content here.
> [!TIP]> Your tip content here.Alerts with rich content
Section titled “Alerts with rich content”Alerts support full Markdown inside them:
Customizing the mapping
Section titled “Customizing the mapping”The plugin accepts options to change which Starlight aside each alert type renders as. The defaults are:
starlightGitHubAlerts({ types: { note: "note", // blue tip: "tip", // purple important: "caution", // yellow warning: "caution", // yellow caution: "danger", // red },});Each value can be 'note', 'tip', 'caution', or 'danger'.