From 2c7a3165f8f568f99d5404c61babd7ba67971f78 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 19 Jan 2025 23:16:19 -0800 Subject: [PATCH] Markdown linting and cleanup --- content/en/about/features.md | 4 ++-- .../en/content-management/build-options.md | 5 ++--- .../en/content-management/content-adapters.md | 4 ++-- content/en/content-management/formats.md | 3 +-- content/en/content-management/front-matter.md | 7 +++---- .../image-processing/index.md | 7 +++---- .../content-management/markdown-attributes.md | 1 - content/en/content-management/menus.md | 4 ++-- content/en/content-management/multilingual.md | 10 ++++------ content/en/content-management/urls.md | 1 - content/en/contribute/development.md | 2 +- content/en/contribute/themes.md | 2 +- content/en/functions/collections/After.md | 2 +- .../en/functions/collections/Dictionary.md | 1 - content/en/functions/collections/Where.md | 4 ++-- content/en/functions/fmt/Warnf.md | 1 - content/en/functions/images/Dither.md | 9 ++++----- content/en/functions/images/Process.md | 1 - content/en/functions/js/Batch.md | 20 ++++++------------- content/en/functions/js/_common/options.md | 1 - content/en/functions/openapi3/Unmarshal.md | 1 - content/en/functions/path/Join.md | 1 - .../functions/resources/ExecuteAsTemplate.md | 4 ++-- content/en/functions/resources/Fingerprint.md | 2 +- content/en/functions/resources/FromString.md | 6 +++--- content/en/functions/safe/CSS.md | 6 +++--- content/en/functions/strings/SliceString.md | 2 +- content/en/functions/templates/Defer.md | 2 -- content/en/functions/time/AsTime.md | 9 ++++----- content/en/functions/time/Duration.md | 1 - content/en/functions/time/Format.md | 6 +++--- content/en/functions/time/Now.md | 1 - content/en/functions/time/ParseDuration.md | 1 - content/en/functions/transform/Emojify.md | 1 - .../en/getting-started/configuration-build.md | 1 - .../getting-started/configuration-markup.md | 2 +- content/en/getting-started/configuration.md | 9 +++------ .../external-learning-resources/index.md | 3 --- content/en/getting-started/glossary/slice.md | 2 +- .../en/getting-started/glossary/template.md | 2 +- .../en/getting-started/glossary/term-page.md | 2 +- content/en/getting-started/glossary/term.md | 2 +- content/en/getting-started/glossary/theme.md | 2 +- content/en/getting-started/quick-start.md | 12 +++++------ .../hosting-on-21yunbox.md | 2 +- .../hosting-on-aws-amplify/index.md | 8 ++++---- .../hosting-on-github/index.md | 4 ++-- .../hosting-on-netlify/index.md | 8 ++++---- .../en/hosting-and-deployment/hugo-deploy.md | 5 ----- content/en/hugo-modules/use-modules.md | 2 +- content/en/hugo-pipes/js.md | 1 - content/en/hugo-pipes/postprocess.md | 2 +- content/en/installation/linux.md | 5 ++--- content/en/methods/menu-entry/PageRef.md | 2 -- content/en/methods/menu-entry/Params.md | 1 - content/en/methods/menu-entry/URL.md | 1 - content/en/methods/page/CurrentSection.md | 2 +- content/en/methods/page/Fragments.md | 1 - content/en/methods/page/Paginate.md | 8 ++++---- content/en/methods/page/Path.md | 7 +++---- content/en/methods/page/RenderShortcodes.md | 1 - content/en/methods/page/Resources.md | 1 - content/en/methods/page/Section.md | 1 - content/en/methods/pages/Related.md | 1 - content/en/methods/resource/Colors.md | 1 - content/en/methods/resource/Key.md | 1 - content/en/methods/shortcode/Inner.md | 1 - content/en/methods/shortcode/Parent.md | 4 ++-- content/en/methods/site/Param.md | 1 - content/en/methods/site/Taxonomies.md | 1 - .../taxonomy/_common/get-a-taxonomy-object.md | 1 - content/en/myshowcase/index.md | 6 +++--- .../en/quick-reference/page-collections.md | 9 +++++---- content/en/shortcodes/highlight.md | 3 +-- content/en/shortcodes/x.md | 1 - content/en/showcase/_index.md | 2 +- content/en/showcase/overmindstudios/bio.md | 1 - content/en/showcase/template/index.md | 6 +++--- content/en/templates/home.md | 1 - content/en/templates/introduction.md | 2 +- content/en/templates/pagination.md | 13 ++++++------ content/en/templates/robots.md | 4 ++-- content/en/templates/sitemap.md | 2 +- content/en/tools/search.md | 1 - content/en/troubleshooting/deprecation.md | 8 ++++---- content/en/troubleshooting/faq.md | 9 ++++----- 86 files changed, 121 insertions(+), 189 deletions(-) diff --git a/content/en/about/features.md b/content/en/about/features.md index c2d44bf62..c04f69686 100644 --- a/content/en/about/features.md +++ b/content/en/about/features.md @@ -123,7 +123,7 @@ toc: true [Mathematics]: /content-management/mathematics/ [Menus]: /content-management/menus/ [Minification]: /getting-started/configuration/#configure-minify -[Modules]: https://gohugo.io/hugo-modules/ +[Modules]: /hugo-modules/ [Multilingual]: /content-management/multilingual/ [Multiplatform]: /installation/ [Output formats]: /templates/output-formats/ @@ -134,6 +134,6 @@ toc: true [Syntax highlighting]: /content-management/syntax-highlighting/ [Tailwind CSS processing]: /functions/css/tailwindcss/ [Taxonomies]: /content-management/taxonomies/ -[Templates]: templates/introduction/ +[Templates]: /templates/introduction/ [Themes]: https://themes.gohugo.io/ [URL management]: /content-management/urls/ diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index a279fb651..e78462455 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -21,7 +21,6 @@ publishResources = true render = 'always' {{< /code-toggle >}} - list : When to include the page within page collections. Specify one of: @@ -115,7 +114,7 @@ public/ In the example above, note that: 1. Hugo did not publish an HTML file for the page. -2. Despite setting `publishResources` to `false` in front matter, Hugo published the [page resources] because we invoked the [`RelPermalink`] method on each resource. This is the expected behavior. +1. Despite setting `publishResources` to `false` in front matter, Hugo published the [page resources] because we invoked the [`RelPermalink`] method on each resource. This is the expected behavior. ## Example -- headless section @@ -181,7 +180,7 @@ public/ In the example above, note that: 1. Hugo did not publish an HTML file for the page. -2. Despite setting `publishResources` to `false` in front matter, Hugo correctly published the [page resources] because we invoked the [`RelPermalink`] method on each resource. This is the expected behavior. +1. Despite setting `publishResources` to `false` in front matter, Hugo correctly published the [page resources] because we invoked the [`RelPermalink`] method on each resource. This is the expected behavior. ## Example -- list without publishing diff --git a/content/en/content-management/content-adapters.md b/content/en/content-management/content-adapters.md index 675d064c3..369e91a12 100644 --- a/content/en/content-management/content-adapters.md +++ b/content/en/content-management/content-adapters.md @@ -17,7 +17,7 @@ toc: true A content adapter is a template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML. -Unlike templates that reside in the `layouts` directory, content adapters reside in the `content` directory, no more than one per directory per language. When a content adapter creates a page, the page's [logical path](g)will be relative to the content adapter. +Unlike templates that reside in the `layouts` directory, content adapters reside in the `content` directory, no more than one per directory per language. When a content adapter creates a page, the page's [logical path](g) will be relative to the content adapter. ```text content/ @@ -280,7 +280,7 @@ Step 4 With multilingual sites you can: 1. Create one content adapter for all languages using the [`EnableAllLanguages`](#enablealllanguages) method as described above. -2. Create content adapters unique to each language. See the examples below. +1. Create content adapters unique to each language. See the examples below. ### Translations by file name diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index 582f385bb..a02aa2545 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -63,7 +63,7 @@ Hugo provides custom Markdown features including: [Goldmark]: https://github.com/yuin/goldmark [Markdown]: https://daringfireball.net/projects/markdown/ [Mathematics]: /content-management/mathematics/ -[Render hooks]: https://gohugo.io/render-hooks/introduction/ +[Render hooks]: /render-hooks/introduction/ [configure goldmark]: /getting-started/configuration-markup/#goldmark ### HTML @@ -101,7 +101,6 @@ hugo --logLevel info [configure the AsciiDoc renderer]: /getting-started/configuration-markup/#asciidoc [configure asciidoc]: /getting-started/configuration-markup/#asciidoc - ### Pandoc Create your content in the [Pandoc] format preceded by front matter. Hugo renders Pandoc content to HTML using the Pandoc executable. You must install Pandoc to use the Pandoc content format. diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index ac24bb557..8a2e589d1 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -74,7 +74,6 @@ The field names below are reserved. For example, you cannot create a custom fiel (`string`) The date associated with the page, typically the creation date. Note that the TOML format also supports unquoted date/time values. See the [dates](#dates) section for examples. Access this value from a template using the [`Date`] method on a `Page` object. - [`date`]: /methods/page/date/ ###### description @@ -144,7 +143,7 @@ lang [`layout`]: /methods/page/layout/ [template lookup order]: /templates/lookup-order/ -[target a specific template]: templates/lookup-order/#target-a-template +[target a specific template]: /templates/lookup-order/#target-a-template ###### linkTitle @@ -442,5 +441,5 @@ When populating a date field, whether a [custom page parameter](#parameters) or To override the default time zone, set the [`timeZone`](https://gohugo.io/getting-started/configuration/#timezone) in your site configuration. The order of precedence for determining the time zone is: 1. The time zone offset in the date/time string -2. The time zone specified in your site configuration -3. The `Etc/UTC` time zone +1. The time zone specified in your site configuration +1. The `Etc/UTC` time zone diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index 058f1df4f..69ee30dc8 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -500,15 +500,14 @@ If you change image processing methods or options, or if you rename or remove im hugo --gc ``` - [`anchor`]: /content-management/image-processing#anchor [mounted]: /hugo-modules/configuration#module-configuration-mounts [page bundle]: /content-management/page-bundles/ [`lang.FormatNumber`]: /functions/lang/formatnumber/ [filters]: /functions/images/filter/#image-filters -[github.com/disintegration/imaging]: -[Smartcrop]: -[Exif]: +[github.com/disintegration/imaging]: https://github.com/disintegration/imaging#image-resizing +[Smartcrop]: https://github.com/muesli/smartcrop#smartcrop +[Exif]: https://en.wikipedia.org/wiki/Exif [`Process`]: #process [`Colors`]: #colors [`Crop`]: #crop diff --git a/content/en/content-management/markdown-attributes.md b/content/en/content-management/markdown-attributes.md index 9c62c4fba..a465f244d 100644 --- a/content/en/content-management/markdown-attributes.md +++ b/content/en/content-management/markdown-attributes.md @@ -45,7 +45,6 @@ title = true # default is true block = true # default is false {{< /code-toggle >}} - ## Standalone images By default, when the [Goldmark] Markdown renderer encounters a standalone image element (no other elements or text on the same line), it wraps the image element within a paragraph element per the [CommonMark specification]. diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index 1bf0adee1..15cf505ea 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -17,8 +17,8 @@ aliases: [/extras/menus/] To create a menu for your site: 1. Define the menu entries -2. [Localize] each entry -3. Render the menu with a [template] +1. [Localize] each entry +1. Render the menu with a [template] Create multiple menus, either flat or nested. For example, create a main menu for the header, and a separate menu for the footer. diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index b99c73cbe..e355d7eff 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -21,7 +21,6 @@ This is the default language configuration: In the above, `en` is the language key. - Language keys must conform to the syntax described in [RFC 5646]. For example: - `en` @@ -165,7 +164,6 @@ Note that you cannot disable the default content language. ### Configure multilingual multihost - Hugo supports multiple languages in a multihost configuration. This means you can configure a `baseURL` per `language`. {{% note %}} @@ -217,7 +215,7 @@ There are two ways to manage your content translations. Both ensure each page is Considering the following example: 1. `/content/about.en.md` -2. `/content/about.fr.md` +1. `/content/about.fr.md` The first file is assigned the English language and is linked to the second. The second file is assigned the French language and is linked to the first. @@ -251,7 +249,7 @@ The value of `contentDir` can be any valid path -- even absolute path references Considering the following example in conjunction with the configuration above: 1. `/content/english/about.md` -2. `/content/french/about.md` +1. `/content/french/about.md` The first file is assigned the English language and is linked to the second. The second file is assigned the French language and is linked to the first. @@ -267,8 +265,8 @@ Any pages sharing the same `translationKey` set in front matter will be linked a Considering the following example: 1. `/content/about-us.en.md` -2. `/content/om.nn.md` -3. `/content/presentation/a-propos.fr.md` +1. `/content/om.nn.md` +1. `/content/presentation/a-propos.fr.md` {{< code-toggle >}} translationKey: "about" diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index 8b7e4b66a..b8cd9a01a 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -128,7 +128,6 @@ title ="Bar" url = "/:sections[last]/:slug" {{< /code-toggle >}} - ## Site configuration ### Permalinks diff --git a/content/en/contribute/development.md b/content/en/contribute/development.md index cd2e2744d..69d548d95 100644 --- a/content/en/contribute/development.md +++ b/content/en/contribute/development.md @@ -37,7 +37,7 @@ For a complete guide to contributing to Hugo, see the [Contribution Guide]. [contributing]: CONTRIBUTING.md [create a proposal]: https://github.com/gohugoio/hugo/issues/new?labels=Proposal%2C+NeedsTriage&template=feature_request.md [documentation repository]: https://github.com/gohugoio/hugoDocs -[documentation]: https://gohugo.io/documentation +[documentation]: /documentation [forum]: https://discourse.gohugo.io [issue queue]: https://github.com/gohugoio/hugo/issues [themes]: https://themes.gohugo.io/ diff --git a/content/en/contribute/themes.md b/content/en/contribute/themes.md index 34056c35a..7277e2927 100644 --- a/content/en/contribute/themes.md +++ b/content/en/contribute/themes.md @@ -16,7 +16,7 @@ Visit [themes.gohugo.io] to browse a collection of themes created by the Hugo co To submit your theme: 1. Read the [submission guidelines] -2. Open a pull request in the [themes repository] +1. Open a pull request in the [themes repository] Other useful theme directories: diff --git a/content/en/functions/collections/After.md b/content/en/functions/collections/After.md index 751ad0bef..1f2759da6 100644 --- a/content/en/functions/collections/After.md +++ b/content/en/functions/collections/After.md @@ -38,7 +38,7 @@ The template above is rendered to: You can use `after` in combination with the [`first`] function and Hugo's [powerful sorting methods](/quick-reference/page-collections/#sort). Let's assume you have a `section` page at `example.com/articles`. You have 10 articles, but you want your template to show only two rows: 1. The top row is titled "Featured" and shows only the most recently published article (i.e. by `publishdate` in the content files' front matter). -2. The second row is titled "Recent Articles" and shows only the 2nd- to 4th-most recently published articles. +1. The second row is titled "Recent Articles" and shows only the 2nd- to 4th-most recently published articles. {{< code file=layouts/section/articles.html >}} {{ define "main" }} diff --git a/content/en/functions/collections/Dictionary.md b/content/en/functions/collections/Dictionary.md index 07d1eb0f2..e7de0877f 100644 --- a/content/en/functions/collections/Dictionary.md +++ b/content/en/functions/collections/Dictionary.md @@ -33,7 +33,6 @@ To create an empty map: {{ $m := dict }} ``` - Note that the `key` can be either a `string` or a `string slice`. The latter is useful to create a deeply nested structure, e.g.: ```go-html-template diff --git a/content/en/functions/collections/Where.md b/content/en/functions/collections/Where.md index 364c338a1..381fc7cb0 100644 --- a/content/en/functions/collections/Where.md +++ b/content/en/functions/collections/Where.md @@ -384,8 +384,8 @@ Is rendered to: To exclude a page with an undefined field from a boolean _inequality_ test: 1. Create a collection using a boolean comparison -2. Create a collection using a nil comparison -3. Subtract the second collection from the first collection using the [`collections.Complement`] function. +1. Create a collection using a nil comparison +1. Subtract the second collection from the first collection using the [`collections.Complement`] function. [`collections.Complement`]: /functions/collections/complement/ diff --git a/content/en/functions/fmt/Warnf.md b/content/en/functions/fmt/Warnf.md index f4fa22474..643defd30 100644 --- a/content/en/functions/fmt/Warnf.md +++ b/content/en/functions/fmt/Warnf.md @@ -26,7 +26,6 @@ Use the [`warnidf`] function to allow optional suppression of specific warnings. To prevent suppression of duplicate messages when using `warnf` for debugging, make each message unique with the [`math.Counter`] function. For example: - ```go-html-template {{ range site.RegularPages }} {{ .Section | warnf "%#[2]v [%[1]d]" math.Counter }} diff --git a/content/en/functions/images/Dither.md b/content/en/functions/images/Dither.md index 7193ba847..fd0a8368b 100644 --- a/content/en/functions/images/Dither.md +++ b/content/en/functions/images/Dither.md @@ -117,11 +117,10 @@ This example uses the default dithering options. Regardless of dithering method, do both of the following to obtain the best results: 1. Scale the image _before_ dithering -2. Output the image to a lossless format such as GIF or PNG +1. Output the image to a lossless format such as GIF or PNG The example below does both of these, and it sets the dithering palette to the three most dominant colors in the image. - ```go-html-template {{ with resources.Get "original.jpg" }} {{ $opts := dict @@ -157,6 +156,6 @@ For best results, if the dithering palette is grayscale, convert the image to gr The example above: 1. Resizes the image to be 800 px wide -2. Converts the image to grayscale -3. Dithers the image using the default (`FloydSteinberg`) dithering method with a grayscale palette -4. Converts the image to the PNG format +1. Converts the image to grayscale +1. Dithers the image using the default (`FloydSteinberg`) dithering method with a grayscale palette +1. Converts the image to the PNG format diff --git a/content/en/functions/images/Process.md b/content/en/functions/images/Process.md index e562f7fbf..f095a6699 100644 --- a/content/en/functions/images/Process.md +++ b/content/en/functions/images/Process.md @@ -72,7 +72,6 @@ hint [`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp - ```go-html-template {{ $filter := images.Process "webp" "icon" }} {{ $filter := images.Process "crop 200x200 center r90 webp q50 icon" }} diff --git a/content/en/functions/js/Batch.md b/content/en/functions/js/Batch.md index 35a7a621c..fbc1c7e61 100644 --- a/content/en/functions/js/Batch.md +++ b/content/en/functions/js/Batch.md @@ -32,12 +32,10 @@ The Batch `ID` is used to create the base directory for this batch. Forward slas * [Config] * [SetOptions] - ## Group The `Group` method take an `ID` (`string`) as argument. No slashes. It returns an object with these methods: - #### Script The `Script` method takes an `ID` (`string`) as argument. No slashes. It returns an [OptionsSetter] that can be used to set [script options] for this script. @@ -70,7 +68,6 @@ The `Instance` method takes two `string` arguments `SCRIPT_ID` and `INSTANCE_ID` `SetOptions` takes a [params options] map. The instance options will be passed to any [runner] script in the same group, as JSON. - #### Runner The `Runner` method takes an `ID` (`string`) as argument. No slashes. It returns an [OptionsSetter] that can be used to set [script options] for this runner. @@ -129,7 +126,6 @@ The runner script's export must be a function that takes one argument, the group Below is an example of a runner script that uses React to render elements. Note that the export (`default`) must match the `export` option in the [script options] (`default` is the default value for runner scripts) (runnable versions of examples on this page can be found at [js.Batch Demo Repo]): - ```js import * as ReactDOM from 'react-dom/client'; import * as React from 'react'; @@ -154,13 +150,11 @@ export default function Run(group) { } ``` - - #### Config Returns an [OptionsSetter] that can be used to set [build options] for the batch. -These are mostly the same as for [js.Build], but note that: +These are mostly the same as for `js.Build`, but note that: * `targetPath` is set automatically (there may be multiple outputs). * `format` must be `esm`, currently the only format supporting [code splitting]. @@ -283,7 +277,6 @@ See [this discussion](https://discourse.gohugo.io/t/js-batch-with-simple-global- {{ end }} ``` - ## Known Issues In the official documentation for [ESBuild's code splitting], there's a warning note in the header. The two issues are: @@ -294,7 +287,7 @@ In the official documentation for [ESBuild's code splitting], there's a warning We have not seen the ordering issue as a problem during our [extensive testing](https://github.com/bep/hugojsbatchdemo) of this new feature with different libraries. There are two main cases: 1. Undefined execution order of imports, see [this comment](https://github.com/evanw/esbuild/issues/399#issuecomment-1458680887) -2. Only one execution order of imports, see [this comment](https://github.com/evanw/esbuild/issues/399#issuecomment-735355932) +1. Only one execution order of imports, see [this comment](https://github.com/evanw/esbuild/issues/399#issuecomment-735355932) Many would say that both of the above are [code smells](https://en.wikipedia.org/wiki/Code_smell). The first one has a simple workaround in Hugo. Define the import order in its own script and make sure it gets passed early to ESBuild, e.g. by putting it in a script group with a name that comes early in the alphabet. @@ -307,7 +300,7 @@ console.log('entrypoints-workaround.js'); ``` [build options]: #build-options -[`Resource`]: https://gohugo.io/methods/resource/ +[`Resource`]: /methods/resource/ [`Resources`]: /methods/page/resources/ [`Resources.Mount`]: /methods/page/resources/#mount [`templates.Defer`]: /functions/templates/defer/ @@ -319,13 +312,12 @@ console.log('entrypoints-workaround.js'); [instance]: #instance [JavaScript import]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import [js.Batch Demo Repo]: https://github.com/bep/hugojsbatchdemo/ -[js.Build]: https://gohugo.io/hugo-pipes/js/#options -[map]: https://gohugo.io/functions/collections/dictionary/ +[map]: /functions/collections/dictionary/ [OptionsSetter]: #optionssetter -[page bundles]: https://gohugo.io/content-management/page-bundles/ +[page bundles]: /content-management/page-bundles/ [params options]: #params-options [runner]: #runner [script options]: #script-options [script]: #script [SetOptions]: #optionssetter -[with]: https://gohugo.io/functions/go-template/with/ +[with]: /functions/go-template/with/ diff --git a/content/en/functions/js/_common/options.md b/content/en/functions/js/_common/options.md index f92804fd0..332264fca 100644 --- a/content/en/functions/js/_common/options.md +++ b/content/en/functions/js/_common/options.md @@ -74,7 +74,6 @@ sourceMap sourcesContent {{< new-in 0.140.0 >}} : (`bool`) Whether to include the content of the source files in the source map. By default, this is `true`. - JSX {{< new-in 0.124.0 >}} : (`string`) How to handle/transform JSX syntax. One of: `transform`, `preserve`, `automatic`. Default is `transform`. Notably, the `automatic` transform was introduced in React 17+ and will cause the necessary JSX helper functions to be imported automatically. See https://esbuild.github.io/api/#jsx diff --git a/content/en/functions/openapi3/Unmarshal.md b/content/en/functions/openapi3/Unmarshal.md index ffa171ec4..6ee1519e5 100644 --- a/content/en/functions/openapi3/Unmarshal.md +++ b/content/en/functions/openapi3/Unmarshal.md @@ -56,7 +56,6 @@ To list the GET and POST operations for each of the API paths: Hugo renders this to: - ```html

