Remove superfluous shortcode param

This commit is contained in:
Joe Mooring
2023-11-07 14:06:01 -08:00
committed by Joe Mooring
parent 2a0544757c
commit 45ec53fe00
27 changed files with 49 additions and 49 deletions
+6 -6
View File
@@ -15,7 +15,7 @@ action:
This content:
{{< code file="content/services.md" lang=md copy=false >}}
{{< code file="content/services.md" lang=md >}}
{{</* card title="Product Design" */>}}
We design the **best** widgets in the world.
{{</* /card */>}}
@@ -23,7 +23,7 @@ We design the **best** widgets in the world.
With this shortcode:
{{< code file="layouts/shortcodes/card.html" lang=go-html-template copy=false >}}
{{< code file="layouts/shortcodes/card.html" lang=go-html-template >}}
<div class="card">
{{ with .Get "title" }}
<div class="card-title">{{ . }}</div>
@@ -62,7 +62,7 @@ Let's modify the example above to pass the value returned by `Inner` through the
[`RenderString`]: /methods/page/renderstring
{{< code file="layouts/shortcodes/card.html" lang=go-html-template copy=false >}}
{{< code file="layouts/shortcodes/card.html" lang=go-html-template >}}
<div class="card">
{{ with .Get "title" }}
<div class="card-title">{{ . }}</div>
@@ -93,7 +93,7 @@ You can use the [`markdownify`] function instead of the `RenderString` method, b
Instead of calling the shortcode with the `{{</* */>}}` notation, use the `{{%/* */%}}` notation:
{{< code file="content/services.md" lang=md copy=false >}}
{{< code file="content/services.md" lang=md >}}
{{%/* card title="Product Design" */%}}
We design the **best** widgets in the world.
{{%/* /card */%}}
@@ -103,7 +103,7 @@ When you use the `{{%/* */%}}` notation, Hugo renders the entire shortcode as ma
First, configure the renderer to allow raw HTML within markdown:
{{< code-toggle file=hugo copy=false >}}
{{< code-toggle file=hugo >}}
[markup.goldmark.renderer]
unsafe = true
{{< /code-toggle >}}
@@ -112,7 +112,7 @@ This configuration is not unsafe if _you_ control the content. Read more about H
Second, because we are rendering the entire shortcode as markdown, we must adhere to the rules governing [indentation] and inclusion of [raw HTML blocks] as provided in the [CommonMark] specification.
{{< code file="layouts/shortcodes/card.html" lang=go-html-template copy=false >}}
{{< code file="layouts/shortcodes/card.html" lang=go-html-template >}}
<div class="card">
{{ with .Get "title" }}
<div class="card-title">{{ . }}</div>