mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
bfa7453792
71f739460content: Reformat procedures to use description lists instead of H3 elements420a78802content: Remove 21YunBox hosting guideabeea342fcontent: Add hosting guide for Vercel3aaca6c0acontent: Add hosting guide for Renderd77b06aa6content: Fix formatting82885415fcontent: Change build.sh file perms in Cloudflare hosting docs0569c68cacontent: Fix typo8f14be5dacontent: Remove duplicate list itemse76f17815misc: Fix typo in configuration for the Markdown linter32e450b7cmisc: Fix typo in configuration for the Markdown linter81bd0056amics: Update configuration for the Markdown linter480ae9014content: Improve file names in the PageInner descriptionb17999021content: Adjust Markdown to pass linter tests1d9d56897misc: Implement Markdown linter91fc34c58content: Miscellaneous editsb7c60ae0bcontent: Add admonition for outdated learning resources51b6df588misc: Activate stale action84a897f5fmisc: Implement stale action167ea9713content: Update GitHub Pages workflow example3672d9116misc: Use actions/checkout@v5 in workflows2f2b4c968misc: Update spellcheck configs55a8ff7aecontent: Fix typo36e3d7b7bAdjust sponsors51014e6b9content: Fix link37cfc093fcontent: Add Cloudflare Worker hosting instructions09862ffadcontent: Update hosting considerations related to GitInfo477f3e7c0misc: Update cspell config7a7bb4874content: Miscellaneous edits48486d5accontent: Remove Cloudflare Pages documentation382f8052dcontent: Remove KeyCDN documentation8ecbc985ccontent: Update hosting workflow files57fd362bfcontent: Clarify applicability of the slug front matter field0dcfff9c7content: Update directory-structure.md58e3609a0content: Fix typo22fb43695content: Fix search/replace errorsfba8342a8content: Fix missing link refs97e035006Update netlify.toml6ab5ae6dfcontent: Improve GitLab Pages compression performance172bfbc4bcontent: Differentiate content view templates from other templates978770fc8content: Clarify handling of goldmark extensions conflictcb74aa4c7content: Improve Codeberg Pages hosting instructions794477792content: Add custom domain instructions to Codeberg Pages setup235fac27dcontent: Improve description of code block render hook options map35a507d31content: Improve WP2Hugo description8191f4dcfcontent: Improve WP2Hugo description25cca30fdcontent: Fix typee955652aecontent: Improve base template description922aa91bdcontent: Improve description of partial lookup logic072536ef6content: Update template type documentation5bf153531Update netlify.tomlcdd20a433content: Indicate language sort order for relevant page methodsfc9a868c9content: Add Sitepins to list of commercial CMS platformsb6077449ccontent: Update version referencesb71388caccontent: Fix typoc27dfdef3content: Move link referenced008ea6accontent: Fix typo040f14a3ccontent: Fix typo1ac119d26content: Fix typoa5a4fa907content: More updates for v0.148.0b7247a8eacontent: Remove command chaining from GitHub Actions workflow6ecb96bcdcontent: Updates for v0.148.0aea9e4c29netlify: Update Hugo version4e71546d1Add Ancestors (plural) method to GitInfo, rename Ancestor field to Parent68620a6c2source: Expose Ancestor in GitInfo git-subtree-dir: docs git-subtree-split:71f739460f
805 B
805 B
title, description, categories, keywords, params
| title | description | categories | keywords | params | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| IsNamedParams | Reports whether the shortcode call uses named arguments. |
|
To support both positional and named arguments when calling a shortcode, use the IsNamedParams method to determine how the shortcode was called.
With this shortcode template:
{{ if .IsNamedParams }}
{{ printf "%s %s." (.Get "greeting") (.Get "firstName") }}
{{ else }}
{{ printf "%s %s." (.Get 0) (.Get 1) }}
{{ end }}
Both of these calls return the same value:
{{</* myshortcode greeting="Hello" firstName="world" */>}}
{{</* myshortcode "Hello" "world" */>}}