Skip to content

Conversation

@mfontanini
Copy link
Owner

@mfontanini mfontanini commented Jan 23, 2025

This adds supports for markdown alerts (github/gitlab style) as support for these was recently added to comrak. This for now looks close a block quote except it also contains a title colored the same color as the vertical bar prefix that shows up on the left of the block quote.

See kivikakk/comrak#519 and kivikakk/comrak#521 for syntax but basically this:

> [!note]
> this is a note

> [!tip]
> this is a tip

> [!important]
> this is important

> [!warning]
> this is warning!

> [!caution]
> this advises caution!

>>> [!note] other title
ez
multiline
>>>

Renders like this:

image

@mfontanini mfontanini merged commit f6df7aa into master Jan 23, 2025
6 checks passed
@mfontanini mfontanini deleted the feat/alerts branch January 23, 2025 02:05
mfontanini added a commit that referenced this pull request Feb 1, 2025
This is a follow up on #423 that adds symbols before the title of alert
type elements. The structure of the theme changed a bit to be able to
pack the styles for each alert type into a single type.

This causes the following presentation:

```markdown
> [!note]
> this is a note

> [!tip]
> this is a tip

> [!important]
> this is important

> [!warning]
> this is warning!

> [!caution]
> this advises caution!

>>> [!note] other title
ez
multiline
>>>
```

To render like this:


![image](https://github.com/user-attachments/assets/ce90a4e0-7543-4100-83b2-5f8d86f4cbe2)
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.

2 participants