mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 12:14:49 +00:00
Remove superfluous shortcode param
This commit is contained in:
1 parent
2a0544757c
commit
45ec53fe00
27 files changed
+49
-49
No files matched your search
@@ -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 >}}
|
||||
|
||||
|
||||
Reference in new issue
Block a user