Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add markdown alert support #423

Merged
merged 1 commit into from
Jan 23, 2025
Merged

feat: add markdown alert support #423

merged 1 commit into from
Jan 23, 2025

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.

1 participant