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

+9 -8
View File
@@ -1,19 +1,20 @@
---
title: Position
description: Returns the filename and position from which the shortcode was called.
description: Returns the file name and position from which the shortcode was called.
categories: []
keywords: []
action:
related:
- methods/shortcode/Name
- functions/fmt/Errorf
returnType: text.Position
signatures: [SHORTCODE.Position]
params:
functions_and_methods:
related:
- methods/shortcode/Name
- functions/fmt/Errorf
returnType: text.Position
signatures: [SHORTCODE.Position]
---
The `Position` 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 = . }}