satnaing / astro-paper

A minimal, accessible and SEO-friendly Astro blog theme
https://astro-paper.pages.dev/
MIT License
2.39k stars 502 forks source link

Feature Request: Add admonitions/call-outs support. #254

Open everonegraham opened 8 months ago

everonegraham commented 8 months ago

Hi there,

I'm not sure if this is a limitation of the markdown library being used or not. How can we add admonitions/call-outs to our .md files?

The callouts show up in VSCode when using their test preview. But when rendered, it doesn't.

eg:

[!Note] Note This is a note.

image

Cheers.

benjaminrae commented 8 months ago

Astro content supports remark and rehype plugins, there is a remark-admonitions plugin but it doesn't seem to be maintained. You could try remark-directive

everonegraham commented 8 months ago

Oh, thanks for pointing that out. I'll give it a try.

everonegraham commented 8 months ago

I do prefer Obsidians style for callouts though.

everonegraham commented 8 months ago

Updated this to be a feature request.

cswpy commented 8 months ago

I recently bumped into the same issue. I am writing all my blog articles locally in Obsidian so Obsidian-flavored callout is preferred. Right now I am using this gz-remark-callout plugin to show the callouts. However, its "blockquote"-based implementation is a bit awkward, and it's not easy to set up a consistent CSS styling for "div"-based container for beginners like me. It would be great to see Astro Paper could support callout natively.

kzshantonu commented 7 months ago

Have to +1 this

satnaing commented 1 month ago

I'll look into it. The thing is, I'm not very familiar with the remark plugin ecosystem, but I'll give it a try in future releases. (tho I can't guarantee yet)

vagrant-soul commented 1 month ago

Here's one someone else wrote, not sure if it's somewhat informative link image