From 017da70a0b9c013f2a37a28d7ab2dd0b7201009d Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 15 Jun 2024 16:05:30 -0700 Subject: [PATCH] Ensure consistent use of method instead of variable --- .../en/content-management/cross-references.md | 2 +- content/en/content-management/data-sources.md | 2 +- content/en/content-management/shortcodes.md | 18 ++--- .../content-management/syntax-highlighting.md | 2 +- content/en/content-management/taxonomies.md | 4 +- content/en/functions/collections/KeyVals.md | 2 +- content/en/functions/fmt/Errorf.md | 2 +- content/en/functions/images/UnsharpMask.md | 6 +- content/en/methods/shortcode/Get.md | 20 ++--- content/en/methods/shortcode/IsNamedParams.md | 4 +- content/en/methods/shortcode/Name.md | 8 +- content/en/methods/shortcode/Ordinal.md | 2 +- content/en/methods/shortcode/Params.md | 6 +- content/en/methods/shortcode/Parent.md | 6 +- content/en/methods/shortcode/Position.md | 8 +- content/en/templates/embedded.md | 2 +- content/en/templates/homepage.md | 11 +-- content/en/templates/lists/index.md | 24 +----- content/en/templates/section-templates.md | 2 +- content/en/templates/shortcode-templates.md | 77 +++++++++---------- content/en/templates/single-page-templates.md | 8 -- content/en/templates/taxonomy-templates.md | 47 +++-------- content/en/troubleshooting/performance.md | 2 +- 23 files changed, 99 insertions(+), 166 deletions(-) diff --git a/content/en/content-management/cross-references.md b/content/en/content-management/cross-references.md index e5acb9d9a..24da0bfda 100644 --- a/content/en/content-management/cross-references.md +++ b/content/en/content-management/cross-references.md @@ -16,7 +16,7 @@ The `ref` and `relref` shortcodes display the absolute and relative permalinks t ## Use of `ref` and `relref` -The `ref` and `relref` shortcodes require a single parameter: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site. +The `ref` and `relref` shortcodes require a single argument: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site. ```text . diff --git a/content/en/content-management/data-sources.md b/content/en/content-management/data-sources.md index 9d1ec66ca..0ebc8466b 100644 --- a/content/en/content-management/data-sources.md +++ b/content/en/content-management/data-sources.md @@ -104,7 +104,7 @@ Use data sources to augment existing content. For example, create a shortcode to {{ errorf "The %q shortcode was unable to find %s. See %s" $.Name $file $.Position }} {{ end }} {{ else }} - {{ errorf "The %q shortcode requires one positional parameter, the path to the CSV file relative to the assets directory. See %s" .Name .Position }} + {{ errorf "The %q shortcode requires one positional argument, the path to the CSV file relative to the assets directory. See %s" .Name .Position }} {{ end }} {{< /code >}} diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md index f1bfe8088..87c9f0825 100644 --- a/content/en/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -27,9 +27,9 @@ In addition to cleaner Markdown, shortcodes can be updated any time to reflect n {{< youtube 2xkNJL4gJ9E >}} -In your content files, a shortcode can be called by calling `{{%/* shortcodename parameters */%}}`. Shortcode parameters are space delimited, and parameters with internal spaces can be quoted. +In your content files, a shortcode can be called by calling `{{%/* shortcodename arguments */%}}`. Shortcode arguments are space delimited, and arguments with internal spaces must be quoted. -The first word in the shortcode declaration is always the name of the shortcode. Parameters follow the name. Depending upon how the shortcode is defined, the parameters may be named, positional, or both, although you can't mix parameter types in a single call. The format for named parameters models that of HTML with the format `name="value"`. +The first word in the shortcode declaration is always the name of the shortcode. Arguments follow the name. Depending upon how the shortcode is defined, the arguments may be named, positional, or both, although you can't mix argument types in a single call. The format for named arguments models that of HTML with the format `name="value"`. Some shortcodes use or require closing shortcodes. Again like HTML, the opening and closing shortcodes match (name only) with the closing declaration, which is prepended with a slash. @@ -45,9 +45,9 @@ Here are two examples of paired shortcodes: The examples above use two different delimiters, the difference being the `%` character in the first and the `<>` characters in the second. -### Shortcodes with raw string parameters +### Shortcodes with raw string arguments -You can pass multiple lines as parameters to a shortcode by using raw string literals: +You can pass multiple lines as arguments to a shortcode by using raw string literals: ```go-html-template {{HTML, @@ -82,7 +82,7 @@ To override Hugo's embedded `figure` shortcode, copy the [source code] to a file [source code]: {{% eturl figure %}} {{% /note %}} -The `figure` shortcode can use the following named parameters: +The `figure` shortcode can use the following named arguments: src : URL of the image to be displayed. @@ -91,10 +91,10 @@ link : If the image needs to be hyperlinked, URL of the destination. target -: Optional `target` attribute for the URL if `link` parameter is set. +: Optional `target` attribute for the URL if `link` argument is set. rel -: Optional `rel` attribute for the URL if `link` parameter is set. +: Optional `rel` attribute for the URL if `link` argument is set. alt : Alternate text for the image if the image cannot be displayed. @@ -380,7 +380,7 @@ Rendered: {{< vimeo 55073825 >}} {{% note %}} -If you want to further customize the visual styling, add a `class` parameter when calling the shortcode. The new `class` will be added to the `
` that wraps the `