mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 08:18:30 +00:00
content: Consolidate configuration documentation
This commit is contained in:
1 parent
727ef6f665
commit
b6cae5cbc6
911 files changed
+10902
-11171
No files matched your search
@@ -3,13 +3,13 @@ title: Get
|
||||
description: Returns the value of the given argument.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/shortcode/IsNamedParams
|
||||
- methods/shortcode/Params
|
||||
returnType: any
|
||||
signatures: [SHORTCODE.Get ARG]
|
||||
toc: true
|
||||
params:
|
||||
functions_and_methods:
|
||||
related:
|
||||
- methods/shortcode/IsNamedParams
|
||||
- methods/shortcode/Params
|
||||
returnType: any
|
||||
signatures: [SHORTCODE.Get ARG]
|
||||
---
|
||||
|
||||
Specify the argument by position or by name. When calling a shortcode within Markdown, use either positional or named argument, but not both.
|
||||
@@ -22,13 +22,13 @@ Some shortcodes support positional arguments, some support named arguments, and
|
||||
|
||||
This shortcode call uses positional arguments:
|
||||
|
||||
{{< code file=content/about.md lang=md >}}
|
||||
{{< code file=content/about.md lang=text >}}
|
||||
{{</* myshortcode "Hello" "world" */>}}
|
||||
{{< /code >}}
|
||||
|
||||
To retrieve arguments by position:
|
||||
|
||||
{{< code file=layouts/shortcodes/myshortcode.html >}}
|
||||
{{< code file=layouts/shortcodes/myshortcode.html >}}
|
||||
{{ printf "%s %s." (.Get 0) (.Get 1) }} → Hello world.
|
||||
{{< /code >}}
|
||||
|
||||
@@ -36,13 +36,13 @@ To retrieve arguments by position:
|
||||
|
||||
This shortcode call uses named arguments:
|
||||
|
||||
{{< code file=content/about.md lang=md >}}
|
||||
{{< code file=content/about.md lang=text >}}
|
||||
{{</* myshortcode greeting="Hello" firstName="world" */>}}
|
||||
{{< /code >}}
|
||||
|
||||
To retrieve arguments by name:
|
||||
|
||||
{{< code file=layouts/shortcodes/myshortcode.html >}}
|
||||
{{< code file=layouts/shortcodes/myshortcode.html >}}
|
||||
{{ printf "%s %s." (.Get "greeting") (.Get "firstName") }} → Hello world.
|
||||
{{< /code >}}
|
||||
|
||||
|
||||
Reference in new issue
Block a user