/pets

diff --git a/content/en/functions/path/Join.md b/content/en/functions/path/Join.md index dc701b731..394389780 100644 --- a/content/en/functions/path/Join.md +++ b/content/en/functions/path/Join.md @@ -23,7 +23,6 @@ See Go's [`path.Join`] and [`path.Clean`] documentation for details. [`path.Clean`]: https://pkg.go.dev/path#Clean [`path.Join`]: https://pkg.go.dev/path#Join - ```go-html-template {{ path.Join "partial" "news.html" }} → partial/news.html {{ path.Join "partial/" "news.html" }} → partial/news.html diff --git a/content/en/functions/resources/ExecuteAsTemplate.md b/content/en/functions/resources/ExecuteAsTemplate.md index 381647f7b..0c90a03b3 100644 --- a/content/en/functions/resources/ExecuteAsTemplate.md +++ b/content/en/functions/resources/ExecuteAsTemplate.md @@ -49,8 +49,8 @@ Place this in your baseof.html template: The example above: 1. Captures the template as a resource -2. Executes the resource as a template, passing the current page in context -3. Publishes the resource to css/main.css +1. Executes the resource as a template, passing the current page in context +1. Publishes the resource to css/main.css The result is: diff --git a/content/en/functions/resources/Fingerprint.md b/content/en/functions/resources/Fingerprint.md index 1fc01912d..17222784e 100644 --- a/content/en/functions/resources/Fingerprint.md +++ b/content/en/functions/resources/Fingerprint.md @@ -36,6 +36,6 @@ The hash algorithm may be one of `md5`, `sha256` (default), `sha384`, or `sha512 After cryptographically hashing the resource content: 1. The values returned by the `.Permalink` and `.RelPermalink` methods include the hash sum -2. The resource's `.Data.Integrity` method returns a [Subresource Integrity] (SRI) value consisting of the name of the hash algorithm, one hyphen, and the base64-encoded hash sum +1. The resource's `.Data.Integrity` method returns a [Subresource Integrity] (SRI) value consisting of the name of the hash algorithm, one hyphen, and the base64-encoded hash sum [Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity diff --git a/content/en/functions/resources/FromString.md b/content/en/functions/resources/FromString.md index 22663dc4b..c13db35d6 100644 --- a/content/en/functions/resources/FromString.md +++ b/content/en/functions/resources/FromString.md @@ -48,9 +48,9 @@ Place this in your baseof.html template: The example above: 1. Creates a map with the relevant key-value pairs using the [`dict`] function -2. Encodes the map as a JSON string using the [`jsonify`] function -3. Creates a resource from the JSON string using the `resources.FromString` function -4. Publishes the file to the root of the `public` directory using the resource's `.Publish` method +1. Encodes the map as a JSON string using the [`jsonify`] function +1. Creates a resource from the JSON string using the `resources.FromString` function +1. Publishes the file to the root of the `public` directory using the resource's `.Publish` method Combine `resources.FromString` with [`resources.ExecuteAsTemplate`] if your string contains template actions. Rewriting the example above: diff --git a/content/en/functions/safe/CSS.md b/content/en/functions/safe/CSS.md index 05ca25e11..5d67789b6 100644 --- a/content/en/functions/safe/CSS.md +++ b/content/en/functions/safe/CSS.md @@ -26,9 +26,9 @@ aliases: [/functions/safecss] Use the `safe.CSS` function to encapsulate known safe content that matches any of: 1. The CSS3 stylesheet production, such as `p { color: purple }`. -2. The CSS3 rule production, such as `a[href=~"https:"].foo#bar`. -3. CSS3 declaration productions, such as `color: red; margin: 2px`. -4. The CSS3 value production, such as `rgba(0, 0, 255, 127)`. +1. The CSS3 rule production, such as `a[href=~"https:"].foo#bar`. +1. CSS3 declaration productions, such as `color: red; margin: 2px`. +1. The CSS3 value production, such as `rgba(0, 0, 255, 127)`. Use of this type presents a security risk: the encapsulated content should come from a trusted source, as it will be included verbatim in the template output. diff --git a/content/en/functions/strings/SliceString.md b/content/en/functions/strings/SliceString.md index 5554bd9f3..377a5eb37 100644 --- a/content/en/functions/strings/SliceString.md +++ b/content/en/functions/strings/SliceString.md @@ -20,6 +20,6 @@ The START and END positions are zero-based, where `0` represents the first chara {{ slicestr "BatMan" 0 3 }} → Bat ``` -The START and END arguments represent the endpoints of a half-open [interval], a concept that may be difficult to grasp when first encountered. You may find that the [`strings.Substr`] function is easier to understand. +The START and END arguments represent the endpoints of a half-open [interval](g), a concept that may be difficult to grasp when first encountered. You may find that the [`strings.Substr`] function is easier to understand. [`strings.Substr`]: /functions/strings/substr/ diff --git a/content/en/functions/templates/Defer.md b/content/en/functions/templates/Defer.md index a99b955ec..1d538db4a 100644 --- a/content/en/functions/templates/Defer.md +++ b/content/en/functions/templates/Defer.md @@ -46,7 +46,6 @@ In some rare use cases, you may need to defer the execution of a template until This function only works in combination with the `with` keyword. {{% /note %}} - {{% note %}} Variables defined on the outside are not visible on the inside and vice versa. To pass in data, use the `data` [option](#options). {{% /note %}} @@ -79,7 +78,6 @@ key (`string`) data (`map`) : Optional map to pass as data to the deferred template. This will be available in the deferred template as `.` or `$`. - ```go-html-template Language Outside: {{ site.Language.Lang }} Page Outside: {{ .RelPermalink }} diff --git a/content/en/functions/time/AsTime.md b/content/en/functions/time/AsTime.md index 70b2bd1f3..92040f924 100644 --- a/content/en/functions/time/AsTime.md +++ b/content/en/functions/time/AsTime.md @@ -42,13 +42,12 @@ The list of valid time zones may be system dependent, but should include `UTC`, The order of precedence for determining the time zone is: 1. The time zone offset in the date/time string -2. The time zone provided as the second argument to the `time.AsTime` function -3. The time zone specified in your site configuration -4. The `Etc/UTC` time zone - +1. The time zone provided as the second argument to the `time.AsTime` function +1. The time zone specified in your site configuration +1. The `Etc/UTC` time zone [IANA Time Zone database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones [`time.Time`]: https://pkg.go.dev/time#Time -[`timeZone`]: https://gohugo.io/getting-started/configuration/#timezone +[`timeZone`]: /getting-started/configuration/#timezone [functions]: /functions/time/ [methods]: /methods/time/ diff --git a/content/en/functions/time/Duration.md b/content/en/functions/time/Duration.md index 051be7ade..09e5d6725 100644 --- a/content/en/functions/time/Duration.md +++ b/content/en/functions/time/Duration.md @@ -32,7 +32,6 @@ There are 86400 seconds in one day. The time unit must be one of the following: - Duration|Valid time units :--|:-- hours|`hour`, `h` diff --git a/content/en/functions/time/Format.md b/content/en/functions/time/Format.md index b9db6905b..cf7721376 100644 --- a/content/en/functions/time/Format.md +++ b/content/en/functions/time/Format.md @@ -37,10 +37,10 @@ Examples of parsable string representations: To override the default time zone, set the [`timeZone`] in your site configuration. The order of precedence for determining the time zone is: 1. The time zone offset in the date/time string -2. The time zone specified in your site configuration -3. The `Etc/UTC` time zone +1. The time zone specified in your site configuration +1. The `Etc/UTC` time zone -[`timeZone`]: https://gohugo.io/getting-started/configuration/#timezone +[`timeZone`]: /getting-started/configuration/#timezone ## Layout string diff --git a/content/en/functions/time/Now.md b/content/en/functions/time/Now.md index 353e7a0af..2994a9728 100644 --- a/content/en/functions/time/Now.md +++ b/content/en/functions/time/Now.md @@ -35,7 +35,6 @@ To format and [localize](g) the value, pass it through the [`time.Format`] funct The `time.Now` function returns a `time.Time` value, so you can chain any of the [time methods] to the resulting value. For example: - ```go-html-template {{ time.Now.Year }} → 2023 (int) {{ time.Now.Weekday.String }} → Sunday diff --git a/content/en/functions/time/ParseDuration.md b/content/en/functions/time/ParseDuration.md index d3369b899..abb516361 100644 --- a/content/en/functions/time/ParseDuration.md +++ b/content/en/functions/time/ParseDuration.md @@ -17,7 +17,6 @@ aliases: [/functions/time.parseduration] The `time.ParseDuration` function returns a time.Duration value that you can use with any of the `Duration` [methods]. - A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as `300ms`, `-1.5h` or `2h45m`. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. This template: diff --git a/content/en/functions/transform/Emojify.md b/content/en/functions/transform/Emojify.md index 8422a0c78..5ca562db9 100644 --- a/content/en/functions/transform/Emojify.md +++ b/content/en/functions/transform/Emojify.md @@ -17,7 +17,6 @@ See the list of [emoji shortcodes] for available emoticons. The `emojify` function can be called in your templates but not directly in your content files by default. For emojis in content files, set `enableEmoji` to `true` in your site's [configuration]. Then you can write emoji shorthand directly into your content files; - ```text I :heart: Hugo! ``` diff --git a/content/en/getting-started/configuration-build.md b/content/en/getting-started/configuration-build.md index 1ae014eaa..638ac6eee 100644 --- a/content/en/getting-started/configuration-build.md +++ b/content/en/getting-started/configuration-build.md @@ -32,7 +32,6 @@ See [Configure Cache Busters](#configure-cache-busters). (`string`) When to use the cached resources in `/resources/_gen` for PostCSS and ToCSS. Valid values are `never`, `always` and `fallback`. The last value means that the cache will be tried if PostCSS/extended version is not available. - ## Configure cache busters {{< new-in 0.112.0 >}} diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md index 21fdca287..f01d0dddd 100644 --- a/content/en/getting-started/configuration-markup.md +++ b/content/en/getting-started/configuration-markup.md @@ -107,7 +107,7 @@ Superscript|`1^st^`|`1st` To avoid a conflict when enabling the Hugo Goldmark Extras subscript extension, if you want to render subscript and strikethrough text concurrently you must: 1. Disable the Goldmark strikethrough extension -2. Enable the Hugo Goldmark Extras delete extension +1. Enable the Hugo Goldmark Extras delete extension For example: diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 3e693186b..448689295 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -136,7 +136,7 @@ ID = 'G-XXXXXXXXX' Now consider the following scenario: 1. You don't want to load the analytics code when running `hugo server`. -2. You want to use different Google tag IDs for your production and staging environments. For example: +1. You want to use different Google tag IDs for your production and staging environments. For example: - `G-PPPPPPPPP` for production - `G-SSSSSSSSS` for staging @@ -149,7 +149,7 @@ To satisfy these requirements, configure your site as follows: By default, Hugo sets its `environment` to `development` when running `hugo server`. In the absence of a `config/development` directory, Hugo uses the `config/_default` directory. -2. `config/production/hugo.toml` +1. `config/production/hugo.toml` Include this section only: @@ -162,7 +162,7 @@ To satisfy these requirements, configure your site as follows: By default, Hugo sets its `environment` to `production` when running `hugo`. The analytics code will use the `G-PPPPPPPPP` tag ID. -3. `config/staging/hugo.toml` +1. `config/staging/hugo.toml` Include this section only: @@ -609,7 +609,6 @@ These settings do not apply to the [`Next`] or [`Prev`] methods on a `Pages` obj See [Configure Build](/getting-started/configuration-build/). - ## Configure server This is only relevant when running `hugo server`, and it allows to set HTTP headers during development, which allows you to test out your Content Security Policy and similar. The configuration format matches [Netlify's](https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file) with slightly more powerful [Glob matching](https://github.com/gobwas/glob): @@ -698,7 +697,6 @@ to = '/en/404.html' status = 404 {{< /code-toggle >}} - ## Configure title case By default, Hugo follows the capitalization rules published in the [Associated Press Stylebook] when creating automatic section titles, and when transforming strings with the [`strings.Title`] function. @@ -890,7 +888,6 @@ If you want to know the current value of `cacheDir`, you can run `hugo config`, [templates]: /templates/ [static-files]: /content-management/static-files/ - ## Configure HTTP cache {{< new-in 0.127.0 >}} diff --git a/content/en/getting-started/external-learning-resources/index.md b/content/en/getting-started/external-learning-resources/index.md index 7d18c9334..46c66a737 100644 --- a/content/en/getting-started/external-learning-resources/index.md +++ b/content/en/getting-started/external-learning-resources/index.md @@ -25,14 +25,12 @@ Publication date: March 2022\ Length: 488 pages\ ISBN: 9781617297007 - ### Build Websites with Hugo In this book, you'll use Hugo to build a personal portfolio site that you can use to showcase your skills and thoughts to the world. You'll build the basic skeleton, develop a custom theme, and use content templates to generate new pages quickly. You'll use internal and external data sources to embed content into your site, and render some of your content in JSON and RSS. You'll add a blog section with posts and integrate Disqus with your site, and then make your site searchable. [{{< img src="build-websites-with-hugo.png" alt="Book cover: Build Websites with Hugo" filter="process" filterArgs="resize x350 webp">}}](https://pragprog.com/titles/bhhugo/build-websites-with-hugo/) - Author: Brian P. Hogan\ Publisher: [Pragmatic Bookshelf](https://pragprog.com/titles/bhhugo/build-websites-with-hugo/)\ Publication date: May 2020\ @@ -60,7 +58,6 @@ Creation date: April 2022 This course covers the basics of using the Hugo static site generator. Work your way through the articles and we'll teach you everything you need to know to create a professional and scalable website or blog! - 1. [Introduction](https://www.giraffeacademy.com/static-site-generators/hugo/) 1. [Windows Installation](https://www.giraffeacademy.com/static-site-generators/hugo/installing-hugo-on-windows/) 1. [Mac Installation](https://www.giraffeacademy.com/static-site-generators/hugo/installing-hugo-on-mac/) diff --git a/content/en/getting-started/glossary/slice.md b/content/en/getting-started/glossary/slice.md index 945838779..fa6bc3cc0 100644 --- a/content/en/getting-started/glossary/slice.md +++ b/content/en/getting-started/glossary/slice.md @@ -2,4 +2,4 @@ title: slice --- -A numbered sequence of elements. Unlike Go's [array](g) data type, slices are dynamically sized. [Elements](g) within a slice can be [scalars](g) , [arrays](g), [maps](g) , pages, or other slices. See the [Go documentation](https://go.dev/ref/spec#Slice_types) for details. +A numbered sequence of elements. Unlike Go's [array](g) data type, slices are dynamically sized. [Elements](g) within a slice can be [scalars](g), [arrays](g), [maps](g), pages, or other slices. See the [Go documentation](https://go.dev/ref/spec#Slice_types) for details. diff --git a/content/en/getting-started/glossary/template.md b/content/en/getting-started/glossary/template.md index c732894e9..b8b046092 100644 --- a/content/en/getting-started/glossary/template.md +++ b/content/en/getting-started/glossary/template.md @@ -2,4 +2,4 @@ title: template --- -A file with [template actions](g) , located within the `layouts` directory of a project, theme, or module. See [details](/templates/). +A file with [template actions](g), located within the `layouts` directory of a project, theme, or module. See [details](/templates/). diff --git a/content/en/getting-started/glossary/term-page.md b/content/en/getting-started/glossary/term-page.md index 2cbb98b32..ed9bfec0d 100644 --- a/content/en/getting-started/glossary/term-page.md +++ b/content/en/getting-started/glossary/term-page.md @@ -2,4 +2,4 @@ title: term page --- -Content with the "term" [page kind](g). Typically a listing of [regular pages](g) and [section pages](g) with a given [term](g). +Content with the "term" [page kind](g). Typically a listing of [regular pages](g) and [section pages](g) with a given [term](g). diff --git a/content/en/getting-started/glossary/term.md b/content/en/getting-started/glossary/term.md index fefbcb32c..d04f58b80 100644 --- a/content/en/getting-started/glossary/term.md +++ b/content/en/getting-started/glossary/term.md @@ -2,4 +2,4 @@ title: term --- -A member of a [taxonomy](g) , used to classify content. See [details](/content-management/taxonomies/). +A member of a [taxonomy](g), used to classify content. See [details](/content-management/taxonomies/). diff --git a/content/en/getting-started/glossary/theme.md b/content/en/getting-started/glossary/theme.md index dc9b6f6b2..e5c6ee951 100644 --- a/content/en/getting-started/glossary/theme.md +++ b/content/en/getting-started/glossary/theme.md @@ -2,4 +2,4 @@ title: theme --- -A packaged combination of [archetypes](g) , assets, content, data, [templates](g), translation tables, static files, or configuration settings. A theme may serve as the basis for a new site, or to augment an existing site. See also [module](g). +A packaged combination of [archetypes](g), assets, content, data, [templates](g), translation tables, static files, or configuration settings. A theme may serve as the basis for a new site, or to augment an existing site. See also [module](g). diff --git a/content/en/getting-started/quick-start.md b/content/en/getting-started/quick-start.md index bdb3247ba..cb22e0121 100644 --- a/content/en/getting-started/quick-start.md +++ b/content/en/getting-started/quick-start.md @@ -16,9 +16,9 @@ minVersion: v0.128.0 In this tutorial you will: 1. Create a site -2. Add content -3. Configure the site -4. Publish the site +1. Add content +1. Configure the site +1. Publish the site ## Prerequisites @@ -174,10 +174,8 @@ theme = 'ananke' Make the following changes: 1. Set the `baseURL` for your production site. This value must begin with the protocol and end with a slash, as shown above. - -2. Set the `languageCode` to your language and region. - -3. Set the `title` for your production site. +1. Set the `languageCode` to your language and region. +1. Set the `title` for your production site. Start Hugo's development server to see your changes, remembering to include draft content. diff --git a/content/en/hosting-and-deployment/hosting-on-21yunbox.md b/content/en/hosting-and-deployment/hosting-on-21yunbox.md index 2ab0a1964..4b02995e0 100644 --- a/content/en/hosting-and-deployment/hosting-on-21yunbox.md +++ b/content/en/hosting-and-deployment/hosting-on-21yunbox.md @@ -31,7 +31,7 @@ This guide assumes you already have a Hugo project to deploy. If you need a proj You can set up a Hugo site on 21YunBox in two quick steps: 1. Create a new web service on 21YunBox, and give 21YunBox permission to access your GitHub or Gitee repo. -2. Use the following values during creation: +1. Use the following values during creation: | Field | Value | | --------------------- | ------------------------------------------------ | diff --git a/content/en/hosting-and-deployment/hosting-on-aws-amplify/index.md b/content/en/hosting-and-deployment/hosting-on-aws-amplify/index.md index b1a0f468c..3172ecb83 100644 --- a/content/en/hosting-and-deployment/hosting-on-aws-amplify/index.md +++ b/content/en/hosting-and-deployment/hosting-on-aws-amplify/index.md @@ -14,10 +14,10 @@ toc: true Please complete the following tasks before continuing: 1. [Create an AWS account] -2. [Install Git] -3. [Create a Hugo site] and test it locally with `hugo server` -4. Commit the changes to your local repository -5. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account +1. [Install Git] +1. [Create a Hugo site] and test it locally with `hugo server` +1. Commit the changes to your local repository +1. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account [Bitbucket]: https://bitbucket.org/product [Create a Hugo site]: /getting-started/quick-start/ diff --git a/content/en/hosting-and-deployment/hosting-on-github/index.md b/content/en/hosting-and-deployment/hosting-on-github/index.md index d9ca6738c..6c62fb29d 100644 --- a/content/en/hosting-and-deployment/hosting-on-github/index.md +++ b/content/en/hosting-and-deployment/hosting-on-github/index.md @@ -15,8 +15,8 @@ aliases: [/tutorials/github-pages-blog/] Please complete the following tasks before continuing: 1. [Create a GitHub account] -2. [Install Git] -3. [Create a Hugo site] and test it locally with `hugo server`. +1. [Install Git] +1. [Create a Hugo site] and test it locally with `hugo server`. [Create a GitHub account]: https://github.com/signup [Install Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git diff --git a/content/en/hosting-and-deployment/hosting-on-netlify/index.md b/content/en/hosting-and-deployment/hosting-on-netlify/index.md index 4ab5e46f9..97694f210 100644 --- a/content/en/hosting-and-deployment/hosting-on-netlify/index.md +++ b/content/en/hosting-and-deployment/hosting-on-netlify/index.md @@ -14,10 +14,10 @@ toc: true Please complete the following tasks before continuing: 1. [Create a Netlify account] -2. [Install Git] -3. [Create a Hugo site] and test it locally with `hugo server` -4. Commit the changes to your local repository -5. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account +1. [Install Git] +1. [Create a Hugo site] and test it locally with `hugo server` +1. Commit the changes to your local repository +1. Push the local repository to your [GitHub], [GitLab], or [Bitbucket] account [Bitbucket]: https://bitbucket.org/product [Create a Hugo site]: /getting-started/quick-start/ diff --git a/content/en/hosting-and-deployment/hugo-deploy.md b/content/en/hosting-and-deployment/hugo-deploy.md index 4abcba73f..f33dab50e 100644 --- a/content/en/hosting-and-deployment/hugo-deploy.md +++ b/content/en/hosting-and-deployment/hugo-deploy.md @@ -34,7 +34,6 @@ This feature requires the Hugo extended/deploy edition. See the [installation] s * Amazon S3: [create a bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) and [host a static website](https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html) * Microsoft Azure: [create a storage container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal) and [host a static website](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website) - ## Configuring your first deployment In the configuration file for your site, add a `[deployment]` section @@ -82,7 +81,6 @@ configuration. See `hugo help deploy` or [the deploy command-line documentation][commandline] for more command-line options. - ### How the file list works The first thing `hugo deploy` does is create file lists for local and remote by @@ -95,7 +93,6 @@ the [deployment target's configuration][config] -- * If the configuration specifies an `exclude` pattern, files matching the pattern are skipped. - {{% note %}} When creating the local file list, a few additional skips apply: first, Hugo always skips files named `.DS_Store`. @@ -107,8 +104,6 @@ traverse into them, except for the special [hidden directory named traversed if it exists. {{% /note %}} - - ### How the local and remote file lists are compared In the second step, Hugo compares the two file lists to figure out what changes diff --git a/content/en/hugo-modules/use-modules.md b/content/en/hugo-modules/use-modules.md index 0b623678a..6af96c992 100644 --- a/content/en/hugo-modules/use-modules.md +++ b/content/en/hugo-modules/use-modules.md @@ -31,7 +31,7 @@ Also see the [CLI Doc](/commands/hugo_mod_init/). The easiest way to use a Module for a theme is to import it in the configuration. 1. Initialize the hugo module system: `hugo mod init github.com//` -2. Import the theme: +1. Import the theme: {{< code-toggle file=hugo >}} [module] diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md index f5b8cb4e4..88b0f005f 100644 --- a/content/en/hugo-pipes/js.md +++ b/content/en/hugo-pipes/js.md @@ -11,5 +11,4 @@ menu: weight: 60 --- - See [JS functions](/functions/js/). diff --git a/content/en/hugo-pipes/postprocess.md b/content/en/hugo-pipes/postprocess.md index 0e3b040ab..5a0a5797e 100755 --- a/content/en/hugo-pipes/postprocess.md +++ b/content/en/hugo-pipes/postprocess.md @@ -23,7 +23,7 @@ A prime use case for this is [CSS purging with PostCSS](#css-purging-with-postcs There are currently two limitations to this: 1. This only works in `*.html` templates (i.e. templates that produces HTML files). -2. You cannot manipulate the values returned from the resource's methods. E.g. the `upper` in this example will not work as expected: +1. You cannot manipulate the values returned from the resource's methods. E.g. the `upper` in this example will not work as expected: ```go-html-template {{ $css := resources.Get "css/main.css" }} diff --git a/content/en/installation/linux.md b/content/en/installation/linux.md index 14479d004..ba59d0f2a 100644 --- a/content/en/installation/linux.md +++ b/content/en/installation/linux.md @@ -121,8 +121,7 @@ To install the extended edition of Hugo on [Exherbo]: www-apps/hugo extended ``` -2. Install using the Paludis package manager: - +1. Install using the Paludis package manager: ```sh cave resolve -x repository/heirecka @@ -151,7 +150,7 @@ Derivatives of the [Gentoo] distribution of Linux include [Calculate Linux], [Fu www-apps/hugo extended ``` -2. Build using the Portage package manager: +1. Build using the Portage package manager: ```sh sudo emerge www-apps/hugo diff --git a/content/en/methods/menu-entry/PageRef.md b/content/en/methods/menu-entry/PageRef.md index 5d99d628c..368579796 100644 --- a/content/en/methods/menu-entry/PageRef.md +++ b/content/en/methods/menu-entry/PageRef.md @@ -54,7 +54,6 @@ In almost also scenarios you should use the [`URL`] method instead. [`URL`]: /methods/menu-entry/url/ {{% /note %}} - Consider this content structure: ```text @@ -99,7 +98,6 @@ In the above note that the `href` attribute of the second `anchor` element is bl With this template code: - {{< code file=layouts/partials/menu.html >}}
    {{ range .Site.Menus.main }} diff --git a/content/en/methods/menu-entry/Params.md b/content/en/methods/menu-entry/Params.md index 5c1d3c2d0..4d3e8bdaf 100644 --- a/content/en/methods/menu-entry/Params.md +++ b/content/en/methods/menu-entry/Params.md @@ -32,7 +32,6 @@ weight = 30 With this template: - ```go-html-template
      {{ range .Site.Menus.main }} diff --git a/content/en/methods/menu-entry/URL.md b/content/en/methods/menu-entry/URL.md index bf3ec044a..47db9153e 100644 --- a/content/en/methods/menu-entry/URL.md +++ b/content/en/methods/menu-entry/URL.md @@ -11,7 +11,6 @@ action: For menu entries associated with a page, the `URL` method returns the page's [`RelPermalink`], otherwise it returns the entry's `url` property. - ```go-html-template
        {{ range .Site.Menus.main }} diff --git a/content/en/methods/page/CurrentSection.md b/content/en/methods/page/CurrentSection.md index b818038b0..17ec652c1 100644 --- a/content/en/methods/page/CurrentSection.md +++ b/content/en/methods/page/CurrentSection.md @@ -19,7 +19,7 @@ action: {{% include "methods/page/_common/definition-of-section.md" %}} {{% note %}} -The current section of a [section](g) page, [taxonomy](g) page, [term](g) page, or the home page, is itself. +The current section of a [section page](g), [taxonomy page](g), [term page](g), or the home page, is itself. {{% /note %}} Consider this content structure: diff --git a/content/en/methods/page/Fragments.md b/content/en/methods/page/Fragments.md index 71d2f6474..581cbf7c3 100644 --- a/content/en/methods/page/Fragments.md +++ b/content/en/methods/page/Fragments.md @@ -32,7 +32,6 @@ Headings
        {{ debug.Dump .Fragments.Headings }}
        ``` - HeadingsMap : (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure: diff --git a/content/en/methods/page/Paginate.md b/content/en/methods/page/Paginate.md index 02daa64b4..9d98fbb2f 100644 --- a/content/en/methods/page/Paginate.md +++ b/content/en/methods/page/Paginate.md @@ -41,10 +41,10 @@ You can invoke pagination on the [home template], [section templates], [taxonomy In the example above, we: 1. Build a page collection -2. Sort the collection by title -3. Paginate the collection, with 7 elements per pager -4. Range over the paginated page collection, rendering a link to each page -5. Call the embedded pagination template to create navigation links between pagers +1. Sort the collection by title +1. Paginate the collection, with 7 elements per pager +1. Range over the paginated page collection, rendering a link to each page +1. Call the embedded pagination template to create navigation links between pagers {{% note %}} Please note that the results of pagination are cached. Once you have invoked either the `Paginator` or `Paginate` method, the paginated collection is immutable. Additional invocations of these methods will have no effect. diff --git a/content/en/methods/page/Path.md b/content/en/methods/page/Path.md index ec7896e16..657410112 100644 --- a/content/en/methods/page/Path.md +++ b/content/en/methods/page/Path.md @@ -34,9 +34,9 @@ The meaning of, and value returned by, the `Path` method on a `Page` object chan To determine the logical path for pages backed by a file, Hugo starts with the file path, relative to the `content` directory, and then: 1. Strips the file extension -2. Strips the language identifier -3. Converts the result to lower case -4. Replaces spaces with hyphens +1. Strips the language identifier +1. Converts the result to lower case +1. Replaces spaces with hyphens The value returned by the `Path` method on a `Page` object is independent of content format, language, and URL modifiers such as the `slug` and `url` front matter fields. @@ -121,7 +121,6 @@ Methods|Functions|Shortcodes Specify the logical path when using any of these methods, functions, or shortcodes. If you include a file extension or language identifier, Hugo will strip these values before finding the page in the logical tree. {{% /note %}} - ## Logical tree Just as file paths form a file tree, logical paths form a logical tree. diff --git a/content/en/methods/page/RenderShortcodes.md b/content/en/methods/page/RenderShortcodes.md index 70674a9c0..319edea69 100644 --- a/content/en/methods/page/RenderShortcodes.md +++ b/content/en/methods/page/RenderShortcodes.md @@ -86,7 +86,6 @@ An *emphasized* word. Note that the shortcode within the content file was rendered, but the surrounding Markdown was preserved. - ## Limitations The primary use case for `.RenderShortcodes` is inclusion of Markdown content. If you try to use `.RenderShortcodes` inside `HTML` blocks when inside Markdown, you will get a warning similar to this: diff --git a/content/en/methods/page/Resources.md b/content/en/methods/page/Resources.md index 4791ef120..2495ca8df 100644 --- a/content/en/methods/page/Resources.md +++ b/content/en/methods/page/Resources.md @@ -82,7 +82,6 @@ When working with global resources instead of page resources, use the [`resource This method is currently only useful in [js.Batch](/functions/js/batch/#import-context). - ## Pattern matching With the `GetMatch` and `Match` methods, Hugo determines a match using a case-insensitive [glob pattern]. diff --git a/content/en/methods/page/Section.md b/content/en/methods/page/Section.md index 8e027a5a1..31cfb1e6f 100644 --- a/content/en/methods/page/Section.md +++ b/content/en/methods/page/Section.md @@ -49,6 +49,5 @@ This is similar to using the [`Type`] method with the `where` function However, if the `type` field in front matter has been defined on one or more pages, the page collection based on `Type` will be different than the page collection based on `Section`. - [`where`]: /functions/collections/where/ [`Type`]: /methods/page/type/ diff --git a/content/en/methods/pages/Related.md b/content/en/methods/pages/Related.md index 7984e1bc1..a80722a0e 100644 --- a/content/en/methods/pages/Related.md +++ b/content/en/methods/pages/Related.md @@ -45,7 +45,6 @@ To pass an options map: {{ end }} {{< /code >}} - ## Options indices diff --git a/content/en/methods/resource/Colors.md b/content/en/methods/resource/Colors.md index 9ee71ba7d..73fe1e7ae 100644 --- a/content/en/methods/resource/Colors.md +++ b/content/en/methods/resource/Colors.md @@ -169,7 +169,6 @@ Calculate the contrast ratio to determine WCAG conformance: {{ end }} ``` - [WCAG]: https://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines [contrast ratio]: https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio [enhanced]: https://www.w3.org/WAI/WCAG22/quickref/?showtechniques=145#contrast-enhanced diff --git a/content/en/methods/resource/Key.md b/content/en/methods/resource/Key.md index deeba9ab3..2dbd371be 100644 --- a/content/en/methods/resource/Key.md +++ b/content/en/methods/resource/Key.md @@ -38,7 +38,6 @@ We used the [`resources.Copy`] function to change the publishing path. The `Key` The `Key` method is useful if you need to get the resource's publishing path without publishing the resource. Unlike the `Permalink`, `RelPermalink`, or `Publish` methods, calling `Key` will not publish the resource. - {{% include "methods/resource/_common/global-page-remote-resources.md" %}} [`Permalink`]: /methods/resource/permalink/ diff --git a/content/en/methods/shortcode/Inner.md b/content/en/methods/shortcode/Inner.md index 2814bcc2a..ef8d05ecb 100644 --- a/content/en/methods/shortcode/Inner.md +++ b/content/en/methods/shortcode/Inner.md @@ -56,7 +56,6 @@ Content between opening and closing shortcode tags may include leading and/or tr In the example above, the value returned by `Inner` is Markdown, but it was rendered as plain text. Use either of the following approaches to render Markdown to HTML. {{% /note %}} - ## Use RenderString Let's modify the example above to pass the value returned by `Inner` through the [`RenderString`] method on the `Page` object: diff --git a/content/en/methods/shortcode/Parent.md b/content/en/methods/shortcode/Parent.md index 53fac8237..740b1ad7e 100644 --- a/content/en/methods/shortcode/Parent.md +++ b/content/en/methods/shortcode/Parent.md @@ -46,5 +46,5 @@ Welcome. Today is {{}}. The "now" shortcode formats the current time using: 1. The `dateFormat` argument passed to the "now" shortcode, if present -2. The `dateFormat` argument passed to the "greeting" shortcode, if present -3. The default layout string defined at the top of the shortcode +1. The `dateFormat` argument passed to the "greeting" shortcode, if present +1. The default layout string defined at the top of the shortcode diff --git a/content/en/methods/site/Param.md b/content/en/methods/site/Param.md index b699ef2d4..0c2f621c8 100644 --- a/content/en/methods/site/Param.md +++ b/content/en/methods/site/Param.md @@ -16,7 +16,6 @@ The `Param` method on a `Site` object is a convenience method to return the valu display_toc = true {{< /code-toggle >}} - ```go-html-template {{ .Site.Param "display_toc" }} → true ``` diff --git a/content/en/methods/site/Taxonomies.md b/content/en/methods/site/Taxonomies.md index 4690e6da5..75ddb7a3b 100644 --- a/content/en/methods/site/Taxonomies.md +++ b/content/en/methods/site/Taxonomies.md @@ -73,7 +73,6 @@ authors: - Pride and Prejudice {{< /code-toggle >}} - To list the "suspense" books: ```go-html-template diff --git a/content/en/methods/taxonomy/_common/get-a-taxonomy-object.md b/content/en/methods/taxonomy/_common/get-a-taxonomy-object.md index 928ec085a..9ef2585e1 100644 --- a/content/en/methods/taxonomy/_common/get-a-taxonomy-object.md +++ b/content/en/methods/taxonomy/_common/get-a-taxonomy-object.md @@ -59,7 +59,6 @@ Although the [`Alphabetical`] and [`ByCount`] methods provide a better data stru In the example above, the first anchor element is a link to the term page. - [`Alphabetical`]: /methods/taxonomy/alphabetical/ [`ByCount`]: /methods/taxonomy/bycount/ diff --git a/content/en/myshowcase/index.md b/content/en/myshowcase/index.md index 4d706ccb8..969095d12 100644 --- a/content/en/myshowcase/index.md +++ b/content/en/myshowcase/index.md @@ -20,9 +20,9 @@ byline: "[bep](https://github.com/bep), Hugo Lead" To complete this showcase: 1. Write the story about your site in this file. -2. Add a summary to the `bio.md` file in this directory. -3. Replace the `featured-template.png` with a screenshot of your site. You can rename it, but it must contain the word `featured`. -4. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls +1. Add a summary to the `bio.md` file in this directory. +1. Replace the `featured-template.png` with a screenshot of your site. You can rename it, but it must contain the word `featured`. +1. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls The content of this bundle explained: diff --git a/content/en/quick-reference/page-collections.md b/content/en/quick-reference/page-collections.md index 857f6c619..c86929b5b 100644 --- a/content/en/quick-reference/page-collections.md +++ b/content/en/quick-reference/page-collections.md @@ -13,7 +13,8 @@ toc: true ## Page -Use these `Page` methods when rendering lists on [section](g) pages, [taxonomy](g) pages, [term](g) pages, and the home page. +assets/ +Use these `Page` methods when rendering lists on [section pages](g), [taxonomy pages](g), [term pages](g), and the home page. {{< list-pages-in-section path=/methods/page filter=methods_page_page_collections filterType=include omitElementIDs=true titlePrefix=PAGE. >}} @@ -34,9 +35,9 @@ Use the [`where`] function to filter page collections. By default, Hugo sorts page collections by: 1. [Weight] -2. [Date] in descending order -3. [LinkTitle] falling back to [Title] -4. [Filename] if the page is backed by a file +1. [Date] in descending order +1. [LinkTitle] falling back to [Title] +1. [Filename] if the page is backed by a file [Date]: /methods/page/date/ [Weight]: /methods/page/weight/ diff --git a/content/en/shortcodes/highlight.md b/content/en/shortcodes/highlight.md index 65f54e53f..0a35aa4e6 100755 --- a/content/en/shortcodes/highlight.md +++ b/content/en/shortcodes/highlight.md @@ -51,7 +51,7 @@ OPTIONS : (`string`) Zero or more space-separated key-value pairs wrapped in quotation marks. Set default values for each option in your [site configuration]. The key names are case-insensitive. [site configuration]: /getting-started/configuration-markup#highlight -[supported languages]: https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages +[supported languages]: /content-management/syntax-highlighting/#list-of-chroma-highlighting-languages ## Example @@ -102,7 +102,6 @@ Given the verbosity of the example above, if you need to frequently highlight in {{ transform.Highlight $code $lang $opts }} {{< /code >}} - ```text This is some {{}}fmt.Println("inline"){{}} code. ``` diff --git a/content/en/shortcodes/x.md b/content/en/shortcodes/x.md index b2e531f54..6995d727f 100755 --- a/content/en/shortcodes/x.md +++ b/content/en/shortcodes/x.md @@ -37,7 +37,6 @@ Rendered: {{< x user="SanDiegoZoo" id="1453110110599868418" >}} - ## Privacy Adjust the relevant privacy settings in your site configuration. diff --git a/content/en/showcase/_index.md b/content/en/showcase/_index.md index 6af694687..cec1936ea 100644 --- a/content/en/showcase/_index.md +++ b/content/en/showcase/_index.md @@ -1,4 +1,4 @@ --- title: Showcases draft: true ---- \ No newline at end of file +--- diff --git a/content/en/showcase/overmindstudios/bio.md b/content/en/showcase/overmindstudios/bio.md index 1bd870984..b2f92f08c 100644 --- a/content/en/showcase/overmindstudios/bio.md +++ b/content/en/showcase/overmindstudios/bio.md @@ -4,4 +4,3 @@ The site is built by: * [Tobias Kummer](https://www.overmind-studios.de/about/) - diff --git a/content/en/showcase/template/index.md b/content/en/showcase/template/index.md index 4dc662332..abfb0803c 100644 --- a/content/en/showcase/template/index.md +++ b/content/en/showcase/template/index.md @@ -11,8 +11,8 @@ Have a **notable Hugo site[^1]**? We would love to feature it in this **Showcase Please: 1. Fork https://github.com/gohugoio/hugoDocs. -2. Run `hugo new content showcase/your-site`. This will use the archetype bundle in the [docs repo](https://github.com/gohugoio/hugoDocs/tree/master/archetypes). -3. Follow the instructions in the newly created page bundle. -4. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls. +1. Run `hugo new content showcase/your-site`. This will use the archetype bundle in the [docs repo](https://github.com/gohugoio/hugoDocs/tree/master/archetypes). +1. Follow the instructions in the newly created page bundle. +1. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls. [^1]: We want this to show Hugo in its best light, so this is not for the average Hugo blog. In most cases the answer to "Is my site [notable](https://www.dictionary.com/browse/notable)?" will be obvious, but if in doubt, create an [issue](https://github.com/gohugoio/hugoDocs/issues) with a link and some words, and we can discuss it. But if you have a site with an interesting Hugo story or a company site where the company itself is notable, you are most welcome. diff --git a/content/en/templates/home.md b/content/en/templates/home.md index 2afb8f64d..088f40f26 100644 --- a/content/en/templates/home.md +++ b/content/en/templates/home.md @@ -14,7 +14,6 @@ aliases: [/layout/homepage/,/templates/homepage-template/,/templates/homepage/] The home template is the *only* required template for building a site and therefore useful when bootstrapping a new site and template. It is also the only required template if you are developing a single-page website. - {{< youtube ut1xtRZ1QOA >}} ## Home template lookup order diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 50105e3c8..b68ecf925 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -376,7 +376,7 @@ Use the [`template`] function to include one or more of Hugo's [embedded templat [`partial`]: /functions/partials/include/ [`partialCached`]: /functions/partials/includecached/ -[`template`]: functions/go-template/template/ +[`template`]: /functions/go-template/template/ Use the [`partial`] or [`partialCached`] function to include one or more [partial templates]: diff --git a/content/en/templates/pagination.md b/content/en/templates/pagination.md index 1e2a7587a..674c6a565 100644 --- a/content/en/templates/pagination.md +++ b/content/en/templates/pagination.md @@ -114,11 +114,10 @@ To paginate a list page using the `Paginate` method: In the example above, we: 1. Build a page collection -2. Sort the page collection by title -3. Paginate the page collection, with 7 pages per pager -4. Range over the paginated page collection, rendering a link to each page -5. Call the embedded pagination template to create navigation links between pagers - +1. Sort the page collection by title +1. Paginate the page collection, with 7 pages per pager +1. Range over the paginated page collection, rendering a link to each page +1. Call the embedded pagination template to create navigation links between pagers To paginate a list page using the `Paginator` method: @@ -133,8 +132,8 @@ To paginate a list page using the `Paginator` method: In the example above, we: 1. Paginate the page collection passed into the template, with the default number of pages per pager -2. Range over the paginated page collection, rendering a link to each page -3. Call the embedded pagination template to create navigation links between pagers +1. Range over the paginated page collection, rendering a link to each page +1. Call the embedded pagination template to create navigation links between pagers ## Caching diff --git a/content/en/templates/robots.md b/content/en/templates/robots.md index 76e3895f0..0e453c549 100644 --- a/content/en/templates/robots.md +++ b/content/en/templates/robots.md @@ -33,7 +33,7 @@ Search engines that honor the Robots Exclusion Protocol will interpret this as p You may overwrite the internal template with a custom template. Hugo selects the template using this lookup order: 1. `/layouts/robots.txt` -2. `/themes//layouts/robots.txt` +1. `/themes//layouts/robots.txt` ## robots.txt template example @@ -50,7 +50,7 @@ This template creates a robots.txt file with a `Disallow` directive for each pag To create a robots.txt file without using a template: 1. Set `enableRobotsTXT` to `false` in the site configuration. -2. Create a robots.txt file in the `static` directory. +1. Create a robots.txt file in the `static` directory. Remember that Hugo copies everything in the [`static` directory][static] to the root of `publishDir` (typically `public`) when you build your site. diff --git a/content/en/templates/sitemap.md b/content/en/templates/sitemap.md index 27885a206..166f54933 100644 --- a/content/en/templates/sitemap.md +++ b/content/en/templates/sitemap.md @@ -79,4 +79,4 @@ disableKinds = ['sitemap'] {{}} [`publishDir`]: /getting-started/configuration#publishdir -[sitemap protocol]: +[sitemap protocol]: https://www.sitemaps.org/protocol.html diff --git a/content/en/tools/search.md b/content/en/tools/search.md index d6fc7921e..73aea7ce4 100644 --- a/content/en/tools/search.md +++ b/content/en/tools/search.md @@ -46,7 +46,6 @@ A static website with a dynamic search function? Yes, Hugo provides an alternati [INFINI Pizza for WebAssembly](https://github.com/infinilabs/pizza-docsearch) : Pizza is a super-lightweight yet fully featured search engine written in Rust. You can quickly add offline search functionality to your Hugo website in just five minutes with only three lines of code. For a step-by-step guide on integrating it with Hugo, check out [this blog tutorial](https://dev.to/medcl/adding-search-functionality-to-a-hugo-static-site-based-on-infini-pizza-for-webassembly-4h5e). - ## Commercial [Algolia](https://www.algolia.com/) diff --git a/content/en/troubleshooting/deprecation.md b/content/en/troubleshooting/deprecation.md index aa4bb71a2..81f2724a3 100644 --- a/content/en/troubleshooting/deprecation.md +++ b/content/en/troubleshooting/deprecation.md @@ -13,8 +13,8 @@ weight: 50 When a project _deprecates_ something, they are telling its users: 1. Don't use Thing One anymore. -2. Use Thing Two instead. -3. We're going to remove Thing One at some point in the future. +1. Use Thing Two instead. +1. We're going to remove Thing One at some point in the future. [reasons for deprecation]: https://en.wikipedia.org/wiki/Deprecation @@ -30,8 +30,8 @@ Common [reasons for deprecation]: After the project team deprecates something in code, Hugo will: 1. Log an INFO message for 6 minor releases[^1] -2. Log a WARN message for another 6 minor releases -3. Log an ERROR message and fail the build thereafter +1. Log a WARN message for another 6 minor releases +1. Log an ERROR message and fail the build thereafter To see the INFO messages, you must use the `--logLevel` command line flag: diff --git a/content/en/troubleshooting/faq.md b/content/en/troubleshooting/faq.md index 4a669b7ba..4891c566b 100644 --- a/content/en/troubleshooting/faq.md +++ b/content/en/troubleshooting/faq.md @@ -9,7 +9,6 @@ menu: parent: troubleshooting weight: 70 weight: 70 -# Use level 6 headings for each question. --- Hugo’s [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question. @@ -43,10 +42,10 @@ If the answer to any of these questions is yes, either change the field values, In the `content/section/page.md` file, or in the `content/section/page/index.md` file: - - Is `draft` set to `true`? - - Is the `date` in the future? - - Is the `publishDate` in the future? - - Is the `expiryDate` in the past? +- Is `draft` set to `true`? +- Is the `date` in the future? +- Is the `publishDate` in the future? +- Is the `expiryDate` in the past? If the answer to any of these questions is yes, either change the field values, or use one of these command line flags: `--buildDrafts`, `--buildFuture`, or `--buildExpired`.