rothsandro / eleventy-notes

A template for Eleventy to publish your personal notes or docs.
https://eleventy-notes.sandroroth.com/
138 stars 16 forks source link

Suggestion: add support for markdown-it-containers #46

Closed web0174 closed 9 months ago

web0174 commented 9 months ago

Hi, it would be nice if you could add support for markdown-it-containers. (or something similar....) Almost all documentation generators have them and they are useful for attracting attention. They also give a more professional look to the site. I did a little test and it seems to work, but if you decide to add them, you will know what is the best way to do it. ( 🙏 sorry for my English, I hope I managed to make myself understood). Ciao 👋🏻.

Schermata 2024-01-26 alle 15 24 12

rothsandro commented 9 months ago

I agree that this would be useful.

Syntax

There are two different syntaxes. The ::: syntax is used by VitePress and Docusaurus. Both of them render a title inside the container but the plugin you mentioned doesn't.

::: info
Hello
:::

The alternative syntax is using blockquotes + ![type], which is used by GitHub and Obsidian.

> [!note]
> Hello

This is how it looks like on GitHub:

[!NOTE] This is an example (read this on github.com)

I don't have a strong opinion on the syntax itself but I think the blockquote syntax would be a better match in this case. I try to be compatible with Obsidian stuff when possible and many users will likely host their content on GitHub.

Do you have a strong opinion or need for the ::: syntax or custom containers without a title? If not, I will see if I can implement the blockquote syntax.

web0174 commented 9 months ago

Hi, I don't have any preferences about the syntax. Aesthetically I really like the GitHub style, in fact in the second test I did I was inspired by that.

test-2

However, I believe that the best choice is the one you consider most used and compatible. Thank you 👋🏻

rothsandro commented 9 months ago

Feature shipped 🎉 Eleventy Notes v0.22.0 now supports callouts. Read more about it in the docs.

web0174 commented 9 months ago

Hello, great job thank you very much. 👍