Remove superfluous shortcode param

This commit is contained in:
Joe Mooring authored and Joe Mooring committed 2023-11-07 14:06:01 -08:00
1 parent 2a0544757c
commit 45ec53fe00
27 files changed
+49 -49

No files matched your search

+4 -4
View File
@@ -22,13 +22,13 @@ Some shortcodes support positional parameters, some support named parameters, an
This shortcode call uses positional parameters:
{{< code file="content/about.md" lang=md copy=false >}}
{{< code file="content/about.md" lang=md >}}
{{</* myshortcode "Hello" "world" */>}}
{{< /code >}}
To retrieve parameters by position:
{{< code file="layouts/shortcodes/myshortcode.html" lang=go-html-template copy=false >}}
{{< code file="layouts/shortcodes/myshortcode.html" lang=go-html-template >}}
{{ printf "%s %s." (.Get 0) (.Get 1) }} → Hello world.
{{< /code >}}
@@ -36,13 +36,13 @@ To retrieve parameters by position:
This shortcode call uses named parameters:
{{< code file="content/about.md" lang=md copy=false >}}
{{< code file="content/about.md" lang=md >}}
{{</* myshortcode greeting="Hello" firstName="world" */>}}
{{< /code >}}
To retrieve parameters by name:
{{< code file="layouts/shortcodes/myshortcode.html" lang=go-html-template copy=false >}}
{{< code file="layouts/shortcodes/myshortcode.html" lang=go-html-template >}}
{{ printf "%s %s." (.Get "greeting") (.Get "firstName") }} → Hello world.
{{< /code >}}