From b8d5383f719f4e8570c69f67bf13ab6d4ba34295 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 3 Feb 2024 14:57:43 -0800 Subject: [PATCH] Replace links to variable pages with links to method pages See #2196 --- content/en/about/features.md | 2 +- content/en/content-management/archetypes.md | 13 ++++--- .../en/content-management/build-options.md | 16 ++++----- content/en/content-management/diagrams.md | 2 +- content/en/content-management/front-matter.md | 36 +++++++++---------- .../image-processing/index.md | 6 ++-- content/en/content-management/multilingual.md | 22 ++++++------ .../content-management/organization/index.md | 2 +- content/en/content-management/sections.md | 5 ++- content/en/content-management/shortcodes.md | 4 +-- content/en/content-management/summaries.md | 2 +- content/en/content-management/toc.md | 2 +- content/en/contribute/documentation.md | 8 ++--- content/en/functions/collections/After.md | 4 +-- .../en/functions/collections/Complement.md | 2 +- content/en/functions/collections/First.md | 2 +- content/en/functions/collections/KeyVals.md | 2 +- .../en/functions/collections/NewScratch.md | 4 +-- content/en/functions/collections/Sort.md | 2 +- content/en/functions/collections/Where.md | 12 +++---- content/en/functions/compare/Default.md | 2 +- content/en/functions/data/GetCSV.md | 8 ++--- content/en/functions/data/GetJSON.md | 8 ++--- content/en/functions/diagrams/Goat.md | 2 +- content/en/functions/fmt/Errorf.md | 2 +- content/en/functions/fmt/Erroridf.md | 2 +- content/en/functions/fmt/Warnf.md | 2 +- content/en/functions/fmt/Warnidf.md | 2 +- content/en/functions/global/page.md | 4 +-- content/en/functions/go-template/define.md | 4 +-- content/en/functions/go-template/else.md | 6 ++-- content/en/functions/go-template/end.md | 10 +++--- content/en/functions/go-template/if.md | 2 +- content/en/functions/go-template/range.md | 8 ++--- content/en/functions/go-template/template.md | 2 +- content/en/functions/go-template/with.md | 2 +- content/en/functions/images/Config.md | 6 ++-- content/en/functions/images/Filter.md | 2 +- content/en/functions/images/Padding.md | 2 +- content/en/functions/images/Process.md | 2 +- .../images/_common/apply-image-filter.md | 4 +-- content/en/functions/inflect/Singularize.md | 2 -- .../en/functions/lang/FormatNumberCustom.md | 2 +- content/en/functions/math/Counter.md | 4 +-- content/en/functions/partials/Include.md | 6 ++-- .../en/functions/partials/IncludeCached.md | 2 +- content/en/functions/resources/ByType.md | 2 +- content/en/functions/resources/Concat.md | 6 ++-- .../functions/resources/ExecuteAsTemplate.md | 6 ++-- content/en/functions/resources/FromString.md | 12 +++---- content/en/functions/resources/Get.md | 2 +- content/en/functions/resources/GetMatch.md | 2 +- content/en/functions/resources/GetRemote.md | 6 ++-- content/en/functions/resources/Match.md | 2 +- content/en/functions/strings/CountRunes.md | 2 +- content/en/functions/strings/RuneCount.md | 2 +- content/en/functions/strings/Split.md | 2 +- content/en/functions/strings/Truncate.md | 2 +- content/en/functions/time/Duration.md | 2 +- content/en/functions/time/Now.md | 2 +- content/en/functions/time/ParseDuration.md | 2 +- .../en/functions/transform/HTMLUnescape.md | 2 +- content/en/functions/transform/Markdownify.md | 2 +- content/en/functions/transform/Unmarshal.md | 4 +-- content/en/functions/urls/JoinPath.md | 2 +- .../urls/_common/anchorize-vs-urlize.md | 4 +-- content/en/getting-started/configuration.md | 8 ++--- content/en/getting-started/glossary.md | 20 +++++------ content/en/getting-started/quick-start.md | 4 +-- .../_common/03-prebuilt-binaries.md | 2 +- ...next-prev-on-page-vs-next-prev-on-pages.md | 16 ++++----- content/en/methods/menu-entry/KeyName.md | 2 +- content/en/methods/menu-entry/Menu.md | 4 +-- content/en/methods/menu-entry/Name.md | 4 +-- content/en/methods/menu-entry/Page.md | 6 ++-- content/en/methods/menu-entry/Title.md | 4 +-- content/en/methods/menu-entry/URL.md | 2 +- content/en/methods/menu-entry/Weight.md | 2 +- content/en/methods/menu/ByName.md | 2 +- content/en/methods/menu/ByWeight.md | 2 +- content/en/methods/page/CodeOwners.md | 2 +- content/en/methods/page/Data.md | 2 +- content/en/methods/page/Date.md | 4 +-- content/en/methods/page/Description.md | 2 +- content/en/methods/page/ExpiryDate.md | 4 +-- content/en/methods/page/Fragments.md | 4 +-- content/en/methods/page/FuzzyWordCount.md | 2 +- content/en/methods/page/GetPage.md | 2 +- content/en/methods/page/HeadingsFiltered.md | 2 +- content/en/methods/page/InSection.md | 4 +-- content/en/methods/page/IsAncestor.md | 4 +-- content/en/methods/page/IsDescendant.md | 4 +-- content/en/methods/page/Keywords.md | 6 ++-- content/en/methods/page/Language.md | 2 +- content/en/methods/page/Lastmod.md | 6 ++-- content/en/methods/page/LinkTitle.md | 2 +- content/en/methods/page/NextInSection.md | 8 ++--- content/en/methods/page/Pages.md | 2 +- content/en/methods/page/Paginator.md | 2 +- content/en/methods/page/Params.md | 2 +- content/en/methods/page/Parent.md | 2 +- content/en/methods/page/PlainWords.md | 2 +- content/en/methods/page/PrevInSection.md | 8 ++--- content/en/methods/page/PublishDate.md | 4 +-- content/en/methods/page/RawContent.md | 4 +-- content/en/methods/page/RegularPages.md | 2 +- content/en/methods/page/Render.md | 4 +-- content/en/methods/page/Resources.md | 10 +++--- content/en/methods/page/Scratch.md | 4 +-- content/en/methods/page/Section.md | 4 +-- content/en/methods/page/Site.md | 2 +- content/en/methods/page/Store.md | 4 +-- content/en/methods/page/Summary.md | 2 +- content/en/methods/page/Title.md | 2 +- content/en/methods/page/Truncated.md | 2 +- content/en/methods/page/WordCount.md | 2 +- .../page/_common/output-format-definition.md | 2 +- content/en/methods/resource/Content.md | 2 +- content/en/methods/resource/Data.md | 4 +-- content/en/methods/resource/Err.md | 2 +- content/en/methods/resource/Exif.md | 2 +- content/en/methods/resource/Filter.md | 2 +- content/en/methods/resource/Key.md | 6 ++-- content/en/methods/resource/Params.md | 2 +- content/en/methods/resource/Process.md | 10 +++--- content/en/methods/shortcode/Inner.md | 8 ++--- content/en/methods/shortcode/InnerDeindent.md | 2 +- content/en/methods/shortcode/Ordinal.md | 2 +- content/en/methods/shortcode/Scratch.md | 2 +- content/en/methods/shortcode/Site.md | 2 +- content/en/methods/site/AllPages.md | 2 +- content/en/methods/site/BaseURL.md | 8 ++--- content/en/methods/site/Data.md | 4 +-- content/en/methods/site/DisqusShortname.md | 2 +- content/en/methods/site/GetPage.md | 2 +- content/en/methods/site/GoogleAnalytics.md | 2 +- content/en/methods/site/IsDevelopment.md | 2 +- content/en/methods/site/IsServer.md | 2 +- content/en/methods/site/Language.md | 6 ++-- content/en/methods/site/LastChange.md | 4 +-- content/en/methods/site/Lastmod.md | 4 +-- content/en/methods/site/Menus.md | 6 ++-- content/en/methods/site/Pages.md | 2 +- content/en/methods/site/Params.md | 2 +- content/en/methods/site/Taxonomies.md | 2 +- content/en/methods/taxonomy/Get.md | 2 +- .../taxonomy/_common/get-a-taxonomy-object.md | 8 ++--- .../ordered-taxonomy-element-methods.md | 2 +- content/en/methods/time/Format.md | 4 +-- content/en/quick-reference/emojis.md | 4 +-- .../en/quick-reference/page-collections.md | 2 +- content/en/render-hooks/introduction.md | 2 +- content/en/templates/404.md | 2 +- content/en/templates/base.md | 2 +- content/en/templates/data-templates.md | 4 +-- content/en/templates/homepage.md | 4 +-- content/en/templates/introduction.md | 32 ++++++++--------- content/en/templates/lists/index.md | 22 ++++++------ content/en/templates/menu-templates.md | 4 +-- content/en/templates/pagination.md | 2 +- content/en/templates/partials.md | 2 +- content/en/templates/section-templates.md | 4 +-- content/en/templates/shortcode-templates.md | 2 +- content/en/templates/single-page-templates.md | 4 +-- content/en/templates/taxonomy-templates.md | 4 +-- content/en/templates/views.md | 2 +- content/en/tools/editors.md | 2 -- content/en/troubleshooting/faq.md | 6 ++-- content/en/troubleshooting/inspection.md | 8 ++--- content/en/troubleshooting/performance.md | 4 +-- .../_common/consistent-terminology.md | 4 +-- content/en/variables/file.md | 2 +- content/en/variables/git.md | 2 +- content/en/variables/site.md | 4 +-- content/en/variables/taxonomy.md | 2 +- 175 files changed, 382 insertions(+), 378 deletions(-) diff --git a/content/en/about/features.md b/content/en/about/features.md index a94ce5526e..cc5e06ad32 100644 --- a/content/en/about/features.md +++ b/content/en/about/features.md @@ -66,7 +66,7 @@ toc: true [install]: /installation/ [LiveReload]: /getting-started/usage/ [organization for your projects]: /getting-started/directory-structure/ -[pagevars]: /variables/page/ +[pagevars]: /methods/page/ [Permalink]: /content-management/urls/#permalinks [Powerful theming]: /hugo-modules/theme-components/ [Pretty URLs]: /content-management/urls/ diff --git a/content/en/content-management/archetypes.md b/content/en/content-management/archetypes.md index 94f0388480..663e409f0a 100644 --- a/content/en/content-management/archetypes.md +++ b/content/en/content-management/archetypes.md @@ -72,10 +72,15 @@ You can use any [template function] within an archetype. As shown above, the def Archetypes receive the following objects and values in [context]: -- `.Date` -- `.Type` -- `.Site` (see [details](/variables/site/)) -- `.File` (see [details](/variables/file/)) +- [`Date`] +- [`Type`] +- [`File`] +- [`Site`] + +[`Date`]: /methods/page/date/ +[`Type`]: /methods/page/type/ +[`File`]: /methods/page/ +[`Site`]: /methods/site/ As shown above, the default archetype passes `.File.ContentBaseName` as the argument to the `replace` function when populating the title in front matter. diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index df9c23dcf5..a279fb651f 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -55,17 +55,17 @@ render - `never` : Never render the page to disk, and exclude it from all page collections. -[page bundles]: content-management/page-bundles -[page resources]: /content-management/page-resources -[`Permalink`]: /methods/resource/permalink -[`RelPermalink`]: /methods/resource/relpermalink -[`Publish`]: /methods/resource/publish +[page bundles]: /content-management/page-bundles/ +[page resources]: /content-management/page-resources/ +[`Permalink`]: /methods/resource/permalink/ +[`RelPermalink`]: /methods/resource/relpermalink/ +[`Publish`]: /methods/resource/publish/ {{% note %}} Any page, regardless of its build options, will always be available by using the [`.Page.GetPage`] or [`.Site.GetPage`] method. -[`.Page.GetPage`]: /methods/page/getpage -[`.Site.GetPage`]: /methods/site/getpage +[`.Page.GetPage`]: /methods/page/getpage/ +[`.Site.GetPage`]: /methods/site/getpage/ {{% /note %}} ## Example -- headless page @@ -121,7 +121,7 @@ In the example above, note that: Create a unpublished section whose content and resources can be included in other pages. -[branch bundle]: /content-management/page-bundles +[branch bundle]: /content-management/page-bundles/ ```text content/ diff --git a/content/en/content-management/diagrams.md b/content/en/content-management/diagrams.md index 3554b9be3b..7477fa2e31 100644 --- a/content/en/content-management/diagrams.md +++ b/content/en/content-management/diagrams.md @@ -46,7 +46,7 @@ Will be rendered as: Hugo does not provide a built-in template for Mermaid diagrams. Create your own using a [code block render hook]: -[code block render hook]: /render-hooks/code-blocks +[code block render hook]: /render-hooks/code-blocks/ {{< code file=layouts/_default/_markup/render-codeblock-mermaid.html >}}
diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md
index 89cc15dadc..e1242a24bb 100644
--- a/content/en/content-management/front-matter.md
+++ b/content/en/content-management/front-matter.md
@@ -71,7 +71,7 @@ The field names below are reserved. For example, you cannot create a custom fiel
 
 (`map`) A map of [build options].
 
