content: Consolidate configuration documentation

This commit is contained in:
Joe Mooring authored and GitHub committed 2025-03-05 04:50:06 -08:00
1 parent 727ef6f665
commit b6cae5cbc6
911 files changed
+10902 -11171

No files matched your search

+8 -7
View File
@@ -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 = . }}