From d3eb723e24499dc124fb705f6060880ac4f81920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Tue, 9 Aug 2022 09:37:59 +0800 Subject: [PATCH] :lipstick: Make note short code support without icon style. --- exampleSite/content/post/shortcodes.md | 14 ++++++++++++-- layouts/shortcodes/note.html | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/exampleSite/content/post/shortcodes.md b/exampleSite/content/post/shortcodes.md index b103e6b..c6be592 100644 --- a/exampleSite/content/post/shortcodes.md +++ b/exampleSite/content/post/shortcodes.md @@ -44,10 +44,10 @@ url: "post/shortcodes.html" # 信息块 -支持 `default`,`info`,`success`,`warning`,`danger` 等五种不同效果的信息块展示,语法参考如下: +支持 `default`,`info`,`success`,`warning`,`danger` 等五种不同效果的展示,语法参考如下: ```markdown -{{}} +{{}} 书写表达的信息 支持 Markdown 语法 {{}} @@ -55,6 +55,16 @@ url: "post/shortcodes.html" 实际效果: +{{< note default no-icon >}} + ### Default Header without icon + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note default >}} + ### Default Header + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + {{< note info >}} ### Info Header **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index 6f15f99..a6d19e1 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -1,3 +1,3 @@ -
+
{{ .Inner | markdownify }}
\ No newline at end of file