-[build options]: /content-management/build-options
+[build options]: /content-management/build-options/
 
 ###### cascade {#cascade-field}
 
@@ -115,16 +115,16 @@ If `true`, the page will not be rendered unless you pass the `--buildDrafts` fla
 
 (`bool`) Set to `true` if the content language is in the [CJK] family. This value determines how Hugo calculates word count, and affects the values returned by the [`WordCount`], [`FuzzyWordCount`], and [`Summary`] methods on a `Page` object.
 
-[`fuzzywordcount`]: /methods/page/wordcount
-[`summary`]: /methods/page/wordcount
-[`wordcount`]: /methods/page/wordcount
+[`fuzzywordcount`]: /methods/page/wordcount/
+[`summary`]: /methods/page/summary/
+[`wordcount`]: /methods/page/wordcount/
 [cjk]: /getting-started/glossary/#cjk
 
 ###### keywords
 
 (`string array`) An array of keywords, typically rendered within a `meta` element within the `head` element of the published HTML file, or used as a [taxonomy] to classify content. Access these values from a template using the [`Keywords`] method on a `Page` object.
 
-[`keywords`]: /methods/page/keywords
+[`keywords`]: /methods/page/keywords/
 [taxonomy]: /getting-started/glossary/#taxonomy
 
 
@@ -149,8 +149,8 @@ lang
 
 (`string`) Provide a template name to [target a specific template],  overriding the default [template lookup order]. Set the value to the base file name of the template, excluding its extension. Access this value from a template using the [`Layout`] method on a `Page` object.
 
-[`layout`]: /methods/page/layout
-[template lookup order]: /templates/lookup-order
+[`layout`]: /methods/page/layout/
+[template lookup order]: /templates/lookup-order/
 [target a specific template]: templates/lookup-order/#target-a-template
 
 ###### linkTitle
@@ -172,7 +172,7 @@ Identifier|Content format
 `pdc`|Pandoc
 `rst`|reStructuredText
 
-[content formats]: /content-management/formats
+[content formats]: /content-management/formats/
 
 ###### menus
 
@@ -184,7 +184,7 @@ Identifier|Content format
 
 (`string array`) The [output formats] to render.
 
-[output formats]: /templates/output-formats
+[output formats]: /templates/output-formats/