mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 02:17:05 +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
@@ -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 = . }}
|
||||
|
||||
Reference in new issue
Block a user