hugo-fixit / FixIt

🔧 A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://fixit.lruihao.cn
MIT License
656 stars 96 forks source link

[FEATURE] Add support for simpler admonition sytax #406

Closed HCPlantern closed 2 weeks ago

HCPlantern commented 8 months ago

Describe the feature you want 描述你的功能需求

希望能够简化 admonition 的语法,或者提供另一个语法选择。

现在的语法:

{{< admonition tip "This is a tip" false >}}
一个 **技巧** 横幅
{{< /admonition >}}

希望能够提供的语法:

> [!tip]- This is a tip
> 一个 **技巧** 横幅

Useful reference 有价值的参考

可以参考 Obsidian 的 callout 语法:https://help.obsidian.md/Editing+and+formatting/Callouts

HCPlantern commented 1 month ago

补充一下,Github 目前也已支持这种语法,见 https://github.com/orgs/community/discussions/16925

Lruihao commented 1 month ago

补充一下,Github 目前也已支持这种语法,见 https://github.com/orgs/community/discussions/16925

我有关注到这个,只是一直没有时间来开发这个需求。

Lruihao commented 2 weeks ago

Hugo 已支持 blockquote render hook,这个需求的实现将变得非常简单。

https://gohugo.io/render-hooks/blockquotes/

Lruihao commented 2 weeks ago

已支持,详见文档 https://fixit.lruihao.cn/documentation/content-management/markdown-syntax/extended/#alerts