mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 18:15:57 +00:00
Cleanup shortcode calls
This commit is contained in:
1 parent
c9247e98d6
commit
903b42ebc9
75 files changed
+196
-196
No files matched your search
@@ -15,7 +15,7 @@ action:
|
||||
|
||||
This content:
|
||||
|
||||
{{< code file="content/services.md" lang=md >}}
|
||||
{{< 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 >}}
|
||||
{{< 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 >}}
|
||||
{{< 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 >}}
|
||||
{{< code file=content/services.md lang=md >}}
|
||||
{{%/* card title="Product Design" */%}}
|
||||
We design the **best** widgets in the world.
|
||||
{{%/* /card */%}}
|
||||
@@ -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 >}}
|
||||
{{< code file=layouts/shortcodes/card.html lang=go-html-template >}}
|
||||
<div class="card">
|
||||
{{ with .Get "title" }}
|
||||
<div class="card-title">{{ . }}</div>
|
||||
|
||||
Reference in new issue
Block a user