From 85ae97b81e7b5193e2dd75bfe8eae77edd72d6d4 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 8 Mar 2024 07:37:16 -0800 Subject: [PATCH] Miscellaneous edits towards the goal of consisent language See #2196 --- content/en/content-management/formats.md | 4 +-- content/en/content-management/front-matter.md | 2 +- .../image-processing/index.md | 22 +++++++------ content/en/content-management/multilingual.md | 2 +- content/en/content-management/shortcodes.md | 11 +------ content/en/content-management/summaries.md | 11 ++++--- content/en/content-management/toc.md | 33 +++++-------------- content/en/getting-started/glossary.md | 2 +- content/en/getting-started/usage.md | 2 +- content/en/methods/resource/Exif.md | 2 +- content/en/templates/embedded.md | 4 +-- content/en/templates/introduction.md | 6 ++-- content/en/templates/menu-templates.md | 2 +- content/en/templates/output-formats.md | 10 ++++-- content/en/templates/shortcode-templates.md | 31 ++++++++--------- content/en/templates/taxonomy-templates.md | 5 +-- content/en/templates/views.md | 10 ++---- 17 files changed, 68 insertions(+), 91 deletions(-) diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index 38a073c1abc..dd24fc0c49b 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -24,14 +24,14 @@ The current list of content formats in Hugo: | Name | Markup identifiers | Comment | | ------------- | ------------- |-------------| -| Goldmark | `markdown`, `goldmark` |Note that you can set the default handler of `md` and `Markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).| +| Goldmark | `markdown`, `goldmark` |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).| |Emacs Org-Mode|`org`|See [go-org](https://github.com/niklasfasching/go-org).| |AsciiDoc|`asciidocext`, `adoc`, `ad`|Needs [Asciidoctor][ascii] installed.| |RST|`rst`|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.| |Pandoc|`pandoc`, `pdc`|Needs [Pandoc](https://www.pandoc.org/) installed.| |HTML|`html`, `htm`|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.| -The `markup identifier` is fetched from either the `markup` variable in front matter or from the file extension. For markup-related configuration, see [Configure Markup](/getting-started/configuration-markup/). +The `markup` identifier is fetched from either the `markup` field in front matter or from the file extension. For markup-related configuration, see [Configure Markup](/getting-started/configuration-markup/). ## External helpers diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index fc54ad3f657..384b6189a63 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -305,7 +305,7 @@ genres = ['mystery','romance'] author = 'John Smith' {{< /code-toggle >}} -You can add taxonomy terms to the front matter of any these [page kinds]: +You can add taxonomy terms to the front matter of any these [page kinds]: - `home` - `page` diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index a28e51c5352..292aa8a4d5e 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -249,19 +249,21 @@ You may also access EXIF fields individually, using the [`lang.FormatNumber`] fu {{ end }} ``` -#### EXIF variables +#### EXIF methods -.Date -: Image creation date/time. Format with the [time.Format] function. +Date +: (`time.Time`) Returns the image creation date/time. Format with the [`time.Format`]function. -.Lat -: GPS latitude in degrees. +[time.Format]: /functions/time/format/ + +Lat +: (`float64`) Returns the GPS latitude in degrees. -.Long -: GPS longitude in degrees. +Long +: (`float64`) Returns the GPS longitude in degrees. -.Tags -: A collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration](#exif-data). +Tags +: (`exif.Tags`) Returns a collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration]. ## Image processing options @@ -500,7 +502,7 @@ If you change image processing methods or options, or if you rename or remove im hugo --gc ``` -[time.Format]: /functions/time/format/ + [`anchor`]: /content-management/image-processing#anchor [mounted]: /hugo-modules/configuration#module-configuration-mounts [page bundle]: /content-management/page-bundles/ diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index 153f338d378..0e6edee8fc0 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -587,7 +587,7 @@ To support Multilingual mode in your themes, some considerations must be taken f * Come from the built-in `.Permalink` or `.RelPermalink` * Be constructed with the [`relLangURL`] or [`absLangURL`] template function, or be prefixed with `{{ .LanguagePrefix }}` -If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites). +If there is more than one language defined, the `LanguagePrefix` method will return `/en` (or whatever the current language is). If not enabled, it will be an empty string (and is therefor harmless for single-language Hugo websites). ## Generate multilingual content with `hugo new content` diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md index 93487af5c6b..a183c6fd411 100644 --- a/content/en/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -68,7 +68,7 @@ The `<` character indicates that the shortcode's inner content does *not* need f ### Nested shortcodes -You can call shortcodes within other shortcodes by creating your own templates that leverage the `.Parent` variable. `.Parent` allows you to check the context in which the shortcode is being called. See [Shortcode templates][sctemps]. +You can call shortcodes within other shortcodes by creating your own templates that leverage the `.Parent` method. `.Parent` allows you to check the context in which the shortcode is being called. See [Shortcode templates][sctemps]. ## Embedded shortcodes @@ -443,19 +443,10 @@ To learn how to configure your Hugo site to meet the new EU privacy regulation, To learn more about creating custom shortcodes, see the [shortcode template documentation]. -[`figure` shortcode]: #figure -[contentmanagementsection]: /content-management/formats/ -[examplegist]: https://gist.github.com/spf13/7896402 -[figureelement]: https://html5doctor.com/the-figure-figcaption-elements/ [Hugo and the GDPR]: /about/hugo-and-gdpr/ -[Instagram]: https://www.instagram.com/ -[pagevariables]: /methods/page/ [partials]: /templates/partials/ [quickstart]: /getting-started/quick-start/ [sctemps]: /templates/shortcode-templates/ -[scvars]: /methods/shortcode/ [shortcode template documentation]: /templates/shortcode-templates/ -[templatessection]: /templates/ [Vimeo]: https://vimeo.com/ [YouTube Videos]: https://www.youtube.com/ -[YouTube Input shortcode]: #youtube diff --git a/content/en/content-management/summaries.md b/content/en/content-management/summaries.md index c70385e757e..8a853ac5064 100644 --- a/content/en/content-management/summaries.md +++ b/content/en/content-management/summaries.md @@ -13,9 +13,7 @@ toc: true aliases: [/content/summaries/,/content-management/content-summaries/] --- - - -With the use of the `.Summary` [page variable][pagevariables], Hugo generates summaries of content to use as a short version in summary views. +With the use of the [`Summary`] method on `Page` object, Hugo generates summaries of content to use as a short version in summary views. ## Summary splitting options @@ -23,7 +21,7 @@ With the use of the `.Summary` [page variable][pagevariables], Hugo generates su * Manual Summary Split * Front Matter Summary -It is natural to accompany the summary with links to the original content, and a common design pattern is to see this link in the form of a "Read More ..." button. See the `.RelPermalink`, `.Permalink`, and `.Truncated` [page variables][pagevariables]. +It is natural to accompany the summary with links to the original content, and a common design pattern is to see this link in the form of a "Read More ..." button. See the [`RelPermalink`], [`Permalink`], and [`Truncated`] methods. ### Automatic summary splitting @@ -105,6 +103,9 @@ You can show content summaries with the following code. You could use the follow Note how the `.Truncated` boolean variable value may be used to hide the "Read More..." link when the content is not truncated; i.e., when the summary contains the entire article. +[`Permalink`]: /methods/page/permalink/ +[`RelPermalink`]: /methods/page/relpermalink/ +[`Summary`]: /methods/page/summary/ +[`Truncated`]: /methods/page/truncated/ [org]: /content-management/formats/ -[pagevariables]: /methods/page/ [section template]: /templates/section-templates/ diff --git a/content/en/content-management/toc.md b/content/en/content-management/toc.md index 2ff9c81bfc5..fbd24e538ab 100644 --- a/content/en/content-management/toc.md +++ b/content/en/content-management/toc.md @@ -42,7 +42,7 @@ A collection of textile samples lay spread out on the table - Samsa was a travel Hugo will take this Markdown and create a table of contents from `## Introduction`, `## My Heading`, and `### My Subheading` and then store it in the [page variable][pagevars]`.TableOfContents`. -The built-in `.TableOfContents` variables outputs a `