mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 18:15:57 +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,17 +3,18 @@ title: Name
|
||||
description: Returns the shortcode file name, excluding the file extension.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/shortcode/Position
|
||||
- functions/fmt/Errorf
|
||||
returnType: string
|
||||
signatures: [SHORTCODE.Name]
|
||||
params:
|
||||
functions_and_methods:
|
||||
related:
|
||||
- methods/shortcode/Position
|
||||
- functions/fmt/Errorf
|
||||
returnType: string
|
||||
signatures: [SHORTCODE.Name]
|
||||
---
|
||||
|
||||
The `Name` method is useful for error reporting. For example, if your shortcode requires a "greeting" argument:
|
||||
|
||||
{{< code file=layouts/shortcodes/myshortcode.html >}}
|
||||
{{< code file=layouts/shortcodes/myshortcode.html >}}
|
||||
{{ $greeting := "" }}
|
||||
{{ with .Get "greeting" }}
|
||||
{{ $greeting = . }}
|
||||
|
||||
Reference in new issue
Block a user