]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Squashed 'docs/' changes from 80dd7b067..0755fb534
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 23 Mar 2026 17:21:25 +0000 (18:21 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 23 Mar 2026 17:21:25 +0000 (18:21 +0100)
0755fb534 misc: Update docs.yaml
f0c69a38c content: Remove outdated content
43ce895b9 content: Remove outdated new-in badges
c3a382fb7 content: Improve GitLab Pages workflow example
f2a851966 content: Update Vimeo example
044565ab3 content: Fix typo
9f5e8b5f4 content: Update version references
9dc30f225 theme: Address deprecations in v0.158.0
ea0787a6b content: Document css.Build function
f98e4f55c content: Standardize Node.js references
bf683e36f content: Use consistent file system terminology
54ed4c12b content: Document strings.ReplacePairs
779d37978 all: Miscellaneous updates for v0.158.0
be1a20c27 Update HUGO_VERSION to 0.158.0
24cdd7bf7 Fix typos in module configuration documentation
ce37e7b05 content: Address Markdown linting error
592049f02 content: Remove unnecessary workflow customization section
b17b18ce1 content: Update version references in hosting guides
32ec89596 content: Improve urls.PathEscape/PathUnescape examples
9297bb6fa content: Clarify page collection sort order
60192a16f content: Add reference link to glossary term
63d4a992a content: Update documentation contribution guide
946273d67 theme: Adjust feature state notices
d70dfd651 theme: Simplify border classes per Tailwind linter
fc53c7263 theme: Refactor feature status shortcodes
850dc5b2b content: Clean up content for deprecated features
35da1aa3c content: Miscellaneous udpates for v0.157.0
05b69f84e content: More site-to-project changes
291ffc3f6 content: Add blogger2hugo migration tool
53a1bdee3 Update HUGO_VERSION to 0.157.0
808f0431d Merge branch 'tempv0.157.0'
f02222e46 docs: Regen and fix the imaging docshelper output
b0d3364f1 Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922'
d1f37cc6d resources/images: Adjust WebP processing defaults
9a9f02fb8 Add per-request timeout option to `resources.GetRemote`
900c10201 docs: Fix lineNos default value in docs.yaml
0052c975a docs: Regenerate docs.yaml
3e2f98235 Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82'
dbfd34a1a docs: Update docs.yaml
7e1a08e54 Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0'
cb6e0a42a tpl: Add missing functions to init files
05544e400 markup/asciidocext: Improve Asciidoctor integration
820b5536a github: Add ai-watchdog workflow and update other workflows' versions
3848aec5f markup/goldmark: Enhance footnote extension with backlinkHTML option
070074dac markup/goldmark: Enhance footnote extension with auto-prefixing option
f92f7ac5c config/security: Add PROGRAMDATA to the osenv allowlist
d1ab84530 minifiers: Update deprecation handling
6c911d1e5 Merge commit 'bfa74537929f409fca841540b971125b7678963a'
61916ab4c resources/page: Add :sectionslug and :sectionslugs permalink tokens
80667667c Add Ancestors (plural) method to GitInfo, rename Ancestor field to Parent
e8fdc1d4d source: Expose Ancestor in GitInfo
079671b41 Merge commit 'bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45'
9e8a08520 images: Add option for vertical alignment to images.Text
f7c795479 Merge commit 'b3d87dd0fd746f07f9afa6e6a2969aea41da6a38'
283e97783 Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
4c6ec5c19 resources/page: Revise the new contentbasename permalinks tokens
fc69d3981 resources/page: Add :contentbasename and :contentbasenameorslug permalink tokens
c5f654716 modules: Add GOAUTH to module config
2a1a832fb js/esbuild: Add drop option
d9fb55352 Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'
84678f5af helpers: Add Chroma styles to docs.yaml
fc8d9e344 Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'
4e4da5e47 Merge commit '81a7b6390036138356773c87a886679c81c524e1'
5df38fde0 docs: Regen CLI docs
3b0f8034b tpl/images: Change signature of images.QR to images.QR TEXT OPTIONS
68187036f images.Text: Add "alignx" option for horizontal alignment
240a85734 docs: Regen CLI docs
21b2917c6 Merge commit 'e9fbadacc3f09191e2e19f112a49777eeb8df06c'
5cc7ad562 tpl/images: Add images.QR function
9b588ee9e Update gocloud and docs for S3-Compatible Endpoints
b24377040 tpl/tplimpl: Update details shortcode
0535f4b22 tpl/tplimpl: Add details shortcode
2dd21cf90 Merge commit 'e477373487abcccdbed95688e37aa74b9b8fc198'
869321ffa dartsass: Add silenceDeprecations option
492981933 Merge commit '838bd312b1a287bb33962ad478dbc54737654f35'
c79b7d840 docs: Regen CLI docs
101410f08 docs: Regenerate CLI docs
700846bc9 Merge commit 'de0df119b504a91c9e1f442b07954f366ffb2932'
1fb46bb7c docs: Regen CLI docs
923fd9044 commands: Add "hugo build" as an alias for "hugo"
244ea3067 Merge commit '39fd3b557014e339bc6c68a7ff34a7734a735ee0'
f2e8913d2 Add support for Obsidian type blockquote alerts
9777cfa83 Merge commit 'dec8cd4ada29218971743333f8ac662a9c06aad8'
b3f6d546c output: Fix docshelper template lookup order for AMP pages
476507712 Add config options page.nextPrevSortOrder/nextPrevInSectionSortOrder
b2507b8ab tpl/transform: Make Plainify and ToMath return template.HTML
154525780 docs: Regen docshelper
9d9a0848c Merge commit 'a6e635ca7d905d9ec3ffd708db2694f680b03aae'
b56a8baa1 math: Add trigonometric functions and some angle helper functions
59f708c0e source: Expose GitInfo Body
7a330c378 Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
1ea10926d deploy: Add stripIndexHtml target option
903da161a markup/goldmark: Add the Hugo Goldmark Extras "delete" extension
63cf1ea35 deps: Upgrade github.com/alecthomas/chroma v2.13.0 => v2.14.0
6dcbebe11 config: Remove extraneous BuildConfig setting
1c89b76c2 docs: Regen docshelper
976b30877 markup/goldmark: Support extras extension
0da4eee49 commands: Add gen chromastyles --lineNumbersTableStyle flag
daf545b56 docs: Regen docshelper
a46a8ac97 all: Fix duplicate words in comments
9a3c76650 tpl/tplimpl: Optionally exclude content from sitemap
737b3b210 tpl/tplimpl: Update Google Analytics template and config
9283d3071 docs: Regen CLI docs
fa0437be3 docs: Regen docshelper
c318cd850 docs: Fix hyphens and grammar in synopsis of command 'hugo server'
5896f23a9 js: Support JSX and JSXImportSourceOptions
08b0bca77 Merge commit '2658a71e1b6fe24a8b754a62ce0398a09d270d86'
c4c5be6c2 docs: Regen docshelper
ec07d66fe Add images.Dither filter
3b23f2b89 docs: Regen CLI docs
d1c5d6a5e docs: Regenerate docshelper
6c8c9da77 Merge commit '6efb279bfacbd7304cef994be8181c6f804e7dd4'
5ce83ee91 docs: Make null booleans falsy in the docs helper
1185cfc71 docs: Regen docs helper
aab11aad7 Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'

git-subtree-dir: docs
git-subtree-split: 0755fb534d8b4cde8a0227698da634e3536283ff

162 files changed:
.codespellrc
.cspell.json
content/en/_common/functions/go-html-template-package.md
content/en/_common/functions/go-template/text-template.md
content/en/_common/functions/js/options.md
content/en/_common/functions/reflect/image-reflection-functions.md [new file with mode: 0644]
content/en/_common/installation/04-build-from-source.md
content/en/_common/methods/resource/processing-spec.md
content/en/_common/permalink-tokens.md
content/en/about/features.md
content/en/commands/_index.md
content/en/commands/hugo_gen_chromastyles.md
content/en/configuration/all.md
content/en/configuration/build.md
content/en/configuration/caches.md
content/en/configuration/front-matter.md
content/en/configuration/imaging.md
content/en/configuration/introduction.md
content/en/configuration/languages.md
content/en/configuration/markup.md
content/en/configuration/media-types.md
content/en/configuration/minify.md
content/en/configuration/module.md
content/en/configuration/output-formats.md
content/en/configuration/pagination.md
content/en/configuration/params.md
content/en/configuration/permalinks.md
content/en/configuration/privacy.md
content/en/configuration/segments.md
content/en/configuration/server.md
content/en/content-management/content-adapters.md
content/en/content-management/front-matter.md
content/en/content-management/image-processing/index.md
content/en/content-management/menus.md
content/en/content-management/multilingual.md
content/en/content-management/page-resources.md
content/en/content-management/related-content.md
content/en/content-management/shortcodes.md
content/en/content-management/taxonomies.md
content/en/content-management/urls.md
content/en/contribute/development.md
content/en/contribute/documentation.md
content/en/functions/collections/Sort.md
content/en/functions/collections/Where.md
content/en/functions/css/Build.md [new file with mode: 0644]
content/en/functions/css/PostCSS.md
content/en/functions/css/Sass.md
content/en/functions/css/TailwindCSS.md
content/en/functions/go-template/try.md
content/en/functions/hugo/Generator.md
content/en/functions/hugo/IsMultihost.md
content/en/functions/hugo/IsMultilingual.md
content/en/functions/hugo/Sites.md
content/en/functions/hugo/Version.md
content/en/functions/images/Config.md
content/en/functions/images/Filter.md
content/en/functions/images/Process.md
content/en/functions/js/Babel.md
content/en/functions/js/Build.md
content/en/functions/lang/Translate.md
content/en/functions/math/Counter.md
content/en/functions/reflect/IsImageResource.md
content/en/functions/reflect/IsImageResourceProcessable.md [new file with mode: 0644]
content/en/functions/reflect/IsImageResourceWithMeta.md [new file with mode: 0644]
content/en/functions/resources/Babel.md [deleted file]
content/en/functions/resources/FromString.md
content/en/functions/resources/GetRemote.md
content/en/functions/resources/PostCSS.md [deleted file]
content/en/functions/resources/PostProcess.md
content/en/functions/resources/ToCSS.md [deleted file]
content/en/functions/strings/ReplacePairs.md [new file with mode: 0644]
content/en/functions/templates/Defer.md
content/en/functions/transform/HTMLUnescape.md
content/en/functions/transform/Remarshal.md
content/en/functions/transform/XMLEscape.md
content/en/functions/urls/PathEscape.md
content/en/functions/urls/PathUnescape.md
content/en/getting-started/directory-structure.md
content/en/getting-started/quick-start.md
content/en/getting-started/usage.md
content/en/host-and-deploy/host-on-aws-amplify/index.md
content/en/host-and-deploy/host-on-cloudflare/index.md
content/en/host-and-deploy/host-on-github-pages/index.md
content/en/host-and-deploy/host-on-gitlab-pages.md
content/en/host-and-deploy/host-on-netlify/index.md
content/en/host-and-deploy/host-on-render/index.md
content/en/host-and-deploy/host-on-sourcehut-pages.md
content/en/host-and-deploy/host-on-vercel/index.md
content/en/hugo-modules/use-modules.md
content/en/methods/menu-entry/Identifier.md
content/en/methods/menu-entry/KeyName.md
content/en/methods/page/Aliases.md
content/en/methods/page/AllTranslations.md
content/en/methods/page/GitInfo.md
content/en/methods/page/IsTranslated.md
content/en/methods/page/Language.md
content/en/methods/page/Path.md
content/en/methods/page/Plain.md
content/en/methods/page/ReadingTime.md
content/en/methods/page/Sitemap.md
content/en/methods/page/Sites.md
content/en/methods/page/TranslationKey.md
content/en/methods/page/Translations.md
content/en/methods/pager/PageSize.md [deleted file]
content/en/methods/pager/PagerSize.md
content/en/methods/resource/Colors.md
content/en/methods/resource/Crop.md
content/en/methods/resource/Err.md
content/en/methods/resource/Exif.md
content/en/methods/resource/Fill.md
content/en/methods/resource/Filter.md
content/en/methods/resource/Fit.md
content/en/methods/resource/Height.md
content/en/methods/resource/Meta.md
content/en/methods/resource/Process.md
content/en/methods/resource/Resize.md
content/en/methods/resource/Width.md
content/en/methods/site/AllPages.md
content/en/methods/site/BuildDrafts.md
content/en/methods/site/Data.md
content/en/methods/site/GetPage.md
content/en/methods/site/IsDefault.md
content/en/methods/site/Language.md
content/en/methods/site/LanguagePrefix.md
content/en/methods/site/Languages.md
content/en/methods/site/Sites.md
content/en/quick-reference/glossary/interleave.md [new file with mode: 0644]
content/en/quick-reference/glossary/mount.md
content/en/quick-reference/glossary/processable-image.md
content/en/quick-reference/glossary/segment.md
content/en/quick-reference/glossary/unified-file-system.md
content/en/quick-reference/page-collections.md
content/en/render-hooks/images.md
content/en/render-hooks/links.md
content/en/shortcodes/ref.md
content/en/shortcodes/relref.md
content/en/shortcodes/vimeo.md
content/en/templates/404.md
content/en/templates/embedded.md
content/en/templates/introduction.md
content/en/templates/pagination.md
content/en/templates/shortcode.md
content/en/templates/types.md
content/en/tools/migrations.md
content/en/troubleshooting/logging.md
data/docs.yaml
data/page_filters.yaml
hugo.toml
layouts/_markup/render-link.html
layouts/_partials/layouts/blocks/alert.html
layouts/_partials/layouts/blocks/feature-state.html [new file with mode: 0644]
layouts/_shortcodes/code-toggle.html
layouts/_shortcodes/deprecated-in.html
layouts/_shortcodes/get-page-desc.html [new file with mode: 0644]
layouts/_shortcodes/list-pages-in-section.html [deleted file]
layouts/_shortcodes/new-in.html
layouts/_shortcodes/per-lang-config-keys.html
layouts/_shortcodes/render-list-of-pages-in-section.html [new file with mode: 0644]
layouts/_shortcodes/render-table-of-pages-in-section.html [new file with mode: 0644]
layouts/baseof.html
layouts/list.rss.xml
netlify.toml

index 8f82b8749531fc22b2ce4312aa670d7a7ceaa80c..eaa1c65df31df132aa58bc993ea668f4d4d13957 100644 (file)
@@ -7,7 +7,7 @@
 skip = *.ai,chroma.css,chroma_dark.css,.cspell.json,./data/docs.yaml
 
 # Comma separated list of words to be ignored. Words must be lowercased.
-ignore-words-list = abl,edn,januar,te,trys,ue,womens
+ignore-words-list = abl,edn,ist,januar,te,trys,ue,womens
 
 # Check file names as well.
 check-filenames = true
index 8adfc51dd38fd15ea60912e5ef3bcd7530eba5b7..f1b2b9b5534ee9bc001f4285382103b719df259a 100644 (file)
     "**/tools/*"
   ],
   "ignoreRegExpList": [
-    "# cspell: ignore fenced code blocks",
+    // cspell: ignore fenced code blocks
     "^(\\s*`{3,}).*[\\s\\S]*?^\\1$",
-    "# cspell: ignore words joined with dot",
+    // cspell: ignore words joined with dot
     "\\w+\\.\\w+",
-    "# cspell: ignore strings within backticks",
+    // cspell: ignore strings within backticks
     "`.+`",
-    "# cspell: ignore strings within double quotes",
+    // cspell: ignore strings within double quotes
     "\".+\"",
-    "# cspell: ignore strings within brackets",
+    // cspell: ignore strings within brackets
     "\\[.+\\]",
-    "# cspell: ignore strings within parentheses",
+    // cspell: ignore strings within parentheses
     "\\(.+\\)",
-    "# cspell: ignore words that begin with a slash",
+    // cspell: ignore words that begin with a slash
     "/\\w+",
-    "# cspell: ignore everything within action delimiters",
+    // cspell: ignore everything within action delimiters
     "\\{\\{.+\\}\\}",
-    "# cspell: ignore everything after a right arrow",
-    "\\s+→\\s+.+"
+    // cspell: ignore everything after a right arrow
+    "\\s+→\\s+.+",
   ],
   "language": "en",
   "words": [
@@ -76,9 +76,9 @@
     "unmarshaled",
     "unmarshaling",
     "unmarshals",
-    "# ----------------------------------------------------------------------",
-    "# cspell: ignore hugo terminology",
-    "# ----------------------------------------------------------------------",
+    // ------------------------------------------------------------------------
+    // cspell: ignore hugo terminology",
+    // ------------------------------------------------------------------------
     "alignx",
     "aligny",
     "attrlink",
     "unmarshal",
     "unpublishdate",
     "zgotmplz",
-    "# ----------------------------------------------------------------------",
-    "# cspell: ignore foreign language words",
-    "# ----------------------------------------------------------------------",
+    // ------------------------------------------------------------------------
+    // cspell: ignore foreign language words",
+    // ------------------------------------------------------------------------
     "bezpieczeństwo",
     "blatt",
     "buch",
     "prywatność",
     "referenz",
     "régime",
-    "# ----------------------------------------------------------------------",
-    "# cspell: ignore names",
-    "# ----------------------------------------------------------------------",
+    // ------------------------------------------------------------------------
+    // cspell: ignore names",
+    // ------------------------------------------------------------------------
     "Atishay",
     "Cosette",
     "Eliott",
     "Ninke",
     "Noll",
     "Pastorius",
+    "Pontmercy",
     "Samsa",
     "Stucki",
     "Thénardier",
     "Vitter",
     "WASI",
-    "# ----------------------------------------------------------------------",
-    "# cspell: ignore operating systems and software packages",
-    "# ----------------------------------------------------------------------",
+    // ------------------------------------------------------------------------
+    // cspell: ignore operating systems and software packages",
+    // ------------------------------------------------------------------------
     "asciidoctor",
     "brotli",
     "cifs",
     "pkgin",
     "rclone",
     "xubuntu",
-    "# ----------------------------------------------------------------------",
-    "# cspell: ignore miscellaneous",
-    "# ----------------------------------------------------------------------",
+    // ------------------------------------------------------------------------
+    // cspell: ignore miscellaneous",
+    // ------------------------------------------------------------------------
     "achristie",
     "ccpa",
     "cpra",
index 57992ea66b113d218b14f257e30515d8d87307fc..ed3a6afc4931967ecd188792034e3e2e7bd15de3 100644 (file)
@@ -2,13 +2,13 @@
 _comment: Do not remove front matter.
 ---
 
-Hugo uses Go's [text/template] and [html/template] packages.
+Hugo uses Go's [`text/template`][] and [`html/template`][] packages.
 
-The text/template package implements data-driven templates for generating textual output, while the html/template package implements data-driven templates for generating HTML output safe against code injection.
+The `text/template` package implements data-driven templates for generating textual output, while the `html/template` package implements data-driven templates for generating HTML output safe against code injection.
 
-By default, Hugo uses the html/template package when rendering HTML files.
+By default, Hugo uses the `html/template` package when rendering HTML files.
 
-To generate HTML output that is safe against code injection, the html/template package escapes strings in certain contexts.
+To generate HTML output that is safe against code injection, the `html/template` package escapes strings in certain contexts.
 
-[text/template]: https://pkg.go.dev/text/template
-[html/template]: https://pkg.go.dev/html/template
+[`text/template`]: https://pkg.go.dev/text/template
+[`html/template`]: https://pkg.go.dev/html/template
index 4b934c1e98a23db0a31a2902ccd4d77062a812c5..c3215577871bb7bb226d5be1c14a59b6e18680f9 100644 (file)
@@ -2,6 +2,6 @@
 _comment: Do not remove front matter.
 ---
 
-See Go's [text/template] documentation for more information.
+See Go's [`text/template`][] documentation for more information.
 
-[text/template]: https://pkg.go.dev/text/template
+[`text/template`]: https://pkg.go.dev/text/template
index 077775dcb1c3d389de5f08ccf8b5e76a4729deef..837855da35dcd969b8343f3152e2b73ff43d5aff 100644 (file)
@@ -18,7 +18,7 @@ params
   Note that this is meant for small data sets, e.g., configuration settings. For larger data sets, please put/mount the files into `assets` and import them directly.
 
 minify
-: (`bool`) Whether to let `js.Build` handle the minification.
+: (`bool`) Whether to minify the generated CSS code. Default is `false`.
 
 loaders
 : {{< new-in 0.140.0 />}}
@@ -77,11 +77,11 @@ drop
 : See <https://esbuild.github.io/api/#drop>
 
 sourceMap
-: (`string`) Whether to generate `inline`, `linked`, or `external` source maps from esbuild. Linked and external source maps will be written to the target with the output file name + ".map". When `linked` a `sourceMappingURL` will also be written to the output file. By default, source maps are not created. Note that the `linked` option was added in Hugo 0.140.0.
+: (`string`) The type of source map to generate. One of `external`, `inline`, `linked`, or `none`. Default is `none`. Linked and external source maps will be written to the target with the output file name + ".map". When `linked` a `sourceMappingURL` will also be written to the output file.
 
 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`.
+: (`bool`) Whether to include the content of the source files in the source map. Default is `true`.
 
 JSX
 : (`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/_common/functions/reflect/image-reflection-functions.md b/content/en/_common/functions/reflect/image-reflection-functions.md
new file mode 100644 (file)
index 0000000..2b49b19
--- /dev/null
@@ -0,0 +1,49 @@
+---
+_comment: Do not remove front matter.
+---
+
+## Image operations
+
+Use these functions to determine which operations Hugo supports for a given resource. While Hugo classifies a variety of file types as image resources, its ability to process them or extract metadata varies by format.
+
+- [`reflect.IsImageResource`][]: {{% get-page-desc "/functions/reflect/isimageresource" %}}
+- [`reflect.IsImageResourceProcessable`][]: {{% get-page-desc "/functions/reflect/isimageresourceprocessable" %}}
+- [`reflect.IsImageResourceWithMeta`][]: {{% get-page-desc "/functions/reflect/isimageresourcewithmeta" %}}
+
+The table below shows the values these functions return for various file formats. Use it to determine which checks are required before calling specific methods in your templates.
+
+|Format|IsImageResource|IsImageResourceProcessable|IsImageResourceWithMeta|
+|:-----|:--------------|:-------------------------|:----------------------|
+|AVIF  |true           |**false**                 |true                   |
+|BMP   |true           |true                      |true                   |
+|GIF   |true           |true                      |true                   |
+|HEIC  |true           |**false**                 |true                   |
+|HEIF  |true           |**false**                 |true                   |
+|ICO   |true           |**false**                 |**false**              |
+|JPEG  |true           |true                      |true                   |
+|PNG   |true           |true                      |true                   |
+|SVG   |true           |**false**                 |**false**              |
+|TIFF  |true           |true                      |true                   |
+|WebP  |true           |true                      |true                   |
+
+This contrived example demonstrates how to iterate through resources and use these functions to apply the appropriate handling for each image format.
+
+```go-html-template
+{{ range resources.Match "**" }}
+  {{ if reflect.IsImageResource . }}
+    {{ if reflect.IsImageResourceProcessable . }}
+      {{ with .Process "resize 300x webp" }}
+        <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+      {{ end }}
+    {{ else if reflect.IsImageResourceWithMeta . }}
+      <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+    {{ else }}
+      <img src="{{ .RelPermalink }}" alt="">
+    {{ end }}
+  {{ end }}
+{{ end }}
+```
+
+[`reflect.IsImageResource`]: /functions/reflect/isimageresource/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
+[`reflect.IsImageResourceWithMeta`]: /functions/reflect/isimageresourcewithmeta/
index fb2588d8a5a23f1986ca43e22bdb2d27173b9b31..47dcd90283879fe8ba37bcfc26750e20fd9ab86e 100644 (file)
@@ -7,7 +7,7 @@ _comment: Do not remove front matter.
 To build the extended or extended/deploy edition from source you must:
 
 1. Install [Git]
-1. Install [Go] version 1.24.0 or later
+1. Install [Go] version 1.25.0 or later
 1. Install a C compiler, either [GCC] or [Clang]
 1. Update your `PATH` environment variable as described in the [Go documentation]
 
index 226c0ba6d0d2d2dd32a5734fe7febb66d00caf13..140a4eb347d918e4c1115a27e6b26e07261e37fe 100644 (file)
@@ -10,7 +10,7 @@ action
 : Specify one of `crop`, `fill`, `fit`, or `resize`. This is applicable to the [`Process`][] method and the [`images.Process`][] filter. If you specify an action, you must also provide dimensions.
 
 anchor
-: The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`smartcrop.js`][] library to identify the most interesting area of the image. This defaults to the [`anchor`][] parameter in your project configuration.
+: The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`muesli/smartcrop`][] package to identify the most interesting area of the image. This defaults to the [`anchor`][] parameter in your project configuration.
 
 background color
 : The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the  processing specification. The value must be an RGB [hexadecimal color][]. This defaults to the [`bgColor`][] parameter in your project configuration.
@@ -62,12 +62,12 @@ rotation
 [`bgcolor`]: /configuration/imaging/#bgcolor
 [`compression`]: /configuration/imaging/#compression
 [`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
+[`muesli/smartcrop`]: https://github.com/muesli/smartcrop
 [`hint`]: /configuration/imaging/#hint
 [`images.AutoOrient`]: /functions/images/autoorient/
 [`images.Process`]: /functions/images/process/
 [`Process`]: /methods/resource/process
 [`quality`]: /configuration/imaging/#quality
 [`resampleFilter`]: /configuration/imaging/#resamplefilter
-[`smartcrop.js`]: https://github.com/jwagner/smartcrop.js
 [hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
 [source documentation]: https://github.com/disintegration/imaging#image-resizing
index aac412576a2045fd86184549a509899d0b3d0a5e..fa8308a7043efe25eab3ba4f379ba3c10ded5ec8 100644 (file)
@@ -44,18 +44,12 @@ _comment: Do not remove front matter.
 : The `slug` as defined in front matter, else the `title` as defined in front matter, else the automatic title. Hugo generates titles automatically for section, taxonomy, and term pages that are not backed by a file.
 
 `:filename`
-: The content's file name without extension, applicable to the `page` page kind.
-
-  {{< deprecated-in v0.144.0 >}}
-  The `:filename` token has been deprecated. Use `:contentbasename` instead.
-  {{< /deprecated-in >}}
+: {{< deprecated-in v0.144.0 />}}
+:  Use `:contentbasename` instead.
 
 `:slugorfilename`
-: The `slug` as defined in front matter, else the content's file name without extension, applicable to the `page` page kind.
-
-  {{< deprecated-in v0.144.0 >}}
-  The `:slugorfilename` token has been deprecated. Use `:slugorcontentbasename` instead.
-  {{< /deprecated-in >}}
+: {{< deprecated-in v0.144.0 />}}
+:  Use `:slugorcontentbasename` instead.
 
 `:contentbasename`
 : {{< new-in 0.144.0 />}}
index 04c61fc657ebd86c00dd43efa8b2566497678241..4c190eee215828bf61f268054ad7573151cd9e4e 100644 (file)
@@ -15,7 +15,7 @@ weight: 20
 : Localize your project for each language and region, including translations, images, dates, currencies, numbers, percentages, and collation sequence. Hugo's multilingual framework supports single-host and multihost configurations.
 
 [Output formats]
-: Render each page of your site to one or more output formats, with granular control by page kind, section, and path. While HTML is the default output format, you can add JSON, RSS, CSV, and more. For example, create a REST API to access content.
+: Render each page of your project to one or more output formats, with granular control by page kind, section, and path. While HTML is the default output format, you can add JSON, RSS, CSV, and more. For example, create a REST API to access content.
 
 [Templates]
 : Create templates using variables, functions, and methods to transform your content, resources, and data into a published page. While HTML templates are the most common, you can create templates for any output format.
@@ -24,10 +24,10 @@ weight: 20
 : Reduce development time and cost by using one of the hundreds of themes contributed by the Hugo community. Themes are available for corporate sites, documentation projects, image portfolios, landing pages, personal and professional blogs, resumes, CVs, and more.
 
 [Modules]
-: Reduce development time and cost by creating or importing packaged combinations of archetypes, assets, content, data, templates, translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site.
+: Reduce development time and cost by creating or importing packaged combinations of archetypes, assets, content, data, templates, translation tables, static files, or configuration settings. A module may serve as the basis for a new project, or to augment an existing project.
 
 [Privacy]
-: Configure your site to help comply with regional privacy regulations.
+: Configure your project to help comply with regional privacy regulations.
 
 [Security]
 : Hugo's security model is based on the premise that template and configuration authors are trusted, but content authors are not. This model enables generation of HTML output safe against code injection. Other protections prevent "shelling out" to arbitrary applications, limit access to specific environment variables, prevent connections to arbitrary remote data sources, and more.
@@ -98,7 +98,7 @@ weight: 20
 : Reduce build time and cost by rendering a _partial_ template once then cache the result, either globally or within a given context. For example, cache the result of an asset pipeline to prevent reprocessing on every rendered page.
 
 [Segmentation]
-: Reduce build time and cost by partitioning your sites into segments. For example, render the home page and the "news section" every hour, and render the entire site once a week.
+: Reduce build time and cost by partitioning your sites into segments. For example, render the home page and the "news section" every hour, and render the entire project once a week.
 
 [Minification]
 : Minify HTML, CSS, and JavaScript to reduce file size, bandwidth consumption, and loading times.
index 5869bfd9d033dff39034a9b401b58bb07440c094..b97b6e2a284ac368f02ecfef6f3242277982a2d5 100644 (file)
@@ -1,7 +1,7 @@
 ---
 title: Command line interface
 linkTitle: CLI
-description: Use the command line interface (CLI) to manage your site.
+description: Use the command line interface (CLI) to manage your project.
 categories: []
 keywords: []
 weight: 10
index 5d6ed753c94a7ec5966c240313666becb3ecb6dd..522d357bd4c6fd0bd565a725417cdc766569fe66 100644 (file)
@@ -11,7 +11,7 @@ Generate CSS stylesheet for the Chroma code highlighter
 
 Generate CSS stylesheet for the Chroma code highlighter for a given style. This stylesheet is needed if markup.highlight.noClasses is disabled in config.
 
-See https://xyproto.github.io/splash/docs/all.html for a preview of the available styles
+See https://gohugo.io/quick-reference/syntax-highlighting-styles/ for a preview of the available styles.
 
 ```
 hugo gen chromastyles [flags] [args]
@@ -26,7 +26,7 @@ hugo gen chromastyles [flags] [args]
       --lineNumbersTableStyle string    foreground and background colors for table line numbers, e.g. --lineNumbersTableStyle "#fff000 bg:#000fff"
       --omitClassComments               omit CSS class comment prefixes in the generated CSS
       --omitEmpty                       omit empty CSS rules (deprecated, no longer needed)
-      --style string                    highlighter style (see https://xyproto.github.io/splash/docs/) (default "friendly")
+      --style string                    highlighter style (default "friendly")
 ```
 
 ### Options inherited from parent commands
index cff51a2ae3ba4da20e41c184bac6c1161e74712b..5cd79a467dfc66ae41c981e7e0705b46a584703e 100644 (file)
@@ -115,7 +115,7 @@ enableEmoji
 : (`bool`) Whether to allow emoji in Markdown. Default is `false`.
 
 enableGitInfo
-: (`bool`) For sites under Git version control, whether to enable the [`GitInfo`][] object for each page. With the [default front matter configuration][], the `Lastmod` method on a `Page` object will return the Git author date. Default is `false`.
+: (`bool`) Whether to retrieve commit metadata from the Git history of your local project and any [modules](g). This enables the [`GitInfo`][] method on a `Page` object. With the default front matter configuration, the [`Lastmod`][] method on a `Page` object returns the Git author date of the last commit for that file. Default is `false`.
 
 enableMissingTranslationPlaceholders
 : (`bool`) Whether to show a placeholder instead of the default value or an empty string if a translation is missing. Default is `false`.
@@ -153,7 +153,7 @@ ignoreVendorPaths
 imaging
 : See [configure imaging][].
 
-languageCode
+locale
 : (`string`) The site's language tag, conforming to the syntax described in [RFC 5646][]. This value does not affect translations or localization. Hugo uses this value to populate:
 
   - The `language` element in the [embedded RSS template][]
@@ -355,42 +355,46 @@ none
 
 Some configuration settings, such as menus and custom parameters, can be defined separately for each language. See [configure languages][].
 
+[Associated Press Stylebook]: https://www.apstylebook.com/
+[Chicago Manual of Style]: https://www.chicagomanualofstyle.org/home.html
+[IANA Time Zone Database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
+[XDG base directory specification]: https://specifications.freedesktop.org/basedir-spec/latest/
+[`FuzzyWordCount`]: /methods/page/fuzzywordcount/
+[`GitInfo`]: /methods/page/gitinfo/
+[`Lastmod`]: /methods/page/lastmod/
+[`MainSections`]: /methods/site/mainsections/
+[`Summary`]: /methods/page/summary/
+[`WordCount`]: /methods/page/wordcount/
 [`cacheDir`]: #cachedir
-[`defaultContentLanguage`]: #defaultcontentlanguage
 [`defaultContentLanguageInSubdir`]: #defaultcontentlanguageinsubdir
-[`defaultContentRole`]: #defaultcontentrole
+[`defaultContentLanguage`]: #defaultcontentlanguage
 [`defaultContentRoleInSubdir`]: #defaultcontentroleinsubdir
-[`defaultContentVersion`]: #defaultcontentversion
+[`defaultContentRole`]: #defaultcontentrole
 [`defaultContentVersionInSubdir`]: #defaultcontentversioninsubdir
-[`disabled`]: /configuration/languages/#disabled
+[`defaultContentVersion`]: #defaultcontentversion
 [`disableDefaultSiteRedirect`]: #disabledefaultsiteredirect
+[`disabled`]: /configuration/languages/#disabled
 [`erroridf`]: /functions/fmt/erroridf/
-[`FuzzyWordCount`]: /methods/page/fuzzywordcount/
-[`GitInfo`]: /methods/page/gitinfo/
-[`MainSections`]: /methods/site/mainsections/
 [`publishDir`]: #publishdir
 [`segments`]: /configuration/segments/
 [`staticDir`]: #staticdir
 [`strings.Title`]: /functions/strings/title/
-[`Summary`]: /methods/page/summary/
 [`time.AsTime`]: /functions/time/astime/
 [`time.Format`]: /functions/time/format/
 [`titleCaseStyle`]: #titlecasestyle
 [`warnidf`]: /functions/fmt/warnidf/
-[`WordCount`]: /methods/page/wordcount/
 [aliases_front_matter]: /content-management/front-matter/#aliases
 [aliases_page_method]: /methods/page/aliases/
-[Associated Press Stylebook]: https://www.apstylebook.com/
 [automatic summaries]: /content-management/summaries/#automatic-summary
-[Chicago Manual of Style]: https://www.chicagomanualofstyle.org/home.html
 [client-side redirection]: /content-management/urls/#client-side-redirection
 [composite characters]: https://en.wikipedia.org/wiki/Precomposed_character
+[configure HTTP cache]: /configuration/http-cache/
 [configure build]: /configuration/build/
 [configure cascade]: /configuration/cascade/
 [configure deployment]: /configuration/deployment/
 [configure file caches]: /configuration/caches/
 [configure front matter]: /configuration/front-matter/
-[configure HTTP cache]: /configuration/http-cache/
 [configure imaging]: /configuration/imaging/
 [configure languages]: /configuration/languages/
 [configure markup]: /configuration/markup/
@@ -415,15 +419,11 @@ Some configuration settings, such as menus and custom parameters, can be defined
 [configure taxonomies]: /configuration/taxonomies/
 [configure ugly URLs]: /configuration/ugly-urls/
 [configure versions]: /configuration/versions/
-[default front matter configuration]: /configuration/front-matter/
 [duration]: https://pkg.go.dev/time#Duration
-[embedded alias template]: <{{% eturl alias %}}>
 [embedded Open Graph template]: <{{% eturl opengraph %}}>
 [embedded RSS template]: <{{% eturl rss %}}>
-[IANA Time Zone Database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+[embedded alias template]: <{{% eturl alias %}}>
 [module mounts]: /configuration/module/#mounts
 [non-spacing marks]: https://www.compart.com/en/unicode/category/Mn
 [os.UserCacheDir]: https://pkg.go.dev/os#UserCacheDir
-[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
 [this configuration]: https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml
-[XDG base directory specification]: https://specifications.freedesktop.org/basedir-spec/latest/
index 77432cf1a7ddce1b25e8d8c3344aecc8ad6397d6..71d3020e49ca58dfce7818c3779c3aa8c4e8ab54 100644 (file)
@@ -33,17 +33,17 @@ The `build.cachebusters` configuration option was added to support development u
   [build.buildStats]
     enable = true
   [[build.cachebusters]]
-    source = "assets/watching/hugo_stats\\.json"
-    target = "styles\\.css"
+    source = 'assets/watching/hugo_stats\.json'
+    target = 'styles\.css'
   [[build.cachebusters]]
-    source = "(postcss|tailwind)\\.config\\.js"
-    target = "css"
+    source = '(postcss|tailwind)\.config\.js'
+    target = 'css'
   [[build.cachebusters]]
-    source = "assets/.*\\.(js|ts|jsx|tsx)"
-    target = "js"
+    source = 'assets/.*\.(js|ts|jsx|tsx)'
+    target = 'js'
   [[build.cachebusters]]
-    source = "assets/.*\\.(.*)$"
-    target = "$1"
+    source = 'assets/.*\.(.*)$'
+    target = '$1'
 {{< /code-toggle >}}
 <!-- markdownlint-enable MD049 -->
 
index fb8ec3ad141c57e57401e29f3c849de8328b8d7a..14ae43b0912ee0b2804e589d4a15001ff2a2a85d 100644 (file)
@@ -26,6 +26,9 @@ images
 misc
 : Caches miscellaneous data.
 
+modulegitinfo
+: Caches Git information for modules.
+
 modulequeries
 : Caches the results of module resolution queries.
 
index e348f8578f21c45a8da40be57aea099d04effc39..272140b6247b57a578dea47746ffe40719a5ef67 100644 (file)
@@ -12,10 +12,10 @@ There are four methods on a `Page` object that return a date.
 
 Method|Description
 :--|:--
-[`Date`]|Returns the date of the given page.
-[`ExpiryDate`]|Returns the expiry date of the given page.
-[`Lastmod`]|Returns the last modification date of the given page.
-[`PublishDate`]|Returns the publish date of the given page.
+[`Date`][]|Returns the date of the given page.
+[`ExpiryDate`][]|Returns the expiry date of the given page.
+[`Lastmod`][]|Returns the last modification date of the given page.
+[`PublishDate`][]|Returns the publish date of the given page.
 
 [`Date`]: /methods/page/date
 [`ExpiryDate`]: /methods/page/expirydate
@@ -76,12 +76,12 @@ Hugo provides the following [tokens](g) to help you configure your front matter:
 
   Within the `YYYY-MM-DD-HH-MM-SS` format, the date and time values may be separated by any character including a space (e.g., `2025-02-01T14-30-00`).
 
-  Hugo resolves the extracted date to the [`timeZone`] defined in your project configuration, falling back to the system time zone. After extracting the date, Hugo uses the remaining part of the file name to generate the page's [`slug`], but only if you haven't already specified a slug in the page's front matter.
+  Hugo resolves the extracted date to the [`timeZone`][] defined in your project configuration, falling back to the system time zone. After extracting the date, Hugo uses the remaining part of the file name to generate the page's [`slug`][], but only if you haven't already specified a slug in the page's front matter.
 
   For example, if you name your file `2025-02-01-article.md`, Hugo will set the date to `2025-02-01` and the slug to `article`.
 
 `:git`
-: The Git author date for the file's last revision. To enable access to the Git author date, set [`enableGitInfo`] to `true`, or use the `--enableGitInfo` flag when building your project.
+: The Git author date for the file's last revision. To enable access to the Git author date, set [`enableGitInfo`][] to `true`.
 
 ## Example
 
index 69c654d605fc6e812f40a0307ea4e303533f596c..c0ba731803037512416e35319bd2f149187b2f9a 100644 (file)
@@ -6,21 +6,16 @@ categories: []
 keywords: []
 ---
 
-## Processing options
-
 These are the default settings for processing images:
 
-{{< code-toggle file=hugo >}}
-[imaging]
-anchor = 'Smart'
-bgColor = '#ffffff'
-compression = 'lossy'
-quality = 75
-resampleFilter = 'box'
-{{< /code-toggle >}}
+{{< code-toggle config=imaging />}}
+
+## Top-level options
+
+These global settings define how Hugo handles the fundamental aspects of image manipulation, such as cropping logic, background colors, and general output quality.
 
 anchor
-: (`string`) The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`smartcrop.js`][] library to identify the most interesting area of the image. Default is `Smart`.
+: (`string`) The focal point used when cropping or filling an image. Valid case-insensitive options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`muesli/smartcrop`][] package to identify the most interesting area of the image. Default is `smart`.
 
 bgColor
 : (string) The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the  processing specification. The value must be an RGB [hexadecimal color][]. Default is `#ffffff`.
@@ -46,18 +41,32 @@ resampleFilter
 
   Refer to the [source documentation][] for a complete list of available resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters.
 
-## WebP images
+## Exif method
+
+{{< deprecated-in 0.155.0 >}}
+Use [`Meta`](/methods/resource/meta/) instead.
+{{< /deprecated-in >}}
+
+## Meta method
 
 {{< new-in 0.155.0 />}}
 
-These are the default settings specific to processing WebP images:
+The following parameters allow you to control how Hugo extracts and filters metadata when using the [`Meta`][] method, helping you balance data granularity with build performance.
+
+fields
+: (`[]string`) A [glob slice](g) matching the fields to include when extracting metadata. If empty, a default set excluding technical metadata is used. Set&nbsp;to&nbsp;`['**']`&nbsp;to include all fields.
+
+  > [!note]
+  > By default, to improve performance and decrease cache size, Hugo excludes the following fields: `ColorSpace`, `Contrast`, `Exif`, `ExposureBias`, `ExposureMode`, `ExposureProgram`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`.
+
+sources
+: (`[]string`) The metadata sources to include, one or more of `exif`, `iptc`, or `xmp`. Default is `['exif', 'iptc']`. The XMP metadata is excluded by default to improve performance.
+
+## WebP images
+
+{{< new-in 0.155.0 />}}
 
-{{< code-toggle file=hugo >}}
-[imaging.webp]
-hint = 'photo'
-method = 4
-useSharpYuv = true
-{{< /code-toggle >}}
+These specialized settings provide granular control over the WebP encoding process, allowing you to optimize compression based on the specific visual characteristics of your imagery.
 
 hint
 : (`string`) The encoding preset used when processing WebP images, equivalent to the `-preset` flag for the [`cwebp`][] CLI. Valid options include `drawing`, `icon`, `photo`, `picture`, or `text`. Default is `photo`.
@@ -71,62 +80,12 @@ hint
   `text`|Image that is primarily text
 
 method
-: (`int`) The effort level of the compression algorithm. Expressed as a whole number from `0` to `6`, inclusive, equivalent to the `-m` flag for the [`cwebp`][] CLI. Lower numbers prioritize processing speed, while higher numbers prioritize compression efficiency. Default is `4`.
+: (`int`) The effort level of the compression algorithm. Expressed as a whole number from `0` to `6`, inclusive, equivalent to the `-m` flag for the [`cwebp`][] CLI. Lower numbers prioritize processing speed, while higher numbers prioritize compression efficiency. Default is `2`.
 
 useSharpYuv
-: (`bool`) The conversion method used for RGB-to-YUV encoding, equivalent to the `-sharp_yuv` flag for the [`cwebp`][] CLI. Enabling this prioritizes image sharpness at the expense of processing speed. Default is `true`.
-
-## Exif method
-
-These are the default settings for the [`Exif`] method on an image `Resource` object:
-
-{{< code-toggle file=hugo >}}
-[imaging.exif]
-disableDate = false
-disableLatLong = false
-excludeFields = ""
-includeFields = ""
-{{< /code-toggle >}}
-
-disableDate
-: (`bool`) Whether to disable the [`Date`][] method by returning its zero value. Default is `false`.
-
-disableLatLong
-: (`bool`) Whether to disable the [`Lat`][] and [`Long`][] methods by returning their zero values. Default is `false`.
-
-excludeFields
-: (`string`) A [regular expression](g) matching the fields to exclude when extracting metadata.
-
-  > [!note]
-  > By default, to improve performance and decrease cache size, Hugo excludes the following fields: `ColorSpace`, `Contrast`, `Exif`, `ExposureBias`, `ExposureMode`, `ExposureProgram`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`.
-
-includeFields
-: (`string`) A [regular expression](g) matching the fields to include when extracting metadata. If empty, a default set excluding technical metadata is used. Set&nbsp;to&nbsp;`'.*'`&nbsp;to include all fields.
-
-## Meta method
-
-{{< new-in 0.155.0 />}}
-
-These are the default settings for the [`Meta`] method on an image `Resource` object:
-
-{{< code-toggle file=hugo >}}
-[imaging.meta]
-fields = []
-sources = ['exif', 'iptc']
-{{< /code-toggle >}}
-
-fields
-: (`[]string`) A [glob slice](g) matching the fields to include when extracting metadata. If empty, a default set excluding technical metadata is used. Set&nbsp;to&nbsp;`['**']`&nbsp;to include all fields.
-
-  > [!note]
-  > By default, to improve performance and decrease cache size, Hugo excludes the following fields: `ColorSpace`, `Contrast`, `Exif`, `ExposureBias`, `ExposureMode`, `ExposureProgram`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`.
-
-sources
-: (`[]string`) The metadata sources to include, one or more of `exif`, `iptc`, or `xmp`. Default is `['exif', 'iptc']`. The XMP metadata is excluded by default to improve performance.
+: (`bool`) The conversion method used for RGB-to-YUV encoding, equivalent to the `-sharp_yuv` flag for the [`cwebp`][] CLI. Enabling this prioritizes image sharpness at the expense of processing speed. Default is `false`.
 
 [`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
-[`Exif`]: /methods/resource/exif/
-[`Meta`]: /methods/resource/meta/
-[`smartcrop.js`]: https://github.com/jwagner/smartcrop.js
+[`muesli/smartcrop`]: https://github.com/muesli/smartcrop
 [hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
 [source documentation]: https://github.com/disintegration/imaging#image-resizing
index f4a60884c9e36cd7afb23e867193b49e51ebb066..7a117ba00ce498b07523d0d20932a4d7024ddf37 100644 (file)
@@ -8,11 +8,11 @@ weight: 10
 
 ## Sensible defaults
 
-Hugo offers many configuration options, but its defaults are often sufficient. A new site requires only these settings:
+Hugo offers many configuration options, but its defaults are often sufficient. A new project requires only these settings:
 
 {{< code-toggle file=hugo >}}
 baseURL = 'https://example.org/'
-languageCode = 'en-us'
+locale = 'en-us'
 title = 'My New Hugo Site'
 {{< /code-toggle >}}
 
@@ -37,7 +37,7 @@ A simple example:
 
 {{< code-toggle file=hugo >}}
 baseURL = 'https://example.org/'
-languageCode = 'en-us'
+locale = 'en-us'
 title = 'ABC Widgets, Inc.'
 [params]
 subtitle = 'The Best Widgets on Earth'
@@ -191,7 +191,7 @@ and this project-level configuration:
 
 {{< code-toggle file=hugo >}}
 baseURL = 'https://example.org/'
-languageCode = 'en-us'
+locale = 'en-us'
 title = 'My New Hugo Site'
 theme = ['theme-a','theme-b']
 {{< /code-toggle >}}
index 0ad9d44c6bcadc2d5dff83cba6c7a3b932ea9cca..b289d8ae55f7bf2b4894ce6cc96fdd5c54248e54 100644 (file)
@@ -1,14 +1,14 @@
 ---
 title: Configure languages
 linkTitle: Languages
-description: Configure the languages in your multilingual site.
+description: Configure the languages in your multilingual project.
 categories: []
 keywords: []
 ---
 
 ## Base settings
 
-Configure the following base settings within the site's root configuration:
+Configure the following base settings:
 
 {{< code-toggle file=hugo >}}
 defaultContentLanguage = 'en'
@@ -38,10 +38,28 @@ Configure each language under the `languages` key:
 
 In the above, `en` is the [language key](#language-keys).
 
+direction
+: (`string`) The language direction, either left-to-right (`ltr`) or right-to-left (`rtl`). Use this value in your templates with the global [`dir`][] HTML attribute. Access this value from a template using the [`Language.Direction`][] method on a `Site` or `Page` object. Default is `ltr`.
+
 disabled
 : (`bool`) Whether to disable this language when building the site. Default is `false`.
 
+label
+: (`string`) The language name, typically used when rendering a language switcher. Access this value from a template using the [`Language.Label`][] method on a `Site` or `Page` object.
+
 languageCode
+: {{<deprecated-in 0.158.0 />}}
+: Use [`locale`](#locale) instead.
+
+languageDirection
+: {{<deprecated-in 0.158.0 />}}
+: Use [`direction`](#direction) instead.
+
+languageName
+: {{<deprecated-in 0.158.0 />}}
+: Use [`label`](#label) instead.
+
+locale
 : (`string`) The language tag as described in [RFC 5646][]. This is the primary value used by the [`language.Translate`][] function to select a translation table, falling back to the language key if a matching translation table does not exist.
 
   Hugo also uses this value to populate:
@@ -53,19 +71,13 @@ languageCode
   > [!note]
   > This value does not affect localization of dates, numbers, and currencies, nor does it affect the site's URL structure. These are controlled by the [language key](#language-keys).
 
-  Access this value from a template using the [`Language.LanguageCode`][] method on a `Site` or `Page` object.
-
-languageDirection
-: (`string`) The language direction, either left-to-right (`ltr`) or right-to-left (`rtl`). Use this value in your templates with the global [`dir`][] HTML attribute. Access this value from a template using the [`Language.LanguageDirection`][] method on a `Site` or `Page` object. Default is `ltr`.
-
-languageName
-: (`string`) The language name, typically used when rendering a language switcher. Access this value from a template using the [`Language.LanguageName`][] method on a `Site` or `Page` object.
+  Access this value from a template using the [`Language.Locale`][] method on a `Site` or `Page` object.
 
 title
 : (`string`) The site title for this language. Access this value from a template using the [`Title`][] method on a `Site` object.
 
 weight
-: (`int`) The language [weight](g). When set to a non-zero value, this is the primary sort criteria for this language. Access this value from a template using the [`Language.Weight`][] method on a `Site` or `Page` object.
+: (`int`) The language [weight](g). When set to a non-zero value, this is the primary sort criteria for this language.
 
 ## Sort order
 
@@ -77,11 +89,11 @@ Some configuration settings can be defined separately for each language. For exa
 
 {{< code-toggle file=hugo >}}
 [languages.en]
-languageCode = 'en-US'
-languageName = 'English'
-weight = 1
-title = 'Project Documentation'
+label = 'English'
+locale = 'en-US'
 timeZone = 'America/New_York'
+title = 'Project Documentation'
+weight = 1
 [languages.en.pagination]
 path = 'page'
 [languages.en.params]
@@ -101,11 +113,11 @@ Language keys must conform to the syntax described in [RFC 5646][]. For example:
 {{< code-toggle file=hugo >}}
 defaultContentLanguage = 'de'
 [languages.de]
-  weight = 1
+weight = 1
 [languages.en-US]
-  weight = 2
+weight = 2
 [languages.pt-BR]
-  weight = 3
+weight = 3
 {{< /code-toggle >}}
 
 Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7][] are also supported. Omit the `art-x-` prefix from the language key. For example:
@@ -130,10 +142,10 @@ disableDefaultLanguageRedirect = false
 
 [languages.de]
 contentDir = 'content/de'
+direction = 'ltr'
 disabled = false
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
+label = 'Deutsch'
+locale = 'de-DE'
 title = 'Projekt Dokumentation'
 weight = 1
 
@@ -142,10 +154,10 @@ subtitle = 'Referenz, Tutorials und Erklärungen'
 
 [languages.en]
 contentDir = 'content/en'
+direction = 'ltr'
 disabled = false
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
+label = 'English'
+locale = 'en-US'
 title = 'Project Documentation'
 weight = 2
 
@@ -167,17 +179,16 @@ For example:
 
 {{< code-toggle file=hugo >}}
 defaultContentLanguage = 'fr'
-[languages]
-  [languages.en]
-    baseURL = 'https://en.example.org/'
-    languageName = 'English'
-    title = 'In English'
-    weight = 2
-  [languages.fr]
-    baseURL = 'https://fr.example.org'
-    languageName = 'Français'
-    title = 'En Français'
-    weight = 1
+[languages.en]
+baseURL = 'https://en.example.org/'
+label = 'English'
+title = 'In English'
+weight = 2
+[languages.fr]
+baseURL = 'https://fr.example.org'
+label = 'Français'
+title = 'En Français'
+weight = 1
 {{</ code-toggle >}}
 
 With the above, Hugo publishes two sites, each with their own root:
@@ -188,20 +199,19 @@ public
 └── fr
 ```
 
-[`defaultContentLanguage`]: #defaultcontentlanguage
+[RFC 5646 § 2.2.7]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7
+[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
+[`Language.Direction`]: /methods/site/language/#direction
+[`Language.Label`]: /methods/site/language/#label
+[`Language.Locale`]: /methods/site/language/#locale
+[`Title`]: /methods/site/title/
 [`defaultContentLanguageInSubdir`]: #defaultcontentlanguageinsubdir
+[`defaultContentLanguage`]: #defaultcontentlanguage
 [`dir`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir
 [`disableDefaultSiteRedirect`]: /configuration/all/#disabledefaultsiteredirect
-[`Language.LanguageCode`]: /methods/site/language/#languagecode
-[`Language.LanguageDirection`]: /methods/site/language/#languagedirection
-[`Language.LanguageName`]: /methods/site/language/#languagename
 [`language.Translate`]: /functions/lang/translate/
-[`Language.Weight`]: /methods/site/language/#weight
-[`Title`]: /methods/site/title/
-[embedded alias template]: <{{% eturl alias %}}>
 [embedded OpenGraph template]: <{{% eturl opengraph %}}>
 [embedded RSS template]: <{{% eturl rss %}}>
+[embedded alias template]: <{{% eturl alias %}}>
 [language keys]: #language-keys
-[RFC 5646 § 2.2.7]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7
-[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
 [translating by file name]: /content-management/multilingual/#translation-by-file-name
index 0829f9db52455ec76c4d3fdc9b7585cc39864a96..087086ed47ec53011aa945869faf90d8daa45948 100644 (file)
@@ -134,10 +134,10 @@ Markdown|Replaced by|Description
 Most of the Goldmark settings above are self-explanatory, but some require explanation.
 
 duplicateResourceFiles
-: (`bool`) Whether to duplicate shared page resources for each language on multilingual single-host sites. See [multilingual page resources] for details. Default is `false`.
+: (`bool`) Whether to duplicate shared page resources for each language on multilingual single-host projects. See [multilingual page resources] for details. Default is `false`.
 
   > [!note]
-  > With multilingual single-host sites, setting this parameter to `false` will enable Hugo's [embedded link render hook] and [embedded image render hook]. This is the default configuration for multilingual single-host sites.
+  > With multilingual single-host projects, setting this parameter to `false` will enable Hugo's [embedded link render hook] and [embedded image render hook]. This is the default configuration for multilingual single-host projects.
 
 parser.wrapStandAloneImageWithinParagraph
 : (`bool`) Whether to wrap image elements without adjacent content within a `p` element when rendered. This is the default Markdown behavior. Set to `false` when using an [image render hook] to render standalone images as `figure` elements. Default is `true`.
@@ -243,11 +243,11 @@ workingFolderCurrent
 
 {{< code-toggle file=hugo >}}
 [markup.asciidocExt]
-    extensions = ["asciidoctor-html5s", "asciidoctor-diagram"]
-    workingFolderCurrent = true
-    [markup.asciidocExt.attributes]
-        my-base-url = "https://example.com/"
-        my-attribute-name = "my value"
+extensions = ['asciidoctor-html5s','asciidoctor-diagram']
+workingFolderCurrent = true
+[markup.asciidocExt.attributes]
+my-base-url = 'https://example.com/'
+my-attribute-name = 'my value'
 {{< /code-toggle >}}
 
 ### Syntax highlighting
index ea89ee04a3794dfdca70e9ab9e1ac400760d9b13..82296fb2645a336a15f012ed8fc55bb2796b4915 100644 (file)
@@ -61,21 +61,21 @@ Occasionally, you may need to create a media type without a suffix or delimiter.
 To support these custom output formats, register a custom media type with no suffix or delimiter:
 
 {{< code-toggle file=hugo >}}
-[mediaTypes."text/netlify"]
-delimiter = ""
+[mediaTypes.'text/netlify']
+delimiter = ''
 {{< /code-toggle >}}
 
 The custom output format definitions would look something like this:
 
 {{< code-toggle file=hugo >}}
 [outputFormats.redir]
-baseName    = "_redirects"
+baseName    = '_redirects'
 isPlainText = true
-mediatype   = "text/netlify"
+mediatype   = 'text/netlify'
 [outputFormats.headers]
-baseName       = "_headers"
+baseName       = '_headers'
 isPlainText    = true
-mediatype      = "text/netlify"
+mediatype      = 'text/netlify'
 notAlternative = true
 {{< /code-toggle >}}
 
index 5107385ecf702aef9ed0dbe7364bb5577fd7962f..9329879bf19f6ec0569c2822f0f26945b3ad79a9 100644 (file)
@@ -10,9 +10,9 @@ This is the default configuration:
 
 {{< code-toggle config=minify />}}
 
-See the [tdewolff/minify] project page for details, but note the following:
+See the [`tdewolff/minify`][] project page for details, but note the following:
 
 - `css.inline` is for internal use. Changing this setting has no effect.
 - `html.keepConditionalComments` has been deprecated. Use `html.keepSpecialComments` instead.
 
-[tdewolff/minify]: https://github.com/tdewolff/minify
+[`tdewolff/minify`]: https://github.com/tdewolff/minify
index 9c1618c7130180f9fdcd72b7e9fb305bf462af5a..4f7c98e4e004db3a08b94bc45e8fcbfd1b4f525e 100644 (file)
@@ -30,13 +30,13 @@ auth
 : (`string`) Configures `GOAUTH` when running the Go command for module operations. This is a semicolon-separated list of authentication commands for go-import and HTTPS module mirror interactions. This is useful for private repositories. See `go help goauth` for more information.
 
 noProxy
-: (`string`) A comma-separated list of [glob patterns](g),s matching paths that should not use the [configured proxy server](#proxy).
+: (`string`) A comma-separated list of [glob patterns](g), matching paths that should not use the [configured proxy server](#proxy).
 
 noVendor
 : (`string`) A [glob pattern](g) matching module paths to skip when vendoring.
 
 private
-: (`string`) A comma-separated list of [glob patterns](g),s matching paths that should be treated as private.
+: (`string`) A comma-separated list of [glob patterns](g), matching paths that should be treated as private.
 
 proxy
 : (`string`) The proxy server to use to download remote modules. Default is `direct`, which means `git clone` and similar.
@@ -99,9 +99,9 @@ min
 disable = false
 ignoreConfig = false
 ignoreImports = false
-path = "github.com/gohugoio/hugoTestModules1_linux/modh1_2_1v"
+path = 'github.com/gohugoio/hugoTestModules1_linux/modh1_2_1v'
 [[module.imports]]
-path = "my-shortcodes"
+path = 'my-shortcodes'
 {{< /code-toggle >}}
 
 disable
@@ -152,7 +152,6 @@ target
 : (`string`) Where the mount will reside within Hugo's [unified file system](g). It must begin with one of Hugo's [component](g) directories: archetypes, assets, content, data, i18n, layouts, or static. For example, content/blog.
 
 disableWatch
-: {{< new-in 0.128.0 />}}
 : (`bool`) Whether to disable watching in watch mode for this mount. Default is `false`.
 
 files
@@ -168,15 +167,15 @@ sites
 {{< code-toggle file=hugo >}}
 [module]
 [[module.mounts]]
-    source="content"
-    target="content"
-    files=["! docs/*"]
+source = 'content'
+target = 'content'
+files = ['! docs/*']
 [[module.mounts]]
-    source="node_modules"
-    target="assets"
+source = 'node_modules'
+target = 'assets'
 [[module.mounts]]
-    source="assets"
-    target="assets"
+source = 'assets'
+target = 'assets'
 {{< /code-toggle >}}
 
 [`archetypeDir`]: /configuration/all/#archetypedir
index f2a8e2da70c6997f05dcaa3d78cab57de533d238..2ddb27360bfec1daa40408b66d6ca17a04913d60 100644 (file)
@@ -44,7 +44,7 @@ isHTML
 : (`bool`) Whether to classify the output format as HTML. This value determines when the LiveReload script is injected and, in conjunction with [`permalinkable`](#permalinkable), whether [alias redirects][] are generated. Default is `false`.
 
 isPlainText
-: (`bool`) Whether to parse templates for this output format with Go's [text/template][] package instead of the [html/template][] package. Default is `false`.
+: (`bool`) Whether to parse templates for this output format with Go's [`text/template`][] package instead of the [`html/template`][] package. Default is `false`.
 
 mediaType
 : (`string`) The [media type](g) of the published file. This must match one of the [configured media types][].
@@ -128,7 +128,7 @@ Step 3
   See [configure outputs][] for more information.
 
 Step 4
-: Create a template to render the output format. Since Atom feeds are lists, you need to create a list template. Consult the [template lookup order] to find the correct template path:
+: Create a template to render the output format. Since Atom feeds are lists, you need to create a list template. Consult the [template lookup order][] to find the correct template path:
 
   ```text
   layouts/list.atom.atom
@@ -202,6 +202,6 @@ Output format|Template path
 [configured media types]: /configuration/media-types/
 [default media types]: /configuration/media-types/
 [embedded RSS template]: <{{% eturl rss %}}>
-[html/template]: https://pkg.go.dev/html/template
+[`html/template`]: https://pkg.go.dev/html/template
 [template lookup order]: /templates/lookup-order/
-[text/template]: https://pkg.go.dev/text/template
+[`text/template`]: https://pkg.go.dev/text/template
index 66b3b8cf40719c212666a60da3ec30ddf86dd555..b65abbf5249b3d1991d253a67bb349e066b2057b 100644 (file)
@@ -19,14 +19,14 @@ pagerSize
 path
 : (`string`) The segment of each pager URL indicating that the target page is a pager. Default is `page`.
 
-With multilingual sites you can define the pagination behavior for each language:
+With multilingual projects you can define the pagination behavior for each language:
 
 {{< code-toggle file=hugo >}}
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
+direction = 'ltr'
+label = 'English'
+locale = 'en-US'
 weight = 1
 [languages.en.pagination]
 disableAliases = true
@@ -34,9 +34,9 @@ pagerSize = 10
 path = 'page'
 [languages.de]
 contentDir = 'content/de'
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
+direction = 'ltr'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 2
 [languages.de.pagination]
 disableAliases = true
index 239b0c2da52b75451f2e1cc6ff1c23ea99b8b0fc..1b0233e9bb1ef2faf457e9f21eec0c5b234ac9a2 100644 (file)
@@ -10,8 +10,8 @@ Use the `params` key for custom parameters:
 
 {{< code-toggle file=hugo >}}
 baseURL = 'https://example.org/'
+locale = 'en-US'
 title = 'Project Documentation'
-languageCode = 'en-US'
 [params]
 subtitle = 'Reference, Tutorials, and Explanations'
 [params.contact]
@@ -43,18 +43,18 @@ But you cannot do this:
 {{ .Site.params.kebab-case.foo }}
 ```
 
-## Multilingual sites
+## Multilingual projects
 
-For multilingual sites, create a `params` key under each language:
+For multilingual projects, create a `params` key under each language:
 
 {{< code-toggle file=hugo >}}
 baseURL = 'https://example.org/'
 defaultContentLanguage = 'en'
 
 [languages.de]
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
+direction = 'ltr'
+label = 'Deutsch'
+locale = 'de-DE'
 title = 'Projekt Dokumentation'
 weight = 1
 
@@ -66,9 +66,9 @@ email = 'info@de.example.org'
 phone = '+49 30 1234567'
 
 [languages.en]
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
+direction = 'ltr'
+label = 'English'
+locale = 'en-US'
 title = 'Project Documentation'
 weight = 2
 
index cd1c38083fe9b8bdc91c73a12eed217b17f2c3dd..49ad35b3658138fec64105e3f05afa7ce79b35a9 100644 (file)
@@ -67,7 +67,7 @@ To create a date-based hierarchy for regular pages in the content root:
 
 {{< code-toggle file=hugo >}}
 [permalinks.page]
-"/" = "/:year/:month/:slug/"
+'/' = '/:year/:month/:slug/'
 {{< /code-toggle >}}
 
 Use the same approach with taxonomy terms. For example, to omit the taxonomy segment of the URL:
@@ -105,29 +105,29 @@ defaultContentLanguageInSubdir = true
 
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
+direction = 'ltr'
+label = 'English'
+locale = 'en-US'
 weight = 1
 
 [languages.en.permalinks.page]
-books = "/books/:slug/"
+books = '/books/:slug/'
 
 [languages.en.permalinks.section]
-books = "/books/"
+books = '/books/'
 
 [languages.es]
 contentDir = 'content/es'
-languageCode = 'es-ES'
-languageDirection = 'ltr'
-languageName = 'Español'
+direction = 'ltr'
+label = 'Español'
+locale = 'es-ES'
 weight = 2
 
 [languages.es.permalinks.page]
-books = "/libros/:slug/"
+books = '/libros/:slug/'
 
 [languages.es.permalinks.section]
-books = "/libros/"
+books = '/libros/'
 {{< /code-toggle >}}
 
 The structure of the published site will be:
index c94f2c1c359c0177aa6a9b262bfa8bad7c1b6603..121765bd3ce1e6b2f1d338bb218b15d45cace4a9 100644 (file)
@@ -20,7 +20,7 @@ Hugo's privacy settings can assist in compliance efforts.
 
 ## Embedded templates
 
-Hugo provides [embedded templates](g) to simplify site and content creation. Some of these templates interact with external services. For example, the `youtube` shortcode connects with YouTube's servers to embed videos on your site.
+Hugo provides [embedded templates](g) to simplify project and content creation. Some of these templates interact with external services. For example, the `youtube` shortcode connects with YouTube's servers to embed videos.
 
 Some of these templates include settings to enhance privacy.
 
index 77caa567e03574eb7dcc7562e42014d26bef95f2..d55620136e760c6ba1e220141050344ecd7c060c 100644 (file)
@@ -48,14 +48,14 @@ Place broad filters, such as those for language or output format, in the exclude
 {{< code-toggle file=hugo >}}
 [segments.segment1]
   [[segments.segment1.excludes]]
-    lang = "n*"
+    lang = 'n*'
   [[segments.segment1.excludes]]
-    lang   = "en"
-    output = "rss"
+    lang   = 'en'
+    output = 'rss'
   [[segments.segment1.includes]]
-    kind = "{home,term,taxonomy}"
+    kind = '{home,term,taxonomy}'
   [[segments.segment1.includes]]
-    path = "{/docs,/docs/**}"
+    path = '{/docs,/docs/**}'
 {{< /code-toggle >}}
 
 ## Rendering segments
index 0d4831bff83c24d162ce3a2347148190c1ce6905..2e1e29a82cb0a0dbd003b60ad2a2260590518485 100644 (file)
@@ -53,14 +53,14 @@ Include headers in every server response to facilitate testing, particularly for
 
 {{< code-toggle file=config/development/server >}}
 [[headers]]
-for = "/**"
+for = '/**'
 
 [headers.values]
-X-Frame-Options = "DENY"
-X-XSS-Protection = "1; mode=block"
-X-Content-Type-Options = "nosniff"
-Referrer-Policy = "strict-origin-when-cross-origin"
-Content-Security-Policy = "script-src localhost:1313"
+X-Frame-Options = 'DENY'
+X-XSS-Protection = '1; mode=block'
+X-Content-Type-Options = 'nosniff'
+Referrer-Policy = 'strict-origin-when-cross-origin'
+Content-Security-Policy = 'script-src localhost:1313'
 {{< /code-toggle >}}
 
 ## Redirects
@@ -69,8 +69,8 @@ You can define simple redirect rules.
 
 {{< code-toggle file=config/development/server >}}
 [[redirects]]
-from = "/myspa/**"
-to = "/myspa/"
+from = '/myspa/**'
+to = '/myspa/'
 status = 200
 force = false
 {{< /code-toggle >}}
@@ -90,12 +90,12 @@ If you've already defined other redirects, you must explicitly add the 404 redir
 {{< code-toggle file=config/development/server >}}
 [[redirects]]
 force = false
-from   = "/**"
-to     = "/404.html"
+from   = '/**'
+to     = '/404.html'
 status = 404
 {{< /code-toggle >}}
 
-For multilingual sites, ensure the default language 404 redirect is defined last:
+For multilingual projects, ensure the default language 404 redirect is defined last:
 
 {{< code-toggle file=config/development/server >}}
 defaultContentLanguage = 'en'
index 0af08d732c51f8dbab1158eb14bd563a689d77e8..6bf3490001cbcc7eaa6569b13f936044e5ee670e 100644 (file)
@@ -273,9 +273,9 @@ Step 4
   {{ end }}
   ```
 
-## Multilingual sites
+## Multilingual projects
 
-With multilingual sites you can:
+With multilingual projects you can:
 
 1. Create one content adapter for all languages using the [`EnableAllLanguages`](#enablealllanguages) method as described above.
 1. Create content adapters unique to each language. See the examples below.
index c734789dfa01fdfe2659d4d37d66e555c529662d..bcb40b0777e9c1215017945191042a0c65b9f710 100644 (file)
@@ -293,9 +293,9 @@ kind = 'page'
 {{< /code-toggle >}}
 
 > [!note]
-> For multilingual sites, defining cascade values in your project configuration is often more efficient. This avoids repeating the same cascade values on the home, section, taxonomy, or term page for each language. See&nbsp;[details](/configuration/cascade/).
+> For multilingual projects, defining cascade values in your project configuration is often more efficient. This avoids repeating the same cascade values on the home, section, taxonomy, or term page for each language. See&nbsp;[details](/configuration/cascade/).
 >
-> If you choose to define cascade values in front matter for a multilingual site, you must create a corresponding home, section, taxonomy, or term page for every language.
+> If you choose to define cascade values in front matter for a multilingual project, you must create a corresponding home, section, taxonomy, or term page for every language.
 
 ## Emacs Org Mode
 
index 9df62226586bc3fc056ab8dcf76b4901b66bb91e..173f3b3d30030aedfaba7606a459a481f4935c89 100644 (file)
@@ -1,11 +1,14 @@
 ---
 title: Image processing
-description: Process, transform, and analyze images.
+description: Transform images to change their size, shape, and appearance.
 categories: []
 keywords: []
 ---
 
-Hugo provides methods to transform and analyze images during the build process. The results are cached to ensure subsequent builds remain fast.
+Hugo provides methods to transform and analyze images during the build process. While Hugo can manage any image format as a resource, only [processable images](g) can be transformed using the methods below. The results are cached to ensure subsequent builds remain fast.
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
 
 ## Resources
 
@@ -98,6 +101,8 @@ Example 4: Skip rendering if there's problem accessing a remote resource.
 {{ end }}
 ```
 
+{{% include "/_common/functions/reflect/image-reflection-functions.md" %}}
+
 ## Processing
 
 To transform an image, apply a processing method to the image resource. Hugo generates the processed image on demand, caches the result, and returns a new resource object.
@@ -111,24 +116,17 @@ To transform an image, apply a processing method to the image resource. Hugo gen
 ```
 
 > [!note]
-> Metadata is not preserved during image transformation. Use the `Exif` or `Meta` methods with the _original_ image resource to extract metadata from JPEG, PNG, TIFF, and WebP images.
-
-Each method serves a specific transformation or metadata requirement:
+> Metadata is not preserved during image transformation. Use the [`Meta`][] method with the original image resource to extract metadata from supported formats.
 
-Method|Description
-:--|:--
-[`Colors`]|Returns a slice of the most dominant colors using a simple histogram method.
-[`Crop`]|Returns a new image resource cropped according to the given processing specification.
-[`Exif`]|Applicable to JPEG, PNG, TIFF, and WebP images, returns an object containing Exif metadata.
-[`Fill`]|Returns a new image resource cropped and resized according to the given processing specification.
-[`Filter`]|Applies one or more image filters to the given image resource.
-[`Fit`]|Returns a new image resource downscaled to fit according to the given processing specification.
-[`Meta`]|Applicable to JPEG, PNG, TIFF, and WebP images, returns an object containing Exif, IPTC, and XMP metadata.
-[`Process`]|Returns a new image resource processed according to the given processing specification.
-[`Resize`]|Returns a new image resource resized according to the given processing specification.
-{class="!mt-0"}
+Select a method from the table below for syntax and usage examples, depending on your specific transformation or metadata requirements:
 
-Select a method from the table above for syntax and usage examples.
+{{% render-table-of-pages-in-section
+  path=/methods/resource
+  filter=methods_resource_image_processing
+  filterType=include
+  headingColumn1=Method
+  headingColumn2=Description
+%}}{class="!mt-0"}
 
 ## Performance
 
@@ -162,17 +160,10 @@ If your source images are much larger than the maximum size you intend to publis
 
 See [configure imaging](/configuration/imaging).
 
-[`Colors`]: /methods/resource/colors/
-[`Crop`]: /methods/resource/crop/
-[`Exif`]: /methods/resource/exif/
-[`Fill`]: /methods/resource/fill/
-[`Filter`]: /methods/resource/filter/
-[`Fit`]: /methods/resource/fit/
 [`Height`]: /methods/resource/height/
 [`Meta`]: /methods/resource/meta/
 [`Permalink`]: /methods/resource/permalink/
-[`Process`]: /methods/resource/process/
 [`RelPermalink`]: /methods/resource/relpermalink/
-[`Resize`]: /methods/resource/resize/
 [`Width`]: /methods/resource/width/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
 [file cache]: /configuration/caches/
index 50920eefa0f739eda611908ccde92de2e68c5411..766cad7ef8f78e1e6a88dc9433d453c728f0b33c 100644 (file)
@@ -30,7 +30,7 @@ There are three ways to define menu entries:
 To automatically define a menu entry for each top-level [section](g) of your site, enable the section pages menu in your project configuration.
 
 {{< code-toggle file=hugo >}}
-sectionPagesMenu = "main"
+sectionPagesMenu = 'main'
 {{< /code-toggle >}}
 
 This creates a menu structure that you can access with `site.Menus.main` in your templates. See [menu templates] for details.
index ec31204c2d16f8b54ee4547104b4ffe4ce73a1fb..d3904db71ca931dffd97185c5ad5dbbd473ae024 100644 (file)
@@ -37,15 +37,15 @@ By having the same path and base file name, the content pieces are linked togeth
 This system uses different content directories for each of the languages. Each language's `content` directory is set using the `contentDir` parameter.
 
 {{< code-toggle file=hugo >}}
-languages:
-  en:
-    weight: 10
-    languageName: "English"
-    contentDir: "content/english"
-  fr:
-    weight: 20
-    languageName: "Français"
-    contentDir: "content/french"
+[languages.en]
+contentDir = 'content/english'
+label = "English"
+weight = 10
+
+[languages.fr]
+contentDir = 'content/french'
+label = "Français"
+weight = 20
 {{< /code-toggle >}}
 
 The value of `contentDir` can be any valid path -- even absolute path references. The only restriction is that the content directories cannot overlap.
@@ -110,46 +110,13 @@ If, across the linked bundles, two or more files share the same basename, only o
 > [!note]
 > Page Bundle resources follow the same language assignment logic as content files, both by file name (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`).
 
-## Reference translated content
-
-To create a list of links to translated content, use a template similar to the following:
-
-```go-html-template {file="layouts/_partials/i18nlist.html"}
-{{ if .IsTranslated }}
-<h4>{{ i18n "translations" }}</h4>
-<ul>
-  {{ range .Translations }}
-  <li>
-    <a href="{{ .RelPermalink }}">{{ .Language.Lang }}: {{ .LinkTitle }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
-  </li>
-  {{ end }}
-</ul>
-{{ end }}
-```
-
-The above can be put in a _partial_ template then included in any template. It will not print anything if there are no translations for a given page.
-
-The above also uses the [`i18n` function][i18func] described in the next section.
-
-### List all available languages
-
-`.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator:
-
-```go-html-template {file="layouts/_partials/allLanguages.html"}
-<ul>
-{{ range $.Site.Home.AllTranslations }}
-<li><a href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
-{{ end }}
-</ul>
-```
-
 ## Translation of strings
 
 See the [`lang.Translate`] template function.
 
 ## Localization
 
-The following localization examples assume your site's primary language is English, with translations to French and German.
+The following localization examples assume your project's primary language is English, with translations to French and German.
 
 {{< code-toggle file=hugo >}}
 defaultContentLanguage = 'en'
@@ -157,15 +124,15 @@ defaultContentLanguage = 'en'
 [languages]
 [languages.en]
 contentDir = 'content/en'
-languageName = 'English'
+label = 'English'
 weight = 1
 [languages.fr]
 contentDir = 'content/fr'
-languageName = 'Français'
+label = 'Français'
 weight = 2
 [languages.de]
 contentDir = 'content/de'
-languageName = 'Deutsch'
+label = 'Deutsch'
 weight = 3
 
 {{< /code-toggle >}}
@@ -264,8 +231,8 @@ For a simple menu with a small number of entries, use a single configuration fil
 
 {{< code-toggle file=hugo >}}
 [languages.de]
-languageCode = 'de-DE'
-languageName = 'Deutsch'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 1
 
 [[languages.de.menus.main]]
@@ -279,8 +246,8 @@ pageRef = '/services'
 weight = 20
 
 [languages.en]
-languageCode = 'en-US'
-languageName = 'English'
+label = 'English'
+locale = 'en-US'
 weight = 2
 
 [[languages.en.menus.main]]
@@ -419,11 +386,10 @@ hugo new content content/de/post/test.md
 [configuration directory]: /configuration/introduction/#configuration-directory
 [example menu template]: /templates/menu/#example
 [front matter]: /content-management/menus/#define-in-front-matter
-[i18func]: /functions/lang/translate/
 [lang.FormatAccounting]: /functions/lang/formataccounting/
 [lang.FormatCurrency]: /functions/lang/formatcurrency/
-[lang.FormatNumber]: /functions/lang/formatnumber/
 [lang.FormatNumberCustom]: /functions/lang/formatnumbercustom/
+[lang.FormatNumber]: /functions/lang/formatnumber/
 [lang.FormatPercent]: /functions/lang/formatpercent/
 [lang.Merge]: /functions/lang/merge/
 [project configuration]: /content-management/menus/#define-in-project-configuration
index a915b5f7448df94a11e277e059e3b157df54b7f3..db92734c18113c386d165a1d3b3ce94049c26863 100644 (file)
@@ -175,11 +175,11 @@ For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`,
 {{< code-toggle file=content/inspections/engine/index.md fm=true >}}
 title = 'Engine inspections'
 [[resources]]
-  src = "*specs.pdf"
-  title = "Specification #:counter"
+  src = '*specs.pdf'
+  title = 'Specification #:counter'
 [[resources]]
-  src = "**.pdf"
-  name = "pdf-file-:counter"
+  src = '**.pdf'
+  name = 'pdf-file-:counter'
 {{</ code-toggle >}}
 
 the `Name` and `Title` will be assigned to the resource files as follows:
@@ -193,7 +193,7 @@ the `Name` and `Title` will be assigned to the resource files as follows:
 
 ## Multilingual
 
-By default, with a multilingual single-host site, Hugo does not duplicate shared page resources when building the site.
+By default, with a multilingual single-host project, Hugo does not duplicate shared page during the build.
 
 > [!note]
 > This behavior is limited to Markdown content. Shared page resources for other [content formats] are copied into each language bundle.
@@ -205,13 +205,13 @@ defaultContentLanguage = 'de'
 defaultContentLanguageInSubdir = true
 
 [languages.de]
-languageCode = 'de-DE'
-languageName = 'Deutsch'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 1
 
 [languages.en]
-languageCode = 'en-US'
-languageName = 'English'
+label = 'English'
+locale = 'en-US'
 weight = 2
 {{< /code-toggle >}}
 
@@ -274,7 +274,7 @@ This approach reduces build times, storage requirements, bandwidth consumption,
 > [!important]
 > To resolve Markdown link and image destinations to the correct location, you must use link and image render hooks that capture the page resource with the [`Resources.Get`] method, and then invoke its [`RelPermalink`] method.
 >
-> In its default configuration, Hugo automatically uses the [embedded link render hook] and the [embedded image render hook] for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link or image render hooks are defined by your project, modules, or themes, these will be used instead.
+> In its default configuration, Hugo automatically uses the [embedded link render hook] and the [embedded image render hook] for multilingual single-host projects, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such projects. If custom link or image render hooks are defined by your project, modules, or themes, these will be used instead.
 >
 > You can also configure Hugo to `always` use the embedded link or image render hook, use it only as a `fallback`, or `never` use it. See&nbsp;[details](/configuration/markup/#renderhookslinkuseembedded).
 
index b58a52f20999b77655cd4927bb68561aedb46152..48009ec4612945fdf5a1179f6e5f46c8d1ad179b 100644 (file)
@@ -62,8 +62,8 @@ threshold    = 20
 includeNewer = true
 toLower      = false
 [[related.indices]]
-name        = "fragmentrefs"
-type        = "fragments"
+name        = 'fragmentrefs'
+type        = 'fragments'
 applyFilter = true
 weight      = 80
 {{< /code-toggle >}}
index 777364423a8606a3e65eb2c85259b1b3162d7871..7a1f1b832626db965b15c9212b4629860d2f331e 100644 (file)
@@ -16,7 +16,7 @@ There are three types of shortcodes: embedded, custom, and inline.
 
 Hugo's embedded shortcodes are pre-defined templates within the application. Refer to each shortcode's documentation for specific usage instructions and available arguments.
 
-{{% list-pages-in-section path=/shortcodes %}}
+{{% render-list-of-pages-in-section path=/shortcodes %}}
 
 ## Custom
 
@@ -34,7 +34,7 @@ Then call the shortcode from within markup:
 {{</* audio src=/audio/test.mp3 */>}}
 ```
 
-Learn more about creating shortcodes in the [shortcode templates] section.
+Learn more about creating shortcodes in the [shortcode templates][] section.
 
 ## Inline
 
@@ -51,7 +51,7 @@ enableInlineShortcodes = true
 
 For more information see [configure security](/configuration/security).
 
-The following example demonstrates an inline shortcode, `date.inline`, that accepts a single positional argument: a date/time [layout string].
+The following example demonstrates an inline shortcode, `date.inline`, that accepts a single positional argument: a date/time [layout string][].
 
 ```text {file="content/example.md"}
 Today is
@@ -69,12 +69,12 @@ In the example above, the inline shortcode is executed twice: once upon definiti
 <p>Today is Thursday, January 30, 2025</p>
 ```
 
-Inline shortcodes process their inner content within the same context as regular _shortcode_ templates, allowing you to use any available [shortcode method].
+Inline shortcodes process their inner content within the same context as regular _shortcode_ templates, allowing you to use any available [shortcode method][].
 
 > [!note]
 > You cannot [nest](#nesting) inline shortcodes.
 
-Learn more about creating shortcodes in the [shortcode templates] section.
+Learn more about creating shortcodes in the [shortcode templates][] section.
 
 ## Calling
 
@@ -82,7 +82,7 @@ Shortcode calls involve three syntactical elements: tags, arguments, and notatio
 
 ### Tags
 
-Some shortcodes expect content between opening and closing tags. For example, the embedded [`details`] shortcode requires an opening and closing tag:
+Some shortcodes expect content between opening and closing tags. For example, the embedded [`details`][] shortcode requires an opening and closing tag:
 
 ```text
 {{</* details summary="See the details" */>}}
@@ -90,13 +90,13 @@ This is a **bold** word.
 {{</* /details */>}}
 ```
 
-Some shortcodes do not accept content. For example, the embedded [`instagram`] shortcode requires a single _positional_ argument:
+Some shortcodes do not accept content. For example, the embedded [`instagram`][] shortcode requires a single _positional_ argument:
 
 ```text
 {{</* instagram CxOWiQNP2MO */>}}
 ```
 
-Some shortcodes optionally accept content. For example, you can call the embedded [`qr`] shortcode with content:
+Some shortcodes optionally accept content. For example, you can call the embedded [`qr`][] shortcode with content:
 
 ```text
 {{</* qr */>}}
@@ -116,7 +116,7 @@ Refer to each shortcode's documentation for specific usage instructions and avai
 
 Shortcode arguments can be either _named_ or _positional_.
 
-Named arguments are passed as case-sensitive key-value pairs, as seen in this example with the embedded [`figure`] shortcode. The `src` argument, for instance, is required.
+Named arguments are passed as case-sensitive key-value pairs, as seen in this example with the embedded [`figure`][] shortcode. The `src` argument, for instance, is required.
 
 ```text
 {{</* figure src=/images/kitten.jpg */>}}
@@ -173,7 +173,7 @@ Standard|`{{</* foo */>}} ## Section 2 {{</* /foo */>}}`
 
 #### Markdown notation
 
-Hugo processes the shortcode before the page content is rendered by the Markdown renderer. This means, for instance, that Markdown headings inside a Markdown-notation shortcode will be included when invoking the [`TableOfContents`] method on the `Page` object.
+Hugo processes the shortcode before the page content is rendered by the Markdown renderer. This means, for instance, that Markdown headings inside a Markdown-notation shortcode will be included when invoking the [`TableOfContents`][] method on the `Page` object.
 
 #### Standard notation
 
index 8f990621d3bfba638f32280909f1ff10f220f7e1..c8fcf78c1eb068fca152d8d07bfd4ca601a4534a 100644 (file)
@@ -132,8 +132,8 @@ content/
 Then add front matter to each term page:
 
 {{< code-toggle file=content/authors/jsmith/_index.md fm=true >}}
-title = "John Smith"
-affiliation = "University of Chicago"
+title = 'John Smith'
+affiliation = 'University of Chicago'
 {{< /code-toggle >}}
 
 Then create a _taxonomy_ template specific to the "authors" taxonomy:
index c1b4979e79a1b35546cd6aa8e9d7da8ef76354b5..e82ac0c1a7216f2204b9f151e9e8870015f6711a 100644 (file)
@@ -96,7 +96,7 @@ https://example.org/articles/my-first-article.html
 
 #### Leading slashes
 
-With monolingual sites, `url` values with or without a leading slash are relative to the [`baseURL`][]. With multilingual sites, `url` values with a leading slash are relative to the `baseURL`, and  `url` values without a leading slash are relative to the `baseURL` plus the language prefix.
+With monolingual projects, `url` values with or without a leading slash are relative to the [`baseURL`][]. With multilingual projects, `url` values with a leading slash are relative to the `baseURL`, and  `url` values without a leading slash are relative to the `baseURL` plus the language prefix.
 
 Site type|Front matter `url`|Resulting URL
 :--|:--|:--
@@ -112,9 +112,9 @@ multilingual|`about`|`https://example.org/de/about/`
 You can also use tokens when setting the `url` value. This is typically used in `cascade` sections:
 
 {{< code-toggle file=content/foo/bar/_index.md fm=true >}}
-title ="Bar"
+title ='Bar'
 [[cascade]]
-  url = "/:sections[last]/:slug"
+  url = '/:sections[last]/:slug'
 {{< /code-toggle >}}
 
 Use any of these tokens:
@@ -218,7 +218,7 @@ Unless you provide a custom layout, Hugo uses its [embedded alias template][] to
 
 ```go-html-template
 <!DOCTYPE html>
-<html lang="{{ site.Language.LanguageCode }}">
+<html lang="{{ site.Language.Locale }}">
   <head>
     <title>{{ .Permalink }}</title>
     {{ with .OutputFormats.Canonical }}<link rel="{{ .Rel }}" href="{{ .Permalink }}">{{ end }}
index e19bd304e115ed2edc65f888b73d9ce78a180efd..f2168ca78869fd865143f0c84592d5ea751f4877 100644 (file)
@@ -32,7 +32,7 @@ For a complete guide to contributing to Hugo, see the [Contribution Guide].
 To build the extended or extended/deploy edition from source you must:
 
 1. Install [Git]
-1. Install [Go] version 1.24.0 or later
+1. Install [Go] version 1.25.0 or later
 1. Install a C compiler, either [GCC] or [Clang]
 1. Update your `PATH` environment variable as described in the [Go documentation]
 
@@ -143,7 +143,7 @@ CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
 To build and install a specific release:
 
 ```sh
-CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.156.0
+CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.158.0
 ```
 
 To build and install at the latest commit on the master branch:
index 2d878b020c751ded9aff82be4eda81e9453d2aec..9d464f4ef993a910a66957cf210921dfa6ee2d73 100644 (file)
@@ -77,6 +77,7 @@ Link to the [glossary] as needed and use terms consistently. Pay particular atte
 - "server side" (noun), "server-side" (adjective)
 - "Markdown" (capitalized)
 - "open-source" (hyphenated adjective)
+- "Node.js" (first mention per page), "Node" (subsequent mentions), "node" (for the executable), "npm" (always lowercase)
 
 ### Template types
 
@@ -207,10 +208,10 @@ When available, the "See also" sidebar displays related pages using Hugo's [rela
 If the title in the "See also" sidebar is ambiguous or the same as another page, you can define an alternate title in the front matter:
 
 {{< code-toggle file=hugo >}}
-title = "Long descriptive title"
-linkTitle = "Short title"
+title = 'Long descriptive title'
+linkTitle = 'Short title'
 [params]
-alt_title = "Whatever you want"
+alt_title = 'Whatever you want'
 {{< /code-toggle >}}
 
 Use of the alternate title is limited to the "See also" sidebar.
@@ -298,7 +299,7 @@ Use the [code-toggle shortcode](#code-toggle) to include project configuration e
 ```text
 {{</* code-toggle file=hugo */>}}
 baseURL = 'https://example.org/'
-languageCode = 'en-US'
+locale = 'en-US'
 title = 'My Site'
 {{</* /code-toggle */>}}
 ```
@@ -394,7 +395,7 @@ skipHeader
 ```text
 {{</* code-toggle file=hugo copy=true */>}}
 baseURL = 'https://example.org/'
-languageCode = 'en-US'
+locale = 'en-US'
 title = 'My Site'
 {{</* /code-toggle */>}}
 ```
@@ -404,11 +405,14 @@ title = 'My Site'
 Use the `deprecated-in` shortcode to indicate that a feature is deprecated:
 
 ```text
-{{</* deprecated-in 0.144.0 */>}}
+{{</* deprecated-in 0.144.0 /*/>}}
+```
 
-Use [`hugo.IsServer`] instead.
+You can also include details:
 
-[`hugo.IsServer`]: /functions/hugo/isserver/
+```text
+{{</* deprecated-in 0.144.0 */>}}
+Use [`hugo.IsServer`](/functions/hugo/isserver/) instead.
 {{</* /deprecated-in */>}}
 ```
 
@@ -456,33 +460,21 @@ This is a new feature.
 
 ## New features
 
-Use the [new-in shortcode](#new-in) to indicate a new feature:
-
-```text
-{{</* new-in 0.144.0 */>}}
-```
+Use the [new-in](#new-in) shortcode to indicate a new feature.
 
-The "new in" label will be hidden if the specified version is older than a predefined threshold, based on differences in major and minor versions. See&nbsp;[details](https://github.com/gohugoio/hugoDocs/blob/master/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_shortcodes/new-in.html).
+The new-in shortcode will trigger a build warning if the specified version is older than a predefined threshold, based on differences in major and minor versions. This serves as a reminder to remove this shortcode call. See&nbsp;[details](https://github.com/gohugoio/hugoDocs/blob/master/layouts/_partials/layouts/blocks/feature-state.html).
 
 ## Deprecated features
 
-Use the [deprecated-in shorcode](#deprecated-in) shortcode to indicate that a feature is deprecated:
+Use the [deprecated-in](#deprecated-in) shortcode to indicate that a feature is deprecated.
 
-```text
-{{</* deprecated-in 0.144.0 */>}}
-Use [`hugo.IsServer`] instead.
-
-[`hugo.IsServer`]: /functions/hugo/isserver/
-{{</* /deprecated-in */>}}
-```
-
-When deprecating a function or method, add something like this to front matter:
+The deprecated-in shortcode will trigger a build warning if the specified version is older than a predefined threshold, based on differences in major and minor versions. This serves as a reminder to remove this shortcode call and the associated content. See&nbsp;[details](https://github.com/gohugoio/hugoDocs/blob/master/layouts/_partials/layouts/blocks/feature-state.html).
 
-{{< code-toggle file=content/something/foo.md fm=true >}}
-expiryDate: 2027-02-17 # deprecated 2025-02-17 in v0.144.0
-{{< /code-toggle >}}
+When deprecating a feature that has its own page, also set the `expiryDate` in front matter to two years from the date of deprecation. Include a brief comment to explain the setting:
 
-Set the `expiryDate` to two years from the date of deprecation, and add a brief front matter comment to explain the setting.
+```yaml
+expiryDate: 2028-03-03 # deprecated 2026-03-03 in v0.157.0
+```
 
 ## GitHub workflow
 
index 9a9ed4ac138b8858c972b698acb84aabe90b4b9f..c7bea6c574de8fb70d007e1a0cdba29044aba4ea 100644 (file)
@@ -51,14 +51,14 @@ The examples below assume this project configuration:
 
 {{< code-toggle file=hugo >}}
 [params.authors.a]
-firstName = "Marius"
-lastName  = "Pontmercy"
+firstName = 'Marius'
+lastName  = 'Pontmercy'
 [params.authors.b]
-firstName = "Victor"
-lastName  = "Hugo"
+firstName = 'Victor'
+lastName  = 'Hugo'
 [params.authors.c]
-firstName = "Jean"
-lastName  = "Valjean"
+firstName = 'Jean'
+lastName  = 'Valjean'
 {{< /code-toggle >}}
 
 > [!note]
index 3123b6a36b76c4222dc98b391e3e5f82b6cb889a..40dd78f980039d2906bd91b6d6cf9e88305644e1 100644 (file)
@@ -274,7 +274,7 @@ If `mainSections` is not defined in your project configuration, the `MainSection
 
 ## Boolean/undefined comparison
 
-Consider this site content:
+Consider this project structure:
 
 ```text
 content/
diff --git a/content/en/functions/css/Build.md b/content/en/functions/css/Build.md
new file mode 100644 (file)
index 0000000..932d2c7
--- /dev/null
@@ -0,0 +1,256 @@
+---
+title: css.Build
+description: Bundle, transform, and minify CSS resources.
+categories: []
+keywords: []
+params:
+  functions_and_methods:
+    aliases: []
+    returnType: resource.Resource
+    signatures: ['css.Build [OPTIONS] RESOURCE']
+---
+
+{{< new-in 0.158.0 />}}
+
+Use the `css.Build` function to:
+
+- Recursively replace `@import` statements in CSS files with the content of the imported files
+- Transform syntax for browser compatibility
+- Apply vendor prefixes for browser compatibility
+- Minify the bundled CSS code
+- Create a source map
+
+If an `@import` statement includes a media query, a feature query, or a cascade layer assignment, the function wraps the imported content in the corresponding `@media`, `@supports`, or `@layer` rule.
+
+## Usage
+
+In this example, Hugo bundles the local files referenced by `@import` statements to create and publish a single resource with inline content.
+
+```text
+assets/
+└── css/
+    ├── components/
+    │   ├── a.css
+    │   └── b.css
+    └── main.css
+```
+
+```css {file="assets/css/main.css" copy=true}
+@import url('https://cdn.jsdelivr.net/npm/the-new-css-reset/css/reset.min.css');
+
+@import './components/a.css';
+@import './components/b.css';
+
+.c {color: blue; }
+```
+
+```css {file="assets/css/components/a.css" copy=true}
+.a { color: red; }
+```
+
+```css {file="assets/css/components/b.css" copy=true}
+.b { color: green; }
+```
+
+```go-html-template {file="layouts/_partials/css.html" copy=true}
+{{ with resources.Get "css/main.css" | css.Build }}
+  {{ if hugo.IsDevelopment }}
+    <link rel="stylesheet" href="{{ .RelPermalink }}">
+  {{ else }}
+    {{ with . | fingerprint }}
+      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
+    {{ end }}
+  {{ end }}
+{{ end }}
+```
+
+```go-html-template {file="layouts/baseof.html" copy=true}
+{{ partialCached "css.html" . }}
+```
+
+The generated CSS code:
+
+```css {file="public/css/main.css"}
+@import "https://cdn.jsdelivr.net/npm/the-new-css-reset/css/reset.min.css";
+
+.a {
+  color: red;
+}
+
+.b {
+  color: green;
+}
+
+.c {
+  color: blue;
+}
+```
+
+To minify the generated CSS code, use the [`minify`](#minify) option as described below.
+
+## Options
+
+The `css.Build` function takes an optional map of options based on the underlying [`esbuild`] package. Use these options to fine-tune bundling, minification, and browser compatibility.
+
+externals
+: (`[]string`) A slice of path patterns to exclude from bundling. The `@import` statements for these patterns remain as-is in the generated CSS code. See&nbsp;[details][esb_external].
+
+  ```go-html-template
+  {{ $opts := dict "externals" (slice "./exclude-these/*" "./exclude-these-too/*") }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+loaders
+: (`map`) A map of file extensions to loader types. This determines how files with a given extension are processed during bundling. By default, Hugo uses the `css` loader for `.css` files and the `file` loader for all others. Common loaders include:
+
+  - `css`: Processes the file as a CSS file
+  - `dataurl`: Embeds the file as a base64-encoded data URL
+  - `empty`: Excludes the file from the bundle
+  - `file`: Copies the file to the output directory and rewrites the URL
+  - `text`: Loads the file content as a string
+
+  See&nbsp;[details][esb_loader].
+
+  ```go-html-template
+  {{ $opts := dict "loaders" (dict ".png" "dataurl" ".svg" "dataurl") }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+mainFields
+: (`[]string`) A prioritized slice of field names in a `package.json` file that determine the CSS entry point of a Node package. The default is `["style", "main"]`. See&nbsp;[details][esb_mainfields].
+
+  When an `@import` statement references a Node package, Hugo consults the metadata in the `package.json` file to find the stylesheet. Use this option to support packages that define a CSS entry point using non-standard fields.
+
+  ```go-html-template
+  {{ $opts := dict "mainFields" (slice "css" "style" "main") }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+minify
+: (`bool`) Whether to minify the generated CSS code. Default is `false`. See&nbsp;[details][esb_minify].
+
+  ```go-html-template
+  {{ $opts := dict "minify" true }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+sourceMap
+: (`string`) The type of source map to generate. One of `external`, `inline`, `linked`, or `none`. Default is `none`. See&nbsp;[details][esb_sourcemap].
+
+  ```go-html-template
+  {{ $opts := dict "sourceMap" "linked" }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+sourcesContent
+: (`bool`) Whether to include the content of the source files in the source map. Default is `true`. See&nbsp;[details][esb_sourcesContent].
+
+  ```go-html-template
+  {{ $opts := dict "sourceMap" "linked" "sourcesContent" false }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+target
+: (`[]string`) The target environment for the generated CSS code. This determines which syntax transformations to perform and which vendor prefixes to apply. If unset, no transformations or prefixing are performed. Each element consists of a target name and a version number. Supported targets include `chrome`, `edge`, `firefox`, `ie`, `ios`, `opera`, and `safari`. See&nbsp;[details][esb_target].
+
+  ```go-html-template
+  {{ $target := slice "chrome115" "edge115" "firefox116" "ios16.4" "opera101" "safari16.4" }}
+  {{ $opts := dict "target" $target }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+  In the example above, the target environment is roughly equivalent to the [browserlist][] "baseline widely available" profile as of March 2026.
+
+targetPath
+: (`string`) The path to the generated CSS file, relative to the project's [`publishDir`][]. If unset, this defaults to the asset's original path with a `.css` extension.
+
+  ```go-html-template
+  {{ $opts := dict "targetPath" "css/styles.css" }}
+  {{ $r := resources.Get "css/main.css" | css.Build $opts }}
+  ```
+
+## Example
+
+The example below uses several of the [options](#options) described above to bundle, transform, and minify CSS code.
+
+```go-html-template {file="layouts/_partials/css.html" copy=true}
+{{ with resources.Get "css/main.css" }}
+  {{ $opts := dict
+    "loaders" (dict ".png" "dataurl" ".svg" "dataurl")
+    "minify" (cond hugo.IsDevelopment false true)
+    "sourceMap" (cond hugo.IsDevelopment "linked" "none")
+    "target" (slice "chrome115" "edge115" "firefox116" "ios16.4" "opera101" "safari16.4")
+  }}
+  {{ with . | css.Build $opts }}
+    {{ if hugo.IsDevelopment }}
+      <link rel="stylesheet" href="{{ .RelPermalink }}">
+    {{ else }}
+      {{ with . | fingerprint }}
+        <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
+      {{ end }}
+    {{ end }}
+  {{ end }}
+{{ end }}
+```
+
+Using the options above, Hugo does the following:
+
+- Embeds PNG and SVG images as data URLs in the generated CSS code
+- Minifies the output in production but not in development
+- Generates an external source map in development but not in production
+- Transforms syntax for compatibility with the targeted browser versions
+- Adds vendor prefixes for compatibility with the targeted browser versions
+- Publishes the generated CSS code to `css/styles.css`
+- In production, adds an SRI hash and inserts a file hash into the filename
+
+[`esbuild`]: https://github.com/evanw/esbuild
+[`publishDir`]: /configuration/all/#publishdir
+[browserlist]: https://browsersl.ist
+[esb_external]: https://esbuild.github.io/api/#external
+[esb_loader]: https://esbuild.github.io/api/#loader
+[esb_mainfields]: https://esbuild.github.io/api/#main-fields
+[esb_minify]: https://esbuild.github.io/api/#minify
+[esb_sourcemap]: https://esbuild.github.io/api/#sourcemap
+[esb_sourcesContent]: https://esbuild.github.io/api/#sources-content
+[esb_target]: https://esbuild.github.io/api/#target
+
+## Common patterns
+
+The examples below cover the most frequent use cases for referencing resources within your project or within Node packages. These patterns apply to both `@import` statements and the `url()` functional notation used for images and fonts.
+
+All resources referenced by a path, including images, fonts, and stylesheets, must reside in the `assets` directory of the [unified file system](g), or within a Node package.
+
+### Files in the assets directory
+
+To include a stylesheet from the `assets` directory, you can use a bare path, a relative path, or a root-relative path. When you use a bare path, Hugo searches relative to the current stylesheet, then relative to the `assets` directory.
+
+```css {file="/assets/css/main.css"}
+/* A bare path */
+@import "variables.css";
+
+/* A relative path */
+@import "./theme.css";
+@import "../layout.css";
+
+/* A root-relative path */
+@import "/css/grid.css";
+
+/* A url() reference using the same resolution logic */
+.logo { background: url("/images/logo.svg"); }
+```
+
+### Node packages
+
+When referencing a Node package by name, Hugo consults the `package.json` file within that package to find the entry point.
+
+```css {file="/assets/css/main.css"}
+@import "bootstrap";
+```
+
+### Files within a package
+
+To reference a specific file within a Node package, provide the path starting with the package name.
+
+```css {file="/assets/css/main.css"}
+@import "bootstrap/dist/css/bootstrap-grid.css";
+```
index 4dce705bec4b9ede04601e738dc3458ba938b604..3e4e7ad8fc5ac9f4d129a8f7ab8f422bcae019a1 100644 (file)
@@ -8,10 +8,9 @@ params:
     aliases: [postCSS]
     returnType: resource.Resource
     signatures: ['css.PostCSS [OPTIONS] RESOURCE']
+aliases: [/functions/resources/postcss/]
 ---
 
-{{< new-in 0.128.0 />}}
-
 ```go-html-template
 {{ with resources.Get "css/main.css" | postCSS }}
   <link rel="stylesheet" href="{{ .RelPermalink }}">
@@ -26,7 +25,7 @@ Step 1
 : Install [Node.js].
 
 Step 2
-: Install the required Node.js packages in the root of your project. For example, to add vendor prefixes to your CSS rules:
+: Install the required Node packages in the root of your project. For example, to add vendor prefixes to your CSS rules:
 
   ```sh
   npm i -D postcss postcss-cli autoprefixer
@@ -72,7 +71,7 @@ inlineImports
 : (`bool`) Whether to enable inlining of import statements. It does so recursively, but will only import a file once. URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');`) and imports with media queries will be ignored. Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file. Hugo will look for imports relative to the module mount and will respect theme overrides. Default is `false`.
 
 skipInlineImportsNotFound
-: (`bool`) Whether to allow the build process to continue despite unresolved import statements, preserving the original import declarations. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set this option to `true`. Default is `false`."
+: (`bool`) Whether to allow the build process to continue despite unresolved import statements, preserving the original import declarations. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set this option to `true`. Default is `false`.
 
 ```go-html-template
 {{ $opts := dict "config" "config-directory" "noMap" true }}
index 4acc706beba2bd9bc108c5cdb37c667319b87a86..c5e10772b885d843c892061f574264cd750b2acf 100644 (file)
@@ -8,6 +8,7 @@ params:
     aliases: [toCSS]
     returnType: resource.Resource
     signatures: ['css.Sass [OPTIONS] RESOURCE']
+aliases: [/functions/resources/tocss/]
 ---
 
 Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended and extended/deploy editions, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language.
index f6751a63a149bb99ae77a794fdabc81c3720425c..d104ed96a50427211463a5b4e4972c4271369ca7 100644 (file)
@@ -10,8 +10,6 @@ params:
     signatures: ['css.TailwindCSS [OPTIONS] RESOURCE']
 ---
 
-{{< new-in 0.128.0 />}}
-
 Use the `css.TailwindCSS` function to process your Tailwind CSS files. This function uses the Tailwind CSS CLI to:
 
 1. Scan your templates for Tailwind CSS utility class usage.
index 1438106542111a0446e3683f16ce344245087582..4ef21262fdcbdebe815115f1367066554db17d13 100644 (file)
@@ -12,7 +12,7 @@ params:
 
 {{< new-in 0.141.0 />}}
 
-The `try` statement is a non-standard extension to Go's [text/template] package. It introduces a mechanism for handling errors within templates, mimicking the `try-catch` constructs found in other programming languages.
+The `try` statement is a non-standard extension to Go's [`text/template`][] package. It introduces a mechanism for handling errors within templates, mimicking the `try-catch` constructs found in other programming languages.
 
 ## Methods
 
@@ -85,7 +85,7 @@ Hugo renders the above to:
 
 ## Example
 
-Error handling is essential when using the [`resources.GetRemote`] function to capture remote resources such as data or images. When calling this function, if the HTTP request fails, Hugo will fail the build.
+Error handling is essential when using the [`resources.GetRemote`][] function to capture remote resources such as data or images. When calling this function, if the HTTP request fails, Hugo will fail the build.
 
 Instead of failing the build, we can catch the error and emit a warning:
 
@@ -102,11 +102,11 @@ Instead of failing the build, we can catch the error and emit a warning:
 {{ end }}
 ```
 
-In the above, note that the [context](g) within the last conditional block is the `TryValue` object returned by the `try` statement. At this point neither the `Err` nor `Value` methods returned anything, so the current context is not useful. Use the `$` to access the [template context] if needed.
+In the above, note that the [context](g) within the last conditional block is the `TryValue` object returned by the `try` statement. At this point neither the `Err` nor `Value` methods returned anything, so the current context is not useful. Use the `$` to access the [template context][] if needed.
 
 > [!note]
 > Hugo does not classify an HTTP response with status code 404 as an error. In this case `resources.GetRemote` returns nil.
 
 [`resources.GetRemote`]: /functions/resources/getremote/
 [template context]: /templates/introduction/#template-context
-[text/template]: https://pkg.go.dev/text/template
+[`text/template`]: https://pkg.go.dev/text/template
index a090152a345c3ea7bc692338549697a483febdd4..b2238e41d0ec700c6a8b0d0df0c8c9dca7c8f1d8 100644 (file)
@@ -11,5 +11,5 @@ params:
 ---
 
 ```go-html-template
-{{ hugo.Generator }} → <meta name="generator" content="Hugo 0.156.0">
+{{ hugo.Generator }} → <meta name="generator" content="Hugo 0.158.0">
 ```
index 5820c805603b76b5d336d977083e82d9475f64a4..d95b9982d9751a76976e062b5644bab9a43c46d5 100644 (file)
@@ -18,14 +18,14 @@ defaultContentLanguageInSubdir = true
 [languages]
   [languages.de]
     baseURL = 'https://de.example.org/'
-    languageCode = 'de-DE'
-    languageName = 'Deutsch'
+    label = 'Deutsch'
+    locale = 'de-DE'
     title = 'Projekt Dokumentation'
     weight = 1
   [languages.en]
     baseURL = 'https://en.example.org/'
-    languageCode = 'en-US'
-    languageName = 'English'
+    label = 'English'
+    locale = 'en-US'
     title = 'Project Documentation'
     weight = 2
 {{< /code-toggle >}}
index 30a65909a77cfa3d6990cbbf310bab53c6594450..9fb986587a16cb6d21a9d1b7838c41baa7159ba0 100644 (file)
@@ -17,13 +17,13 @@ defaultContentLanguage = 'de'
 defaultContentLanguageInSubdir = true
 [languages]
   [languages.de]
-    languageCode = 'de-DE'
-    languageName = 'Deutsch'
+    label = 'Deutsch'
+    locale = 'de-DE'
     title = 'Projekt Dokumentation'
     weight = 1
   [languages.en]
-    languageCode = 'en-US'
-    languageName = 'English'
+    label = 'English'
+    locale = 'en-US'
     title = 'Project Documentation'
     weight = 2
 {{< /code-toggle >}}
index 10a8e147ef6e5605399ac004a759016742f9b450..a559826a61d4f9813b028ef007b090f4cfd8e96f 100644 (file)
@@ -23,17 +23,17 @@ defaultContentVersionInSubdir = true
 
 [languages.de]
 contentDir = 'content/de'
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
+direction = 'ltr'
+label = 'Deutsch'
+locale = 'de-DE'
 title = 'Projekt Dokumentation'
 weight = 1
 
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
+direction = 'ltr'
+label = 'English'
+locale = 'en-US'
 title = 'Project Documentation'
 weight = 2
 
index a8ba059c786675506b47fbf5c1b6957deac21cad..8778e173e0fd9cb9e697e44b0445aa68fb7b3570 100644 (file)
@@ -11,5 +11,5 @@ params:
 ---
 
 ```go-html-template
-{{ hugo.Version }} → 0.156.0
+{{ hugo.Version }} → 0.158.0
 ```
index 59242fb9522d772a11b947426500a1446b6e0520..6900769cf77d73aa1a7035ebd288aa54b8492c29 100644 (file)
@@ -11,7 +11,8 @@ params:
 aliases: [/functions/imageconfig]
 ---
 
-See [image processing] for an overview of Hugo's image pipeline.
+> [!note]
+> This is a legacy function, superseded by the [`Width`][] and [`Height`][] methods for [global resources](g), [page resources](g), and [remote resources](g). See the [image processing][] section for details.
 
 ```go-html-template
 {{ $ic := images.Config "/static/images/a.jpg" }}
@@ -20,10 +21,7 @@ See [image processing] for an overview of Hugo's image pipeline.
 {{ $ic.Height }} → 400 (int)
 ```
 
-Supported image formats include GIF, JPEG, PNG, TIFF, and WebP.
-
-> [!note]
-> This is a legacy function, superseded by the [`Width`] and [`Height`] methods for [global resources](g), [page resources](g), and [remote resources](g). See the [image processing] section for details.
+Supported image formats include AVIF, BMP, GIF, HEIC, HEIF, JPEG, PNG, TIFF, and WebP.
 
 [`Height`]: /methods/resource/height/
 [`Width`]: /methods/resource/width/
index 57a1d5934a5e8283c7ac0e56e0d934c865d0c78c..a320883b2ebda5a7774deb76e2e55a22591c7779 100644 (file)
@@ -7,10 +7,19 @@ params:
   functions_and_methods:
     aliases: []
     returnType: images.ImageResource
-    signatures: [images.Filter FILTERS... IMAGE]
+    signatures: [images.Filter FILTER... RESOURCE]
 ---
 
-Apply one or more [image filters](#image-filters) to the given image.
+{{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
+
+The `images.Filter` function returns a new resource from a [processable image](g) after applying one or more [image filters](#image-filters).
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+Use the `images.Filter` function to apply effects such as blurring, sharpening, or grayscale conversion. You can pass a single filter or a slice of filters. When providing a slice, Hugo applies the filters from left to right.
 
 To apply a single filter:
 
@@ -36,9 +45,7 @@ To apply two or more filters, executing from left to right:
 {{ end }}
 ```
 
-You can also apply image filters using the [`Filter`] method on a `Resource` object.
-
-[`Filter`]: /methods/resource/filter/
+You can also apply image filters using the [`Filter`][] method on a `Resource` object.
 
 ## Example
 
@@ -62,4 +69,7 @@ You can also apply image filters using the [`Filter`] method on a `Resource` obj
 
 Use any of these filters with the `images.Filter` function, or with the `Filter` method on a `Resource` object.
 
-{{% list-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude %}}
+{{% render-list-of-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude %}}
+
+[`Filter`]: /methods/resource/filter/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
index 04f109b404d4a667ab49ed20b05f81ff74f37fb0..2064b24a572b4b757081a137325322326315a3f3 100644 (file)
@@ -21,7 +21,7 @@ Returns an image filter that processes an image according to the given [processi
 {{ end }}
 ```
 
-In the example above, `"crop 200x200 TopRight webp q50"` is the _processing specification_.
+In the example above, `"crop 200x200 TopRight webp q50"` is the processing specification.
 
 {{% include "/_common/methods/resource/processing-spec.md" %}}
 
index 2d76b671879e34692edb5e08246df5b0ca667a90..c4493f959e8161acfe4a07d74095ba84c99b49b2 100644 (file)
@@ -8,6 +8,7 @@ params:
     aliases: [babel]
     returnType: resource.Resource
     signatures: ['js.Babel [OPTIONS] RESOURCE']
+aliases: [/functions/resources/babel/]
 ---
 
 ```go-html-template
@@ -35,7 +36,7 @@ Step 1
 : Install [Node.js](https://nodejs.org/en/download)
 
 Step 2
-: Install the required Node.js packages in the root of your project.
+: Install the required Node packages in the root of your project.
 
   ```sh
   npm install --save-dev @babel/core @babel/cli
index d81ef2db3533b625eb996abf2c868eec33963b2f..87d379e4659817bd87df494ed51358abb7385aa7 100644 (file)
@@ -21,9 +21,8 @@ The `js.Build` function uses the [evanw/esbuild] package to:
 ```go-html-template
 {{ with resources.Get "js/main.js" }}
   {{$opts := dict
-    "minify" (not hugo.IsDevelopment)
-    "sourceMap" (cond hugo.IsDevelopment "external" "")
-    "targetPath" "js/main.js"
+    "minify" (cond hugo.IsDevelopment false true)
+    "sourceMap" (cond hugo.IsDevelopment "linked" "none")
   }}
   {{ with . | js.Build $opts }}
     {{ if hugo.IsDevelopment }}
@@ -49,7 +48,7 @@ format
 
 ## Import JS code from the assets directory
 
-`js.Build` has full support for the virtual union file system in [Hugo Modules](/hugo-modules/). You can see some simple examples in this [test project](https://github.com/gohugoio/hugoTestProjectJSModImports), but in short this means that you can do this:
+`js.Build` has full support for Hugo's [unified file system](g). You can see some simple examples in this [test project](https://github.com/gohugoio/hugoTestProjectJSModImports), but in short this means that you can do this:
 
 ```js
 import { hello } from 'my/module';
@@ -93,7 +92,7 @@ Hugo will, by default, generate a `assets/jsconfig.json` file that maps the impo
 
 ## Node.js dependencies
 
-Use the `js.Build` function to include Node.js dependencies.
+Use the `js.Build` function to include Node dependencies.
 
 Any imports in a file outside `assets` or that does not resolve to a component inside `assets` will be resolved by [esbuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). If you have any imported npm dependencies in your project, you need to make sure to run `npm install` before you run `hugo build`.
 
index b73a760e19d93003aca7d4641eb8a713cfcd557b..442090f25efa0c327d79ede361bf2739f9946baa 100644 (file)
@@ -31,7 +31,7 @@ i18n/en.toml
 i18n/pt-BR.toml
 ```
 
-The base name must match the [`languageCode`][] or [language key][] as defined in your project configuration. Hugo selects the translation table based on the `languageCode`,  falling back to the language key if a matching translation table does not exist.
+The base name must match the [`locale`][] or [language key][] as defined in your project configuration. Hugo selects the translation table based on the `locale`,  falling back to the language key if a matching translation table does not exist.
 
 Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7][] are also supported. You may omit the `art-x-` prefix for brevity. For example:
 
@@ -45,7 +45,7 @@ i18n/hugolang.toml
 
 ## Simple translations
 
-Let's say your multilingual site supports two languages, English and Polish. Create a translation table for each language in the `i18n` directory.
+Let's say your multilingual project supports two languages, English and Polish. Create a translation table for each language in the `i18n` directory.
 
 ```text
 i18n/
@@ -86,7 +86,7 @@ When viewing the Polish language site:
 
 ## Translations with pluralization
 
-Let's say your multilingual site supports two languages, English and Polish. Create a translation table for each language in the `i18n` directory.
+Let's say your multilingual project supports two languages, English and Polish. Create a translation table for each language in the `i18n` directory.
 
 ```text
 i18n/
@@ -238,7 +238,7 @@ Then in your templates:
 
 [`defaultContentLanguage`]: /configuration/all/#defaultcontentlanguage
 [`enableMissingTranslationPlaceholders`]: /configuration/all/#enablemissingtranslationplaceholders
-[`languageCode`]: /configuration/languages/#languagecode
+[`locale`]: /configuration/languages/#locale
 [`printI18nWarnings`]: /configuration/all/#printi18nwarnings
 [CLDR]: https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
 [go-i18n]: https://github.com/nicksnyder/go-i18n
index eec4df8b3066a89c322098af8361319eb7f9028c..9eb6cb78524abc3ad779c0399ab17fd86d87ae06 100644 (file)
@@ -10,7 +10,7 @@ params:
     signatures: [math.Counter]
 ---
 
-The counter is global for both monolingual and multilingual sites, and its initial value for each build is&nbsp;1.
+The counter is global for both monolingual and multilingual projects, and its initial value for each build is&nbsp;1.
 
 ```go-html-template {file="layouts/page.html"}
 {{ warnf "page.html called %d times" math.Counter }}
index 42a1281961be7e7ea45dbc3f07e1b1cb9dfb4cf4..f1a6decab72030e0dee7fe284dcefbd98eb348db 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: reflect.IsImageResource
-description: Reports whether the given value is a Resource object representing a processable image.
+description: Reports whether the given value is a Resource object representing an image as defined by its media type.
 categories: []
 keywords: []
 params:
@@ -12,60 +12,18 @@ params:
 
 {{< new-in 0.154.0 />}}
 
-{{% glossary-term "processable image" %}}
+## Usage
 
-With this project structure:
+This example iterates through all project resources and uses `reflect.IsImageResource` to decide whether to render an image tag or provide a download link for non-image files.
 
-```text
-project/
-├── assets/
-│   ├── a.json
-│   ├── b.avif
-│   └── c.jpg
-└── content/
-    └── example/
-        ├── index.md
-        ├── d.json
-        ├── e.avif
-        └── f.jpg
-```
-
-These are the values returned by the `reflect.IsImageResource` function:
-
-```go-html-template {file="layouts/page.html"}
-{{ with resources.Get "a.json" }}
-  {{ reflect.IsImageResource . }} → false
-{{ end }}
-
-{{ with resources.Get "b.avif" }}
-  {{ reflect.IsImageResource . }} → false
-{{ end }}
-
-{{ with resources.Get "c.jpg" }}
-  {{ reflect.IsImageResource . }} → true
-{{ end }}
-```
-
-In the example above, the `b.avif` image is not a processable image because Hugo can neither decode nor encode the AVIF image format.
-
-```go-html-template {file="layouts/page.html"}
-{{ with .Resources.Get "d.json" }}
-  {{ reflect.IsImageResource . }} → false
-{{ end }}
-
-{{ with .Resources.Get "e.avif" }}
-  {{ reflect.IsImageResource . }} → false
-{{ end }}
-
-{{ with .Resources.Get "f.jpg" }}
-  {{ reflect.IsImageResource . }} → true
+```go-html-template
+{{ range resources.Match "**" }}
+  {{ if reflect.IsImageResource . }}
+    <img src="{{ .RelPermalink }}" alt="Image">
+  {{ else }}
+    <a href="{{ .RelPermalink }}">Download</a>
+  {{ end }}
 {{ end }}
 ```
 
-In the example above, the `e.avif` image is not a processable image because Hugo can neither decode nor encode the AVIF image format.
-
-```go-html-template {file="layouts/page.html"}
-{{ with site.GetPage "/example" }}
-  {{ reflect.IsImageResource . }} → false
-{{ end }}
-```
+{{% include "/_common/functions/reflect/image-reflection-functions.md" %}}
diff --git a/content/en/functions/reflect/IsImageResourceProcessable.md b/content/en/functions/reflect/IsImageResourceProcessable.md
new file mode 100644 (file)
index 0000000..d0d3d23
--- /dev/null
@@ -0,0 +1,31 @@
+---
+title: reflect.IsImageResourceProcessable
+description: Reports whether the given value is a Resource object representing an image from which Hugo can extract dimensions and perform processing such as converting, resizing, cropping, or filtering.
+categories: []
+keywords: []
+params:
+  functions_and_methods:
+    aliases: []
+    returnType: bool
+    signatures: [reflect.IsImageResourceProcessable INPUT]
+---
+
+{{< new-in 0.157.0 />}}
+
+{{% glossary-term "processable image" %}}
+
+## Usage
+
+This example iterates through all project resources and uses `reflect.IsImageResourceProcessable` to ensure the image pipeline can perform transformations like resizing before processing begins.
+
+```go-html-template
+{{ range resources.Match "**" }}
+  {{ if reflect.IsImageResourceProcessable . }}
+    {{ with .Process "resize 300x webp" }}
+      <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="Processed Image">
+    {{ end }}
+  {{ end }}
+{{ end }}
+```
+
+{{% include "/_common/functions/reflect/image-reflection-functions.md" %}}
diff --git a/content/en/functions/reflect/IsImageResourceWithMeta.md b/content/en/functions/reflect/IsImageResourceWithMeta.md
new file mode 100644 (file)
index 0000000..642ce2d
--- /dev/null
@@ -0,0 +1,30 @@
+---
+title: reflect.IsImageResourceWithMeta
+description: Reports whether the given value is a Resource object representing an image from which Hugo can extract dimensions and, if present, Exif, IPTC, and XMP data.
+categories: []
+keywords: []
+params:
+  functions_and_methods:
+    aliases: []
+    returnType: bool
+    signatures: [reflect.IsImageResourceWithMeta INPUT]
+---
+
+{{< new-in 0.157.0 />}}
+
+## Usage
+
+This example iterates through all project resources and uses `reflect.IsImageResourceWithMeta` to safely display image dimensions and metadata only for supported formats.
+
+```go-html-template
+{{ range resources.Match "**" }}
+  {{ if reflect.IsImageResourceWithMeta . }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="Image with Meta">
+    {{ with .Meta }}
+      <p>Taken on: {{ .Date }}</p>
+    {{ end }}
+  {{ end }}
+{{ end }}
+```
+
+{{% include "/_common/functions/reflect/image-reflection-functions.md" %}}
diff --git a/content/en/functions/resources/Babel.md b/content/en/functions/resources/Babel.md
deleted file mode 100644 (file)
index 799823f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: resources.Babel
-description: Compiles the given JavaScript resource with Babel.
-categories: []
-keywords: []
-params:
-  functions_and_methods:
-    aliases: []
-    returnType: resource.Resource
-    signatures: ['resources.Babel [OPTIONS] RESOURCE']
-expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0
----
-
-{{< deprecated-in 0.128.0 >}}
-Use [`js.Babel`] instead.
-
-[`js.Babel`]: /functions/js/babel/
-{{< /deprecated-in >}}
index 608b834de588fbb880f64cdad73f18176d466326..0ca7419362013432f5074868be05180bcd494e4a 100644 (file)
@@ -22,9 +22,9 @@ Let's say you need to publish a file named "site.json" in the root of your `publ
 
 ```json
 {
-  "build_date": "2026-01-11T11:27:49-08:00",
-  "hugo_version": "0.156.0",
-  "last_modified": "2026-01-11T11:27:59-08:00"
+  "build_date": "2026-03-16T13:56:25-07:00",
+  "hugo_version": "0.158.0",
+  "last_modified": "2026-02-16T12:04:52-07:00"
 }
 ```
 
index 4d8ae0f82db54396ef9fb22960063529cccc5194..caa9cc1d356df092bbb164847da0ba665732a113 100644 (file)
@@ -47,14 +47,16 @@ method
 
 responseHeaders
 : {{< new-in 0.143.0 />}}
-: (`[]string`) The headers to extract from the server's response, accessible through the resource's [`Data.Headers`] method. Header name matching is case-insensitive.
+: (`[]string`) The headers to extract from the server's response, accessible through the resource's [`Data.Headers`][] method. Header name matching is case-insensitive.
 
-[`Data.Headers`]: /methods/resource/data/#headers
+timeout
+: {{< new-in 0.157.0 />}}
+: (`string`) The duration after which the request is cancelled if it does not complete, expressed as a [duration](g). If not specified, the request will timeout after 2 minutes.
 
 ## Options examples
 
 > [!note]
-> For brevity, the examples below do not include [error handling].
+> For brevity, the examples below do not include [error handling][].
 
 To include a header:
 
@@ -109,11 +111,23 @@ To extract specific headers from the server's response:
 {{ $resource := resources.GetRemote $url $opts }}
 ```
 
-## Remote data
+Use the `timeout` option to prevent slow external requests from stalling the build when fetching multiple remote feeds:
 
-When retrieving remote data, use the [`transform.Unmarshal`] function to [unmarshal](g) the response.
+```go-html-template
+{{ $url := "https://example.org/feed.rss" }}
+{{ $opts := dict "timeout" "10s" }}
+{{ with try (resources.GetRemote $url $opts) }}
+  {{ with .Err }}
+    {{ warnf "Failed to fetch feed: %s" . }}
+  {{ else with .Value }}
+    {{ $data = . | transform.Unmarshal }}
+  {{ end }}
+{{ end }}
+```
 
-[`transform.Unmarshal`]: /functions/transform/unmarshal/
+## Remote data
+
+When retrieving remote data, use the [`transform.Unmarshal`][] function to [unmarshal](g) the response.
 
 ```go-html-template
 {{ $data := dict }}
@@ -130,7 +144,7 @@ When retrieving remote data, use the [`transform.Unmarshal`] function to [unmars
 ```
 
 > [!note]
-> When retrieving remote data, a misconfigured server may send a response header with an incorrect [Content-Type]. For example, the server may set the Content-Type header to `application/octet-stream` instead of `application/json`.
+> When retrieving remote data, a misconfigured server may send a response header with an incorrect [Content-Type][]. For example, the server may set the Content-Type header to `application/octet-stream` instead of `application/json`.
 >
 > In these cases, pass the resource `Content` through the `transform.Unmarshal` function instead of passing the resource itself. For example, in the above, do this instead:
 >
@@ -138,7 +152,7 @@ When retrieving remote data, use the [`transform.Unmarshal`] function to [unmars
 
 ## Error handling
 
-Use the [`try`] statement to capture HTTP request errors. If you do not handle the error yourself, Hugo will fail the build.
+Use the [`try`][] statement to capture HTTP request errors. If you do not handle the error yourself, Hugo will fail the build.
 
 > [!note]
 > Hugo does not classify an HTTP response with status code 404 as an error. In this case `resources.GetRemote` returns nil.
@@ -173,13 +187,11 @@ To log an error as a warning instead of an error:
 
 ## HTTP response
 
-The [`Data`] method on a resource returned by the `resources.GetRemote` function returns information from the HTTP response.
-
-[`Data`]: /methods/resource/data/
+The [`Data`][] method on a resource returned by the `resources.GetRemote` function returns information from the HTTP response.
 
 ## Caching
 
-Resources returned from `resources.GetRemote` are cached to disk. See [configure file caches] for details.
+Resources returned from `resources.GetRemote` are cached to disk. See [configure file caches][] for details.
 
 By default, Hugo derives the cache key from the arguments passed to the function. Override the cache key by setting a `key` in the options map. Use this approach to have more control over how often Hugo fetches a remote resource.
 
@@ -194,11 +206,11 @@ By default, Hugo derives the cache key from the arguments passed to the function
 
 To protect against malicious intent, the `resources.GetRemote` function inspects the server response including:
 
-- The [Content-Type] in the response header
+- The [Content-Type][] in the response header
 - The file extension, if any
 - The content itself
 
-If Hugo is unable to resolve the media type to an entry in its [allowlist], the function throws an error:
+If Hugo is unable to resolve the media type to an entry in its [allowlist][], the function throws an error:
 
 ```text
 ERROR error calling resources.GetRemote: failed to resolve media type...
@@ -218,6 +230,9 @@ Note that the entry above is:
 - An _addition_ to the allowlist; it does not _replace_ the allowlist
 - An array of [regular expressions](g)
 
+[`Data.Headers`]: /methods/resource/data/#headers
+[`Data`]: /methods/resource/data/
+[`transform.Unmarshal`]: /functions/transform/unmarshal/
 [`try`]: /functions/go-template/try
 [allowlist]: https://en.wikipedia.org/wiki/Whitelist
 [configure file caches]: /configuration/caches/
diff --git a/content/en/functions/resources/PostCSS.md b/content/en/functions/resources/PostCSS.md
deleted file mode 100644 (file)
index 3ec0b84..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: resources.PostCSS
-description: Processes the given resource with PostCSS using any PostCSS plugin.
-categories: []
-keywords: []
-params:
-  functions_and_methods:
-    aliases: []
-    returnType: resource.Resource
-    signatures: ['resources.PostCSS [OPTIONS] RESOURCE']
-expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0
----
-
-{{< deprecated-in 0.128.0 >}}
-Use [`css.PostCSS`] instead.
-
-[`css.PostCSS`]: /functions/css/postcss/
-{{< /deprecated-in >}}
index c848ec2395fa48f546c77227356aa3c775c97ddf..f20bed7dd883bdf4f7bf5d1682f606e7b75ab5d4 100644 (file)
@@ -25,7 +25,7 @@ Step 1
 : Install [Node.js].
 
 Step 2
-: Install the required Node.js packages in the root of your project:
+: Install the required Node packages in the root of your project:
 
   ```sh {copy=true}
   npm i -D postcss postcss-cli autoprefixer @fullhuman/postcss-purgecss
diff --git a/content/en/functions/resources/ToCSS.md b/content/en/functions/resources/ToCSS.md
deleted file mode 100644 (file)
index 7be1b8d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: resources.ToCSS
-description: Transpiles Sass to CSS.
-categories: []
-keywords: []
-params:
-  functions_and_methods:
-    aliases: []
-    returnType: resource.Resource
-    signatures: ['resources.ToCSS [OPTIONS] RESOURCE']
-expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0
----
-
-{{< deprecated-in 0.128.0 >}}
-Use [`css.Sass`] instead.
-
-[`css.Sass`]: /functions/css/sass/
-{{< /deprecated-in >}}
diff --git a/content/en/functions/strings/ReplacePairs.md b/content/en/functions/strings/ReplacePairs.md
new file mode 100644 (file)
index 0000000..5e2face
--- /dev/null
@@ -0,0 +1,111 @@
+---
+title: strings.ReplacePairs
+description: Returns a copy of a string with multiple replacements performed in a single pass, using a slice of old and new string pairs.
+categories: []
+keywords: []
+params:
+  functions_and_methods:
+    aliases: []
+    returnType: string
+    signatures: ['strings.ReplacePairs OLD NEW [OLD NEW ...] INPUT']
+---
+
+{{< new-in 0.158.0 />}}
+
+Use the `strings.ReplacePairs` function to perform multiple replacements on a string in a single operation. This approach is faster than sequentially calling the [`strings.Replace`][] function.
+
+Replacing strings sequentially requires multiple function calls and variable re-assignments.
+
+```go-html-template
+{{ $s := "aabbcc" }}
+{{ $s = strings.Replace $s "a" "x" }}
+{{ $s = strings.Replace $s "b" "y" }}
+{{ $s = strings.Replace $s "c" "z" }}
+{{ $s }} → xxyyzz
+```
+
+Using `strings.ReplacePairs` produces the same result with fewer function calls in less time.
+
+```go-html-template
+{{ "aabbcc" | strings.ReplacePairs "a" "x" "b" "y" "c" "z" }} → xxyyzz
+```
+
+Pairs may also be passed as a single slice:
+
+```go-html-template
+{{ $pairs := slice
+  "a" "x"
+  "b" "y"
+  "c" "z"
+}}
+{{ "aabbcc" | strings.ReplacePairs $pairs }} → xxyyzz
+```
+
+## Examples
+
+Observe that replacements are not applied recursively because the function scans the string only once.
+
+```go-html-template
+{{ $pairs := slice
+  "a" "b"
+  "b" "c"
+}}
+{{ "a" | strings.ReplacePairs $pairs }} → b
+```
+
+Apply the first match when multiple old strings could match at the same position.
+
+```go-html-template
+{{ $pairs := slice
+  "app" "pear"
+  "apple" "orange"
+}}
+{{ "apple" | strings.ReplacePairs $pairs }} → pearle
+```
+
+Delete specific strings by providing an empty string as the second value in a pair.
+
+```go-html-template
+{{ $pairs := slice "b" "" }}
+{{ "abc" | strings.ReplacePairs $pairs }} → ac
+```
+
+## Edge cases
+
+The table below outlines how the function handles various input scenarios.
+
+Scenario|Result
+:--|:--
+Fewer than two arguments|Error
+Odd number of slice elements|Error
+Empty slice|Returns the input string
+Empty input string|Returns an empty string
+Empty old string|Returns the input string [interleaved](g) with the new string
+
+## Performance
+
+While `strings.Replace` and `strings.ReplacePairs` can produce the same results, they handle data differently. Choosing the right one can noticeably reduce the time Hugo takes to build your project.
+
+### Single pass vs. multiple passes
+
+When using `strings.Replace`, Hugo must scan the text from start to finish to find a match. If you chain three replacements together, Hugo performs three separate passes over the entire string.
+
+The `strings.ReplacePairs` function is more efficient because it performs a single pass. Hugo looks through the text once and applies all replacements simultaneously.
+
+### Caching
+
+Unlike `strings.Replace`, which performs a direct substitution, `strings.ReplacePairs` requires an initialization step to prepare the single-pass replacement logic. To make this efficient, Hugo manages this logic using a cache:
+
+- During the initial call, Hugo initializes and stores the logic for that specific set of pairs.
+- During subsequent calls, Hugo retrieves the stored logic, skipping the initialization step and reducing the duration of the call.
+
+### Choosing the right function
+
+The efficiency of `strings.ReplacePairs` increases as the text gets longer or the number of pairs grows. Consider these scenarios when deciding which function to use:
+
+- For a single replacement on a short string like a title, `strings.Replace` is efficient.
+- For multiple replacements or long strings like a long-form article, `strings.ReplacePairs` is much faster.
+
+For a document with about 8000 characters, which is roughly the length of a long-form article, `strings.ReplacePairs` outperforms five sequential `strings.Replace` calls during the initial call. Once cached, it is the faster choice for almost any situation with two or more pairs.
+
+[`strings.Replace`]: /functions/strings/replace/
index 9acb9140503a507e20958a7a1db8f31a5668d03e..272c36b0a30451be0f07456a90c907c94b60b20b 100644 (file)
@@ -11,8 +11,6 @@ params:
 aliases: [/functions/templates.defer]
 ---
 
-{{< new-in 0.128.0 />}}
-
 > [!note]
 > This feature should only be used in the main template, typically `layouts/baseof.html`. Using it in _shortcode_, _partial_, or _render hook_ templates may lead to unpredictable results. For further details, please refer to [this issue].
 
@@ -83,15 +81,15 @@ 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 }}
+Language Outside: {{ site.Language.Name }}
 Page Outside: {{ .RelPermalink }}
 I18n Outside: {{ i18n "hello" }}
 {{ $data := (dict "page" . )}}
 {{ with (templates.Defer (dict "data" $data )) }}
-     Language Inside: {{ site.Language.Lang }}
+     Language Inside: {{ site.Language.Name }}
      Page Inside: {{ .page.RelPermalink }}
      I18n Inside: {{ i18n "hello" }}
 {{ end }}
 ```
 
-The [output format](/configuration/output-formats/), [site](/methods/page/site/), and [language](/methods/site/language) will be the same, even if the execution is deferred. In the example above, this means that the `site.Language.Lang` and `.RelPermalink` will be the same on the inside and the outside of the deferred template.
+The [output format](/configuration/output-formats/), [site](/methods/page/site/), and [language](/methods/site/language) will be the same, even if the execution is deferred. In the example above, this means that the `site.Language.Name` and `.RelPermalink` will be the same on the inside and the outside of the deferred template.
index 563e63cf635a6d8d62dae066d25f976e1e2aa2c8..ab9be942bc2e93c30a1740498c53626e3d0a85f4 100644 (file)
@@ -11,14 +11,14 @@ params:
 aliases: [/functions/htmlunescape]
 ---
 
-The `transform.HTMLUnescape` function replaces [HTML entities] with their corresponding characters.
+The `transform.HTMLUnescape` function replaces [HTML entities][] with their corresponding characters.
 
 ```go-html-template
 {{ htmlUnescape "Lilo &amp; Stitch" }} → Lilo & Stitch
 {{ htmlUnescape "7 &gt; 6" }} → 7 > 6
 ```
 
-In most contexts Go's [html/template] package will escape special characters. To bypass this behavior, pass the unescaped string through the [`safeHTML`] function.
+In most contexts Go's [`html/template`][] package will escape special characters. To bypass this behavior, pass the unescaped string through the [`safeHTML`][] function.
 
 ```go-html-template
 {{ htmlUnescape "Lilo &amp; Stitch" | safeHTML }}
@@ -26,4 +26,4 @@ In most contexts Go's [html/template] package will escape special characters. To
 
 [`safehtml`]: /functions/safe/html/
 [html entities]: https://developer.mozilla.org/en-us/docs/glossary/entity
-[html/template]: https://pkg.go.dev/html/template
+[`html/template`]: https://pkg.go.dev/html/template
index ecf7fc905d358765642beae8b7757c4c62387860..d40c2172822ffd53b5c4c1283f56160f1806966e 100644 (file)
@@ -24,7 +24,7 @@ Example 1
 ```go-html-template
 {{ $s := `
   baseURL = 'https://example.org/'
-  languageCode = 'en-US'
+  locale = 'en-US'
   title = 'ABC Widgets'
 `}}
 <pre>{{ transform.Remarshal "json" $s }}</pre>
@@ -35,7 +35,7 @@ Resulting HTML:
 ```html
 <pre>{
    &#34;baseURL&#34;: &#34;https://example.org/&#34;,
-   &#34;languageCode&#34;: &#34;en-US&#34;,
+   &#34;locale&#34;: &#34;en-US&#34;,
    &#34;title&#34;: &#34;ABC Widgets&#34;
 }
 </pre>
@@ -46,7 +46,7 @@ Rendered in browser:
 ```text
 {
    "baseURL": "https://example.org/",
-   "languageCode": "en-US",
+   "locale": "en-US",
    "title": "ABC Widgets"
 }
 ```
index dbe0b9334077fcc2211a55fa6e03c4033d7316d0..d9a9cdf939e59db337bfa67c3f986db9c0245448 100644 (file)
@@ -10,7 +10,7 @@ params:
     signatures: [transform.XMLEscape INPUT]
 ---
 
-The `transform.XMLEscape` function removes [disallowed characters] as defined in the XML specification, then escapes the result by replacing the following characters with [HTML entities]:
+The `transform.XMLEscape` function removes [disallowed characters][] as defined in the XML specification, then escapes the result by replacing the following characters with [HTML entities]:
 
 - `"` → `&#34;`
 - `'` → `&#39;`
@@ -27,7 +27,7 @@ For example:
 {{ transform.XMLEscape "<p>abc</p>" }} → &lt;p&gt;abc&lt;/p&gt;
 ```
 
-When using `transform.XMLEscape` in a template rendered by Go's [html/template] package, declare the string to be safe HTML to avoid double escaping. For example, in an RSS template:
+When using `transform.XMLEscape` in a template rendered by Go's [`html/template`][] package, declare the string to be safe HTML to avoid double escaping. For example, in an RSS template:
 
 ```xml {file="layouts/rss.xml"}
 <description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
@@ -35,4 +35,4 @@ When using `transform.XMLEscape` in a template rendered by Go's [html/template]
 
 [disallowed characters]: https://www.w3.org/TR/xml/#charsets
 [html entities]: https://developer.mozilla.org/en-us/docs/glossary/entity
-[html/template]: https://pkg.go.dev/html/template
+[`html/template`]: https://pkg.go.dev/html/template
index ab570aa77af8eb054403f06e7012144dc76b6875..7b19af064c2cdcef0ac1fd419027df39d00713b6 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: urls.PathEscape 
-description: Returns the given string, replacing all percent-encoded sequences with the corresponding unescaped characters.
+description: Returns the given string, applying percent-encoding to special characters and reserved delimiters so it can be safely used as a segment within a URL path.
 categories: []
 keywords: []
 params:
@@ -14,7 +14,9 @@ params:
 The `urls.PathEscape` function does the inverse transformation of [`urls.PathUnescape`][].
 
 ```go-html-template
-{{ urls.PathEscape "A/b/c?d=é&f=g+h" }} → A%2Fb%2Fc%3Fd=%C3%A9&f=g+h
+{{ urls.PathEscape "my café" }} → my%20caf%C3%A9
 ```
 
+Use this function to escape a string so that it can be safely used as an individual segment within a URL path.
+
 [`urls.PathUnescape`]: /functions/urls/PathUnescape/
index f1432f02f0aa49c88d38f60718fb55a7f9567e04..ab2057d2e19a22fd5697f0c208fae030461f0632 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: urls.PathUnescape 
-description: Returns the given string, applying percent-encoding to special characters and reserved delimiters so it can be safely used as a segment within a URL path.
+description: Returns the given string, replacing all percent-encoded sequences with the corresponding unescaped characters.
 categories: []
 keywords: []
 params:
@@ -17,4 +17,6 @@ The `urls.PathUnescape` function does the inverse transformation of [`urls.PathE
 {{ urls.PathUnescape "A%2Fb%2Fc%3Fd=%C3%A9&f=g+h" }} → A/b/c?d=é&f=g+h
 ```
 
+Use this function to decode an individual segment within a URL path.
+
 [`urls.PathEscape`]: /functions/urls/PathEscape/
index 863775d992ae1a3a0256b23df1c2da433450ff07..81dbe95b8622f5fe98516f9c67f22df810232640 100644 (file)
@@ -108,9 +108,9 @@ static
 themes
 : The `themes` directory contains one or more [themes](g), each in its own subdirectory.
 
-## Union file system
+## Unified file system
 
-Hugo creates a union file system, allowing you to mount two or more directories to the same location. For example, let's say your home directory contains a Hugo project in one directory, and shared content in another:
+Hugo creates a [unified file system](g), allowing you to mount two or more directories to the same location. For example, let's say your home directory contains a Hugo project in one directory, and shared content in another:
 
 ```text
 home/
@@ -145,11 +145,11 @@ target = 'content'
 {{< /code-toggle >}}
 
 > [!note]
-> When you overlay one directory on top of another, you must mount both directories.
+> Defining a custom mount replaces the default mounting for that [component](g). To overlay an external directory on top of the project default, you must explicitly mount both.
 >
-> Hugo does not follow symbolic links. If you need the functionality provided by symbolic links, use Hugo's union file system instead.
+> Hugo does not follow symbolic links. If you need the functionality provided by symbolic links, use Hugo's unified file system instead.
 
-After mounting, the union file system has this structure:
+After mounting, the unified file system has this structure:
 
 ```text
 home/
@@ -170,8 +170,7 @@ home/
         └── hugo.toml
 ```
 
-> [!note]
-> When two or more files have the same path, the order of precedence follows the order of the mounts. For example, if the shared content directory contains `books/book-1.md`, it will be ignored because the project's `content` directory was mounted first.
+When two or more files share the same path, the version in the highest layer takes precedence. In the example above, if the `shared-content` directory contains `books/book-1.md`, it is ignored because the project's `content` directory is the first (highest) mount.
 
 You can mount directories to `archetypes`, `assets`, `content`, `data`, `i18n`, `layouts`, and `static`. See&nbsp;[details](/configuration/module/#mounts).
 
@@ -199,6 +198,6 @@ my-theme/
 └── hugo.toml
 ```
 
-Using the union file system described above, Hugo mounts each of these directories to the corresponding location in the project. When two files have the same path, the file in the project directory takes precedence. This allows you, for example, to override a theme's template by placing a copy in the same location within the project directory.
+Using the unified file system described above, Hugo mounts each of these directories to the corresponding location in the project. When two files have the same path, the file in the project directory takes precedence. This allows you, for example, to override a theme's template by placing a copy in the same location within the project directory.
 
 If you are simultaneously using components from two or more themes or modules, and there's a path collision, the first mount takes precedence.
index 3d05333ba80ba2c35b534b67e3b54997ee1c4dfc..f88229196ef15444c30e65839b336e3d64a3557e 100644 (file)
@@ -152,7 +152,7 @@ With your editor, open your [project configuration][] file (`hugo.toml`) in the
 
 ```text
 baseURL = 'https://example.org/'
-languageCode = 'en-us'
+locale = 'en-us'
 title = 'My New Hugo Project'
 theme = 'ananke'
 ```
@@ -160,7 +160,7 @@ theme = 'ananke'
 Make the following changes:
 
 1. Set the `baseURL` for your project. This value must begin with the protocol and end with a slash, as shown above.
-1. Set the `languageCode` to your locale.
+1. Set the `locale` to your locale.
 1. Set the `title` for your project.
 
 Start Hugo's development server to see your changes, remembering to include draft content.
index 41c703bfb49d3675bb56f9981442669768b3b9b5..abf471dc0bd7e851db87729b0cdb04f78db4befc 100644 (file)
@@ -18,7 +18,7 @@ hugo version
 You should see something like:
 
 ```text
-hugo v0.155.3-8a858213b73907e823e2be2b5640a0ce4c04d295+extended linux/amd64 BuildDate=2026-02-08T16:40:42Z VendorInfo=gohugoio
+hugo v0.158.0-f41be7959a44108641f1e081adf5c4be7fc1bb63+extended linux/amd64 BuildDate=2026-03-16T17:42:04Z VendorInfo=gohugoio
 ```
 
 ## Display available commands
index 7ea57860d986192a1359fb51e1e56ed8e03b61ac..f7f8869a152ef94e1da78d863a6bb340263a6ef7 100644 (file)
@@ -18,7 +18,7 @@ Please complete the following tasks before continuing:
 1. [Log in](https://github.com/login) to your GitHub account
 1. [Create](https://github.com/new) a GitHub repository for your project
 1. [Create](https://git-scm.com/docs/git-init) a local Git repository for your project with a [remote](https://git-scm.com/docs/git-remote) reference to your GitHub repository
-1. Create a Hugo site within your local Git repository and test it with the `hugo server` command
+1. Create a Hugo project within your local Git repository and test it with the `hugo server` command
 1. Commit the changes to your local Git repository and push to your GitHub repository.
 
 ## Procedure
@@ -40,9 +40,9 @@ Step 2
   env:
     variables:
       # Application versions
-      DART_SASS_VERSION: 1.97.3
-      GO_VERSION: 1.26.0
-      HUGO_VERSION: 0.156.0
+      DART_SASS_VERSION: 1.98.0
+      GO_VERSION: 1.26.1
+      HUGO_VERSION: 0.158.0
       # Time zone
       TZ: Europe/Oslo
       # Cache
index 6218621c2dba3fd4def3fb0c2e9c24095901a761..eb6c1d7e3df8fdb46b8db9bfe19d6e310ccbb226 100644 (file)
@@ -17,7 +17,7 @@ Please complete the following tasks before continuing:
 1. [Log in](https://github.com/login) to your GitHub account
 1. [Create](https://github.com/new) a GitHub repository for your project
 1. [Create](https://git-scm.com/docs/git-init) a local Git repository for your project with a [remote](https://git-scm.com/docs/git-remote) reference to your GitHub repository
-1. Create a Hugo site within your local Git repository and test it with the `hugo server` command
+1. Create a Hugo project within your local Git repository and test it with the `hugo server` command
 
 ## Procedure
 
@@ -25,15 +25,15 @@ Step 1
 : Create a `wrangler.toml` file in the root of your project.
 
   ```toml {file="wrangler.toml" copy=true}
-  name = "hosting-cloudflare-worker"
-  compatibility_date = "2025-07-31"
+  name = 'hosting-cloudflare-worker'
+  compatibility_date = '2025-07-31'
 
   [build]
-  command = "chmod a+x build.sh && ./build.sh"
+  command = 'chmod a+x build.sh && ./build.sh'
 
   [assets]
-  directory = "./public"
-  not_found_handling = "404-page"
+  directory = './public'
+  not_found_handling = '404-page'
   ```
 
 Step 2
@@ -51,10 +51,10 @@ Step 2
 
   main() {
 
-    DART_SASS_VERSION=1.97.3
-    GO_VERSION=1.26.0
-    HUGO_VERSION=0.156.0
-    NODE_VERSION=24.13.1
+    DART_SASS_VERSION=1.98.0
+    GO_VERSION=1.26.1
+    HUGO_VERSION=0.158.0
+    NODE_VERSION=24.14.0
 
     export TZ=Europe/Oslo
 
index 2ead348eee88eb5f6975ff57b90b05383019f05d..03b17869cb5ae6e7ef4abf66c93dd37a263ab755 100644 (file)
@@ -21,7 +21,7 @@ Please complete the following tasks before continuing:
 1. [Log in](https://github.com/login) to your GitHub account
 1. [Create](https://github.com/new) a GitHub repository for your project
 1. [Create](https://git-scm.com/docs/git-init) a local Git repository for your project with a [remote](https://git-scm.com/docs/git-remote) reference to your GitHub repository
-1. Create a Hugo site within your local Git repository and test it with the `hugo server` command
+1. Create a Hugo project within your local Git repository and test it with the `hugo server` command
 1. Commit the changes to your local Git repository and push to your GitHub repository
 
 ## Procedure
@@ -40,7 +40,7 @@ Step 2
 
   {{< code-toggle file=hugo copy=true >}}
   [caches.images]
-  dir = ":cacheDir/images"
+  dir = ':cacheDir/images'
   {{< /code-toggle >}}
 
   See [configure file caches] for more information.
@@ -77,10 +77,10 @@ Step 4
     build:
       runs-on: ubuntu-latest
       env:
-        DART_SASS_VERSION: 1.97.3
-        GO_VERSION: 1.26.0
-        HUGO_VERSION: 0.156.0
-        NODE_VERSION: 24.13.1
+        DART_SASS_VERSION: 1.98.0
+        GO_VERSION: 1.26.1
+        HUGO_VERSION: 0.158.0
+        NODE_VERSION: 24.14.0
         TZ: Europe/Oslo
       steps:
         - name: Checkout
@@ -185,17 +185,6 @@ Step 8
 
 In the future, whenever you push a change from your local Git repository, GitHub Pages will rebuild and deploy your site.
 
-## Customize the workflow
-
-The example workflow above includes this step, which typically takes 10&#8209;15 seconds:
-
-```yaml
-- name: Install Dart Sass
-  run: sudo snap install dart-sass
-```
-
-You may remove this step if your site, themes, and modules do not transpile Sass to CSS using the [Dart Sass] transpiler.
-
 ## Other resources
 
 - [Learn more about GitHub Actions](https://docs.github.com/en/actions)
@@ -204,5 +193,4 @@ You may remove this step if your site, themes, and modules do not transpile Sass
 
 [`cacheDir`]: /configuration/all/#cachedir
 [configure file caches]: /configuration/caches/
-[Dart Sass]: /functions/css/sass/#dart-sass
 [GitHub Pages documentation]: https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites
index 441c0b11ff897726c0d53071c8bfa0c6e9415e72..6792b4f8d09ee9c51d85e68b3f8ff70852c9db04 100644 (file)
@@ -24,9 +24,9 @@ Define your [CI/CD](g) jobs by creating a `.gitlab-ci.yml` file in the root of y
 ```yaml {file=".gitlab-ci.yml" copy=true}
 variables:
   # Application versions
-  DART_SASS_VERSION: 1.97.3
-  HUGO_VERSION: 0.156.0
-  NODE_VERSION: 24.13.1
+  DART_SASS_VERSION: 1.98.0
+  HUGO_VERSION: 0.158.0
+  NODE_VERSION: 24.14.0
   # Git
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
@@ -35,69 +35,70 @@ variables:
   TZ: Europe/Oslo
 
 image:
-  name: golang:1.26.0-bookworm
+  name: golang:1.26.1-bookworm
 
 pages:
   stage: deploy
   script:
-    # Create directory for user-specific executable files
-    - echo "Creating directory for user-specific executable files..."
-    - mkdir -p "${HOME}/.local"
-
-    # Install utilities
-    - echo "Installing utilities..."
-    - apt-get update
-    - apt-get install -y brotli xz-utils zstd
-
-    # Install Dart Sass
-    - echo "Installing Dart Sass ${DART_SASS_VERSION}..."
-    - curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
-    - tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
-    - rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
-    - export PATH="${HOME}/.local/dart-sass:${PATH}"
-
-    # Install Hugo
-    - echo "Installing Hugo ${HUGO_VERSION}..."
-    - curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
-    - mkdir "${HOME}/.local/hugo"
-    - tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
-    - rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
-    - export PATH="${HOME}/.local/hugo:${PATH}"
-
-    # Install Node.js
-    - echo "Installing Node.js ${NODE_VERSION}..."
-    - curl -sLJO "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
-    - tar -C "${HOME}/.local" -xf "node-v${NODE_VERSION}-linux-x64.tar.xz"
-    - rm "node-v${NODE_VERSION}-linux-x64.tar.xz"
-    - export PATH="${HOME}/.local/node-v${NODE_VERSION}-linux-x64/bin:${PATH}"
-
-    # Verify installations
-    - echo "Verifying installations..."
-    - "echo Dart Sass: $(sass --version)"
-    - "echo Go: $(go version)"
-    - "echo Hugo: $(hugo version)"
-    - "echo Node.js: $(node --version)"
-    - "echo brotli: $(brotli --version)"
-    - "echo xz: $(xz --version)"
-    - "echo zstd: $(zstd --version)"
-
-    # Install Node.js dependencies
-    - echo "Installing Node.js dependencies..."
-    - "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci --prefer-offline || true"
-
-    # Configure Git
-    - echo "Configuring Git..."
-    - git config core.quotepath false
-
-    # Build site
-    - echo "Building site..."
-    - hugo build --gc --minify --baseURL "${CI_PAGES_URL}"
-
-    # Compress published files
-    - echo "Compressing published files..."
-    - find public/ -type f -regextype posix-extended -regex '.+\.(css|html|js|json|mjs|svg|txt|xml)$' -print0 > files.txt
-    - time xargs --null --max-procs=0 --max-args=1 brotli --quality=10 --force --keep < files.txt
-    - time xargs --null --max-procs=0 --max-args=1 gzip -9 --force --keep < files.txt
+    - |
+      # Create directory for user-specific executable files
+      echo "Creating directory for user-specific executable files..."
+      mkdir -p "${HOME}/.local"
+
+      # Install utilities
+      echo "Installing utilities..."
+      apt-get update
+      apt-get install -y brotli xz-utils zstd
+
+      # Install Dart Sass
+      echo "Installing Dart Sass ${DART_SASS_VERSION}..."
+      curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
+      tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
+      rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
+      export PATH="${HOME}/.local/dart-sass:${PATH}"
+
+      # Install Hugo
+      echo "Installing Hugo ${HUGO_VERSION}..."
+      curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.tar.gz"
+      mkdir -p "${HOME}/.local/hugo"
+      tar -C "${HOME}/.local/hugo" -xf "hugo_${HUGO_VERSION}_linux-amd64.tar.gz"
+      rm "hugo_${HUGO_VERSION}_linux-amd64.tar.gz"
+      export PATH="${HOME}/.local/hugo:${PATH}"
+
+      # Install Node.js
+      echo "Installing Node.js ${NODE_VERSION}..."
+      curl -sLJO "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
+      tar -C "${HOME}/.local" -xf "node-v${NODE_VERSION}-linux-x64.tar.xz"
+      rm "node-v${NODE_VERSION}-linux-x64.tar.xz"
+      export PATH="${HOME}/.local/node-v${NODE_VERSION}-linux-x64/bin:${PATH}"
+
+      # Verify installations
+      echo "Verifying installations..."
+      echo "Dart Sass: $(sass --version)"
+      echo "Go: $(go version)"
+      echo "Hugo: $(hugo version)"
+      echo "Node.js: $(node --version)"
+      echo "brotli: $(brotli --version)"
+      echo "xz: $(xz --version)"
+      echo "zstd: $(zstd --version)"
+
+      # Install Node.js dependencies
+      echo "Installing Node.js dependencies..."
+      [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci --prefer-offline || true
+
+      # Configure Git
+      echo "Configuring Git..."
+      git config core.quotepath false
+
+      # Build site
+      echo "Building site..."
+      hugo --gc --minify --baseURL "${CI_PAGES_URL}"
+
+      # Compress published files
+      echo "Compressing published files..."
+      find public/ -type f -regextype posix-extended -regex '.+\.(css|html|js|json|mjs|svg|txt|xml)$' -print0 > files.txt
+      time xargs --null --max-procs=0 --max-args=1 brotli --quality=10 --force --keep < files.txt
+      time xargs --null --max-procs=0 --max-args=1 gzip -9 --force --keep < files.txt
   artifacts:
     paths:
       - public
index eb2eca4d488c56bed12a3f2e548d0ba05be75ac9..34ff0673e830175153d3db7efc1edb05393faa90 100644 (file)
@@ -18,7 +18,7 @@ Please complete the following tasks before continuing:
 1. [Log in](https://github.com/login) to your GitHub account
 1. [Create](https://github.com/new) a GitHub repository for your project
 1. [Create](https://git-scm.com/docs/git-init) a local Git repository for your project with a [remote](https://git-scm.com/docs/git-remote) reference to your GitHub repository
-1. Create a Hugo site within your local Git repository and test it with the `hugo server` command
+1. Create a Hugo project within your local Git repository and test it with the `hugo server` command
 1. Commit the changes to your local Git repository and push to your GitHub repository.
 
 ## Procedure
@@ -30,10 +30,10 @@ Step 1
 
   ```text {file="netlify.toml" copy=true}
   [build.environment]
-  DART_SASS_VERSION = "1.97.3"
-  GO_VERSION = "1.26.0"
-  HUGO_VERSION = "0.156.0"
-  NODE_VERSION = "24.13.1"
+  DART_SASS_VERSION = "1.98.0"
+  GO_VERSION = "1.26.1"
+  HUGO_VERSION = "0.158.0"
+  NODE_VERSION = "24.14.0"
   TZ = "Europe/Oslo"
 
   [build]
@@ -48,10 +48,10 @@ Step 1
 
   ```text {file="netlify.toml" copy=true}
   [build.environment]
-  DART_SASS_VERSION = "1.97.3"
-  GO_VERSION = "1.26.0"
-  HUGO_VERSION = "0.156.0"
-  NODE_VERSION = "24.13.1"
+  DART_SASS_VERSION = "1.98.0"
+  GO_VERSION = "1.26.1"
+  HUGO_VERSION = "0.158.0"
+  NODE_VERSION = "24.14.0"
   TZ = "Europe/Oslo"
 
   [build]
index 609ff8c31fc410b075f91ec414186c90fc113911..c0cac9261ff9abb9d529dd8853d1e56027f41982 100644 (file)
@@ -18,7 +18,7 @@ Please complete the following tasks before continuing:
 1. [Log in](https://github.com/login) to your GitHub account
 1. [Create](https://github.com/new) a GitHub repository for your project
 1. [Create](https://git-scm.com/docs/git-init) a local Git repository for your project with a [remote](https://git-scm.com/docs/git-remote) reference to your GitHub repository
-1. Create a Hugo site within your local Git repository and test it with the `hugo server` command
+1. Create a Hugo project within your local Git repository and test it with the `hugo server` command
 
 ## Procedure
 
@@ -35,13 +35,13 @@ Step 1
       staticPublishPath: public
       envVars:
         - key: DART_SASS_VERSION
-          value: 1.97.3
+          value: 1.98.0
         - key: GO_VERSION
-          value: 1.26.0
+          value: 1.26.1
         - key: HUGO_VERSION
-          value: 0.156.0
+          value: 0.158.0
         - key: NODE_VERSION
-          value: 24.13.1
+          value: 24.14.0
         - key: TZ
           value: Europe/Oslo
   ```
index 75f3b45b5fc0d636e98d1771228da334b6c26d72..90545963676d3c2d03c4b29ccdfc2bfcc939f8d5 100644 (file)
@@ -84,7 +84,7 @@ environment:
   site: <YourUsername>.srht.site
 tasks:
 - package: |
-    DART_SASS_VERSION=1.97.1 # Latest version as of 20/12/2025
+    DART_SASS_VERSION=1.98.0
     mkdir -p $HOME/.local
     curl -L https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64-musl.tar.gz -o dart-sass.tar.gz
     tar -xzf dart-sass.tar.gz -C $HOME/.local
index 0a0143442bfefb66b2a1f4d12e6b0c7677ab2cc7..8eacaee9fd5be2b6f77ffa127750f68440873f2f 100644 (file)
@@ -17,7 +17,7 @@ Please complete the following tasks before continuing:
 1. [Log in](https://github.com/login) to your GitHub account
 1. [Create](https://github.com/new) a GitHub repository for your project
 1. [Create](https://git-scm.com/docs/git-init) a local Git repository for your project with a [remote](https://git-scm.com/docs/git-remote) reference to your GitHub repository
-1. Create a Hugo site within your local Git repository and test it with the `hugo server` command
+1. Create a Hugo project within your local Git repository and test it with the `hugo server` command
 
 ## Procedure
 
@@ -47,10 +47,10 @@ Step 2
 
   main() {
 
-    DART_SASS_VERSION=1.97.3
-    GO_VERSION=1.26.0
-    HUGO_VERSION=0.156.0
-    NODE_VERSION=24.13.1
+    DART_SASS_VERSION=1.98.0
+    GO_VERSION=1.26.1
+    HUGO_VERSION=0.158.0
+    NODE_VERSION=24.14.0
 
     export TZ=Europe/Oslo
 
index eb15b13a75836fd5129de8423abeaf9591295aea..e432afb8d5049848efb730a43a7e16abc1b44cb0 100644 (file)
@@ -151,7 +151,7 @@ Workspaces simplify local development of sites with modules. Create a `.work` fi
 A `.work` file example:
 
 ```text
-go 1.24
+go 1.25
 
 use .
 use ../my-hugo-module
index 809624459c44caf573dd7d8cee28d55218b70525..7310ff3ba8dd6963b758fdf197b0dfb282ee2014 100644 (file)
@@ -25,7 +25,7 @@ pageRef = '/contact'
 weight = 20
 {{< /code-toggle >}}
 
-This example uses the `Identifier` method when querying the translation table on a multilingual site, falling back the `name` property if a matching key in the translation table does not exist:
+This example uses the `Identifier` method when querying the translation table on a multilingual project, falling back the `name` property if a matching key in the translation table does not exist:
 
 ```go-html-template
 <ul>
index d614a5a870cb3e60c9fc823d038874cc33632d51..abf6396674a998b347b24934af55f6a7be6c91ef 100644 (file)
@@ -24,7 +24,7 @@ pageRef = '/contact'
 weight = 20
 {{< /code-toggle >}}
 
-This example uses the `KeyName` method when querying the translation table on a multilingual site, falling back the `name` property if a matching key in the translation table does not exist:
+This example uses the `KeyName` method when querying the translation table on a multilingual project, falling back the `name` property if a matching key in the translation table does not exist:
 
 ```go-html-template
 <ul>
index 217af4e99b624d146aa932fca548d2167fb0569b..f159ba86864c45066aacc19f701f710601f9852a 100644 (file)
@@ -67,16 +67,16 @@ defaultContentLanguage         = 'en'
 defaultContentLanguageInSubdir = true
 
 [languages.en]
 languageCode      = 'en-US'
 languageDirection = 'ltr'
 languageName      = 'English'
locale      = 'en-US'
direction = 'ltr'
name      = 'English'
   weight            = 1
   title             = 'My Site in English'
 
 [languages.de]
 languageCode      = 'de-DE'
 languageDirection = 'ltr'
 languageName      = 'Deutsch'
locale      = 'de-DE'
direction = 'ltr'
name      = 'Deutsch'
   weight            = 2
   title             = 'My Site in German'
 
index 27a9f932a7c18043bc063bf538428e57e92297b6..e34c8b7458184fe67753945237053c04da59c5c6 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: AllTranslations
-description: Returns all translations of the given page, including the current language, sorted by language weight.
+description: Returns all translations of the given page, including the current language, sorted by language weight then language name.
 categories: []
 keywords: []
 params:
@@ -16,20 +16,20 @@ defaultContentLanguage = 'en'
 
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageName = 'English'
+label = 'English'
+locale = 'en-US'
 weight = 1
 
 [languages.de]
 contentDir = 'content/de'
-languageCode = 'de-DE'
-languageName = 'Deutsch'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 2
 
 [languages.fr]
 contentDir = 'content/fr'
-languageCode = 'fr-FR'
-languageName = 'Français'
+label = 'Français'
+locale = 'fr-FR'
 weight = 3
 {{< /code-toggle >}}
 
@@ -61,7 +61,7 @@ And this template:
   <ul>
     {{ range . }}
       <li>
-        <a href="{{ .RelPermalink }}" hreflang="{{ .Language.LanguageCode }}">{{ .LinkTitle }} ({{ or .Language.LanguageName .Language.Lang }})</a>
+        <a href="{{ .RelPermalink }}" hreflang="{{ .Language.Locale }}">{{ .LinkTitle }} ({{ or .Language.Label .Language.Name }})</a>
       </li>
     {{ end }}
   </ul>
index ef2dffa4c8765e231f880715a286ca8ac2bc352f..8a60f0934b618474ef0fb8e4cd9242f1feafebcc 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: GitInfo
-description: Returns Git information related to the last commit of the given page.
+description: Provides access to commit metadata for a given page.
 categories: []
 keywords: []
 params:
@@ -9,47 +9,55 @@ params:
     signatures: [PAGE.GitInfo]
 ---
 
-The `GitInfo` method on a `Page` object returns an object with additional methods.
+The `GitInfo` method on a `Page` object provides access to commit metadata from your Git history, such as the author's name, the commit hash, and the commit message.
 
 > [!note]
-> Hugo's Git integration is performant, but may increase build times on large sites.
+> Hugo's Git integration is performant, but may increase build times for large projects.
 
 ## Prerequisites
 
 Install Git, create a repository, and commit your project files.
 
-You must also allow Hugo to access your repository. In your project configuration:
+You must also allow Hugo to access your repository by adding this to your project configuration:
 
 {{< code-toggle file=hugo >}}
 enableGitInfo = true
 {{< /code-toggle >}}
 
-Alternatively, use the command line flag when building your project:
-
-```sh
-hugo build --enableGitInfo
-```
-
 > [!note]
-> When you set `enableGitInfo` to `true`, or enable the feature with the command line flag, the last modification date for each content page will be the Author Date of the last commit for that file.
+> When you set [`enableGitInfo`][] to `true`, the last modification date for each content page will automatically be the Author Date of the last commit for that file.
 >
-> This is configurable. See&nbsp;[details].
+> This is configurable. See [details][].
+
+## Scope
+
+Commit metadata is available for content stored in your local repository and for content provided by [modules](g).
+
+### Local content
+
+Hugo retrieves commit metadata for files tracked within your project's local repository. This includes all content files managed by Git in your main project directory.
+
+### Module content
+
+{{< new-in 0.157.0 />}}
+
+Hugo also retrieves commit metadata for content provided by modules. This allows you to display commit data for remote repositories that are mounted as content directories, such as when aggregating documentation from multiple sources.
 
 ## Methods
 
 ### AbbreviatedHash
 
-(`string`) The abbreviated commit hash.
+(`string`) Returns the seven-character shortened version of the commit hash.
 
 ```go-html-template
 {{ with .GitInfo }}
-  {{ .AbbreviatedHash }} → aab9ec0b3
+  {{ .AbbreviatedHash }} → aab9ec0
 {{ end }}
 ```
 
 ### AuthorDate
 
-(`time.Time`) The author date.
+(`time.Time`) Returns the date the author originally created the commit.
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -59,7 +67,7 @@ hugo build --enableGitInfo
 
 ### AuthorEmail
 
-(`string`) The author's email address, respecting [gitmailmap].
+(`string`) Returns the author's email address, respecting [gitmailmap][].
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -69,7 +77,7 @@ hugo build --enableGitInfo
 
 ### AuthorName
 
-(`string`) The author's name, respecting [gitmailmap].
+(`string`) Returns the author's name, respecting [gitmailmap][].
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -79,7 +87,7 @@ hugo build --enableGitInfo
 
 ### CommitDate
 
-(`time.Time`) The commit date.
+(`time.Time`) Returns the date the commit was applied to the branch.
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -89,7 +97,7 @@ hugo build --enableGitInfo
 
 ### Hash
 
-(`string`) The commit hash.
+(`string`) Returns the full SHA-1 commit hash.
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -99,7 +107,7 @@ hugo build --enableGitInfo
 
 ### Subject
 
-(`string`) The commit message subject.
+(`string`) Returns the first line of the commit message (the summary).
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -109,17 +117,17 @@ hugo build --enableGitInfo
 
 ### Body
 
-(`string`) The commit message body.
+(`string`) Returns the full content of the commit message, excluding the subject line.
 
 ```go-html-template
 {{ with .GitInfo }}
-  {{ .Body }} → Two new pages added.
+  {{ .Body }} → Two new pages added.
 {{ end }}
 ```
 
 ### Ancestors
 
-(`gitmap.GitInfos`) A slice of file-filtered ancestor commits, if any, ordered from most recent to least recent.
+(`gitmap.GitInfos`) Returns a list of previous commits for this specific file, ordered from most recent to oldest.
 
 For example, to list the last 5 commits:
 
@@ -143,13 +151,13 @@ To reverse the order:
 
 ### Parent
 
-(`*gitmap.GitInfo`) The first file-filtered ancestor commit, if any.
+(`*gitmap.GitInfo`) Returns the most recent ancestor commit for the file, if any.
 
 ## Last modified date
 
 By default, when `enableGitInfo` is `true`, the `Lastmod` method on a `Page` object returns the Git AuthorDate of the last commit that included the file.
 
-You can change this behavior in your [project configuration].
+You can change this behavior in your [project configuration][].
 
 ## Hosting considerations
 
@@ -180,6 +188,7 @@ Vercel|Shallow|Yes [^1]
 
 [^3]: To perform a deep clone when hosting on GitLab Pages, set the `GIT_DEPTH` environment variable to `0` in the workflow file. See [example](/host-and-deploy/host-on-gitlab-pages/#configure-gitlab-cicd).
 
+[`enableGitInfo`]: /configuration/all/#enablegitinfo
 [details]: /configuration/front-matter/#dates
 [gitmailmap]: https://git-scm.com/docs/gitmailmap
 [project configuration]: /configuration/front-matter/
index 6ce340ecbd57487e2c2c155c62e1610f421308b0..a9d12b9fb6ec4dfa839df929ed013fbc2382bc1d 100644 (file)
@@ -16,14 +16,14 @@ defaultContentLanguage = 'en'
 
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageName = 'English'
+label = 'English'
+locale = 'en-US'
 weight = 1
 
 [languages.de]
 contentDir = 'content/de'
-languageCode = 'de-DE'
-languageName = 'Deutsch'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 2
 {{< /code-toggle >}}
 
index 7eac722dd3d7adc650abe62cd3befa3370a273e6..26a40e5e05f0b6b6dee198339d7f2ebb7f8d6b98 100644 (file)
@@ -15,16 +15,26 @@ You can also use the `Language` method on a `Site` object. See&nbsp;[details][].
 
 ## Methods
 
-The examples below assume the following in your project configuration:
+The examples below assume the following language definition.
 
 {{< code-toggle file=hugo >}}
 [languages.de]
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
+direction = 'ltr'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 2
 {{< /code-toggle >}}
 
+### Direction
+
+{{< new-in 0.158.0 />}}
+
+(`string`) Returns the [`direction`][] from the language definition.
+
+```go-html-template
+{{ .Language.Direction }} → ltr
+```
+
 ### IsDefault
 
 {{< new-in 0.153.0 />}}
@@ -35,43 +45,55 @@ weight = 2
 {{ .Language.IsDefault }} → true
 ```
 
-### Lang
+### Label
 
-(`string`) Returns the language tag as defined by [RFC 5646][]. This is the lowercased key from your project configuration.
+{{< new-in 0.158.0 />}}
+
+(`string`) Returns the [`label`][] from the language definition.
 
 ```go-html-template
-{{ .Language.Lang }} → de
+{{ .Language.Label }} → Deutsch
 ```
 
+### Lang
+
+{{<deprecated-in 0.158.0 />}}
+
+Use [`Name`](#name) instead.
+
 ### LanguageCode
 
-(`string`) Returns the [`languageCode`][] from your project configuration. Falls back to `Lang` if not defined.
+{{<deprecated-in 0.158.0 />}}
 
-```go-html-template
-{{ .Language.LanguageCode }} → de-DE
-```
+Use [`Locale`](#locale) instead.
 
 ### LanguageDirection
 
-(`string`) Returns the [`languageDirection`][] from your project configuration.
+{{<deprecated-in 0.158.0 />}}
 
-```go-html-template
-{{ .Language.LanguageDirection }} → ltr
-```
+Use [`Direction`](#direction) instead.
 
 ### LanguageName
 
-(`string`) Returns the [`languageName`][] from your project configuration.
+{{<deprecated-in 0.158.0 />}}
+
+Use [`Label`](#label) instead.
+
+### Locale
+
+{{< new-in 0.158.0 />}}
+
+(`string`) Returns the [`locale`][] from the language definition, falling back to [`Name`](#name).
 
 ```go-html-template
-{{ .Language.LanguageName }} → Deutsch
+{{ .Language.Locale }} → de-DE
 ```
 
 ### Name
 
 {{< new-in 0.153.0 />}}
 
-(`string`) Returns the language tag as defined by [RFC 5646][]. This is the lowercased key from your project configuration. This is an alias for `Lang`.
+(`string`) Returns the language tag as defined by [RFC 5646][]. This is the lowercased key from the language definition.
 
 ```go-html-template
 {{ .Language.Name }} → de
@@ -79,16 +101,35 @@ weight = 2
 
 ### Weight
 
-(`int`) Returns the language [`weight`][] from your project configuration.
+{{<deprecated-in 0.158.0 />}}
 
-```go-html-template
-{{ .Language.Weight }} → 2
-```
-
-[`languageCode`]: /configuration/languages/#languagecode
-[`languageDirection`]: /configuration/languages/#languagedirection
-[`languageName`]: /configuration/languages/#languagename
-[`weight`]: /configuration/languages/#weight
-[default language]: /quick-reference/glossary/#default-language
-[details]: /methods/page/language/
 [RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646
+[`direction`]: /configuration/languages/#direction
+[`label`]: /configuration/languages/#label
+[`locale`]: /configuration/languages/#locale
+[default language]: /quick-reference/glossary/#default-language
+[details]: /methods/site/language/
+
+## Example
+
+Use the code below to create a language selector, allowing users to navigate between the different translated versions of the current page.
+
+```go-html-template {file="layouts/_partials/language-selector.html" copy=true}
+{{ with .Rotate "language" }}
+  <nav class="language-selector">
+    <ul>
+      {{ range . }}
+        {{ if eq .Language $.Language }}
+          <li class="active">
+            <a aria-current="page" href="{{ .Permalink }}" hreflang="{{ .Language.Locale }}">{{ .Language.Label }}</a>
+          </li>
+        {{ else }}
+          <li>
+            <a href="{{ .Permalink }}" hreflang="{{ .Language.Locale }}">{{ .Language.Label }}</a>
+          </li>
+        {{ end }}
+      {{ end }}
+    </ul>
+  </nav>
+{{ end }}
+```
index 1ff9cd601c79a533a530e6b887a5d45e8639b159..b2ef7a031d5c99d27c1f7f02cbb60398e08e4000 100644 (file)
@@ -26,7 +26,7 @@ The value returned by the `Path` method on a `Page` object is independent of con
 
 ## Examples
 
-### Monolingual site
+### Monolingual project
 
 Note that the logical path is independent of content format and URL modifiers.
 
index 65d11166e0a83290375e3f3b57b54d370d987d5b..23bc214130acfa928a691799e0e11de46c5cf611 100644 (file)
@@ -9,15 +9,15 @@ params:
     signatures: [PAGE.Plain]
 ---
 
-The `Plain` method on a `Page` object renders Markdown and [shortcodes](g) to HTML, then strips the HTML [tags]. It does not strip HTML [entities].
+The `Plain` method on a `Page` object renders Markdown and [shortcodes](g) to HTML, then strips the HTML [tags][]. It does not strip HTML [entities][].
 
-To prevent Go's [html/template] package from escaping HTML entities, pass the result through the [`htmlUnescape`] function.
+To prevent Go's [`html/template`][] package from escaping HTML entities, pass the result through the [`htmlUnescape`][] function.
 
 ```go-html-template
 {{ .Plain | htmlUnescape }}
 ```
 
-[html/template]: https://pkg.go.dev/html/template
+[`html/template`]: https://pkg.go.dev/html/template
 [entities]: https://developer.mozilla.org/en-US/docs/Glossary/Entity
 [tags]: https://developer.mozilla.org/en-US/docs/Glossary/Tag
 [`htmlUnescape`]: /functions/transform/htmlunescape/
index 1bd7dea31dd06fcc21962c74883b0ef4d5e4d1bc..2fd2ea4d764d967f5f4ef66d794215838dde041f 100644 (file)
@@ -17,21 +17,21 @@ By default, Hugo assumes a reading speed of 212 words per minute. For CJK langua
 {{ printf "Estimated reading time: %d minutes" .ReadingTime }}
 ```
 
-Reading speed varies by language. Create language-specific estimated reading times on your multilingual site using site parameters.
+Reading speed varies by language. Create language-specific estimated reading times on your multilingual project using site parameters.
 
 {{< code-toggle file=hugo >}}
 [languages]
   [languages.de]
     contentDir = 'content/de'
-    languageCode = 'de-DE'
-    languageName = 'Deutsch'
+    label = 'Deutsch'
+    locale = 'de-DE'
     weight = 2
     [languages.de.params]
     reading_speed = 179
   [languages.en]
     contentDir = 'content/en'
-    languageCode = 'en-US'
-    languageName = 'English'
+    label = 'English'
+    locale = 'en-US'
     weight = 1
     [languages.en.params]
       reading_speed = 228
index 1d40f48b17dc8d3f8e20a63d69be96d9d6f53f15..53f8cae8211a0f282e46b8f7ea628080c00dde37 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Sitemap
-description: Returns the sitemap settings for the given page as defined in front matter, falling back to the sitemap settings as defined in the site configuration.
+description: Returns the sitemap settings for the given page as defined in front matter, falling back to the sitemap settings as defined in your project configuration.
 categories: []
 keywords: []
 params:
index 98aeeab02053963ef32ce75f6611bd7ad19148fc..293590bfa44c9756a9383eb58ab2ed5513233dc5 100644 (file)
@@ -11,76 +11,5 @@ expiryDate: '2028-02-18' # deprecated 2026-02-18 in v0.156.0
 ---
 
 {{< deprecated-in 0.156.0 >}}
-Use [`hugo.Sites`] instead.
-
-[`hugo.Sites`]: /functions/hugo/sites/
+Use [`hugo.Sites`](/functions/hugo/sites/) instead.
 {{< /deprecated-in >}}
-
-{{% include "/_common/functions/hugo/sites-collection.md" %}}
-
-With this project configuration:
-
-{{< code-toggle file=hugo >}}
-defaultContentLanguage = 'de'
-defaultContentLanguageInSubdir = true
-defaultContentVersionInSubdir = true
-
-[languages.de]
-contentDir = 'content/de'
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
-title = 'Projekt Dokumentation'
-weight = 1
-
-[languages.en]
-contentDir = 'content/en'
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
-title = 'Project Documentation'
-weight = 2
-
-[versions.'v1.0.0']
-[versions.'v2.0.0']
-[versions.'v3.0.0']
-{{< /code-toggle >}}
-
-This template:
-
-```go-html-template
-<ul>
-  {{ range .Sites }}
-    <li><a href="{{ .Home.RelPermalink }}">{{ .Title }} {{ .Version.Name }}</a></li>
-  {{ end }}
-</ul>
-```
-
-Produces a list of links to each home page:
-
-```html
-<ul>
-  <li><a href="/v3.0.0/de/">Projekt Dokumentation v3.0.0</a></li>
-  <li><a href="/v2.0.0/de/">Projekt Dokumentation v2.0.0</a></li>
-  <li><a href="/v1.0.0/de/">Projekt Dokumentation v1.0.0</a></li>
-  <li><a href="/v3.0.0/en/">Project Documentation v3.0.0</a></li>
-  <li><a href="/v2.0.0/en/">Project Documentation v2.0.0</a></li>
-  <li><a href="/v1.0.0/en/">Project Documentation v1.0.0</a></li>
-</ul>
-```
-
-To render a link to the home page of the [default site](g):
-
-```go-html-template
-{{ with .Sites.Default }}
-  <a href="{{ .Home.RelPermalink }}">{{ .Title }}</a>
-{{ end }}
-```
-
-This is equivalent to:
-
-```go-html-template
-{{ with index .Sites 0 }}
-  <a href="{{ .Home.RelPermalink }}">{{ .Title }}</a>
-{{ end }}
-```
index 2f6b8f3081910e6f97ce3f41bfb4a2d75ba30eb8..3cbcb4acd44f7b38ccce5a14c0657501b3d49065 100644 (file)
@@ -18,14 +18,14 @@ defaultContentLanguage = 'en'
 
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageName = 'English'
+label = 'English'
+locale = 'en-US'
 weight = 1
 
 [languages.de]
 contentDir = 'content/de'
-languageCode = 'de-DE'
-languageName = 'Deutsch'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 2
 {{< /code-toggle >}}
 
index 58f9024f7256f17be7f43fb323424dce0d7b034a..da3715cf1cf21b71d1f068585e75cf44ad78cf67 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Translations
-description: Returns all translations of the given page, excluding the current language, sorted by language weight.
+description: Returns all translations of the given page, excluding the current language, sorted by language weight then language name.
 categories: []
 keywords: []
 params:
@@ -16,20 +16,20 @@ defaultContentLanguage = 'en'
 
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageName = 'English'
+label = 'English'
+locale = 'en-US'
 weight = 1
 
 [languages.de]
 contentDir = 'content/de'
-languageCode = 'de-DE'
-languageName = 'Deutsch'
+label = 'Deutsch'
+locale = 'de-DE'
 weight = 2
 
 [languages.fr]
 contentDir = 'content/fr'
-languageCode = 'fr-FR'
-languageName = 'Français'
+label = 'Français'
+locale = 'fr-FR'
 weight = 3
 {{< /code-toggle >}}
 
@@ -61,7 +61,7 @@ And this template:
   <ul>
     {{ range . }}
       <li>
-        <a href="{{ .RelPermalink }}" hreflang="{{ .Language.LanguageCode }}">{{ .LinkTitle }} ({{ or .Language.LanguageName .Language.Lang }})</a>
+        <a href="{{ .RelPermalink }}" hreflang="{{ .Language.Locale }}">{{ .LinkTitle }} ({{ or .Language.Label .Language.Name }})</a>
       </li>
     {{ end }}
   </ul>
diff --git a/content/en/methods/pager/PageSize.md b/content/en/methods/pager/PageSize.md
deleted file mode 100644 (file)
index 5aad886..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: PageSize
-description: Returns the number of pages per pager.
-categories: []
-keywords: []
-params:
-  functions_and_methods:
-    returnType: int
-    signatures: [PAGER.PageSize]
-expiryDate: 2026-06-09 # deprecated 2024-06-09 in v0.128.0
----
-
-{{< deprecated-in 0.128.0 >}}
-Use [`PAGER.PagerSize`] instead.
-
-[`PAGER.PagerSize`]: /methods/pager/pagersize/
-{{< /deprecated-in >}}
index 13aa6c1cd794c95bedd1fd82375f8a89f1cf27ad..1bec9e4ea633585db6a0816f00fe7073dae2fad2 100644 (file)
@@ -7,10 +7,9 @@ params:
   functions_and_methods:
     returnType: int
     signatures: [PAGER.PagerSize]
+aliases: [/methods/pager/pagesize/]
 ---
 
-{{< new-in 0.128.0 />}}
-
 The number of pages per pager is determined by the optional second argument passed to the [`Paginate`] method, falling back to the `pagerSize` as defined in your [project configuration].
 
 [`Paginate`]: /methods/page/paginate/
index 3006c6a2056c83e840b127bfe26fce6129b92e0e..b2490688e453e31a5f32b69095d34ec552b935c8 100644 (file)
@@ -11,24 +11,29 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-The `Colors` method on a `Resource` image object returns a slice of the most dominant colors in an image, ordered from most dominant to least dominant. This method is fast, but if you also downsize your image you can improve performance by extracting the colors from the scaled image.
+The `Colors` method returns a slice of the most dominant colors in a [processable image](g), ordered from most dominant to least dominant.
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+This method is fast, but if you downscale your image first, you can further improve performance by extracting colors from the smaller resource.
 
 ## Methods
 
-Each color is an object with the following methods:
+Each color in the slice is an object with the following methods:
 
 ### ColorHex
 
-(`string`) Returns the [hexadecimal color] value, prefixed with a hash sign.
+(`string`) Returns the [hexadecimal color][] value, prefixed with a hash sign.
 
 ### Luminance
 
-(`float64`) Returns the [relative luminance] of the color in the sRGB colorspace in the range [0, 1]. A value of `0` represents the darkest black, while a value of `1` represents the lightest white.
+(`float64`) Returns the [relative luminance][] of the color in the sRGB colorspace in the range [0, 1]. A value of `0` represents the darkest black, while a value of `1` represents the lightest white.
 
 > [!note]
-> Image filters such as [`images.Dither`], [`images.Padding`], and [`images.Text`] accept either hexadecimal color values or `images.Color` objects as arguments.
->
-> Hugo renders an `images.Color` object as a hexadecimal color value.
+> Image filters such as [`images.Dither`][], [`images.Padding`][], and [`images.Text`][] accept either hexadecimal color values or `images.Color` objects as arguments. Hugo renders an `images.Color` object as a hexadecimal color value.
 
 ## Sorting
 
@@ -131,13 +136,13 @@ To create a text box where the foreground and background colors are derived from
 
 ### WCAG contrast ratio
 
-In the previous example we placed light text on a dark background, but does this color combination conform to [WCAG] guidelines for either the [minimum] or the [enhanced] contrast ratio?
+In the previous example we placed light text on a dark background, but does this color combination conform to [WCAG][] guidelines for either the [minimum][] or the [enhanced][] contrast ratio?
 
-The WCAG defines the [contrast ratio] as:
+The WCAG defines the [contrast ratio][] as:
 
 $$contrast\ ratio = { L_1 + 0.05 \over L_2 + 0.05 }$$
 
-where $L_1$ is the relative luminance of the lightest color and $L_2$ is the relative luminance of the darkest color.
+where \(L_1\) is the relative luminance of the lightest color and \(L_2\) is the relative luminance of the darkest color.
 
 Calculate the contrast ratio to determine WCAG conformance:
 
@@ -159,12 +164,13 @@ Calculate the contrast ratio to determine WCAG conformance:
 {{ end }}
 ```
 
+[WCAG]: https://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines
 [`images.Dither`]: /functions/images/dither/
 [`images.Padding`]: /functions/images/padding/
 [`images.Text`]: /functions/images/text/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
 [contrast ratio]: https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio
 [enhanced]: https://www.w3.org/WAI/WCAG22/quickref/?showtechniques=145#contrast-enhanced
 [hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
 [minimum]: https://www.w3.org/WAI/WCAG22/quickref/?showtechniques=145#contrast-minimum
 [relative luminance]: https://www.w3.org/TR/WCAG21/#dfn-relative-luminance
-[WCAG]: https://en.wikipedia.org/wiki/Web_Content_Accessibility_Guidelines
index d476803d903c452bf1cf6695cae377f81cb8fc23..e764be1676e0ac515bf83d6f88fab088993c71fe 100644 (file)
@@ -11,7 +11,14 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-Crop an image according to the given [processing specification][]. When cropping, you must provide both width and height (such as `200x200`) within the specification. This method does not perform any resizing; it simply extracts a region of the image based on the dimensions and the [anchor](#anchor) provided, if any.
+The `Crop` method returns a new resource from a [processable image](g) according to the given [processing specification][].
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+When cropping, you must provide both width and height (such as `200x200`) within the specification. This method does not perform any resizing; it simply extracts a region of the image based on the dimensions and the [anchor](#anchor) provided, if any.
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
@@ -21,7 +28,7 @@ Crop an image according to the given [processing specification][]. When cropping
 {{ end }}
 ```
 
-In the example above, `"200x200 TopRight"` is the _processing specification_.
+In the example above, `"200x200 TopRight"` is the processing specification.
 
 {{% include "/_common/methods/resource/processing-spec.md" %}}
 
@@ -43,4 +50,5 @@ In the example above, `"200x200 TopRight"` is the _processing specification_.
   example=true
 >}}
 
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
 [processing specification]: #processing-specification
index 591af82666f3bb8012c62fa01aa124858478934c..aa0d076b15b7cf0c102714c2d90668f82a90dc35 100644 (file)
@@ -15,46 +15,3 @@ Use the `try` statement instead. See [example].
 
 [example]: /functions/go-template/try/#example
 {{< /deprecated-in >}}
-
-The `Err` method on a resource returned by the [`resources.GetRemote`] function returns an error message if the HTTP request fails, else nil. If you do not handle the error yourself, Hugo will fail the build.
-
-[`resources.GetRemote`]: /functions/resources/getremote/
-
-In this example we send an HTTP request to a nonexistent domain:
-
-```go-html-template
-{{ $url := "https://broken-example.org/images/a.jpg" }}
-{{ with resources.GetRemote $url }}
-  {{ with .Err }}
-    {{ errorf "%s" . }}
-  {{ else }}
-    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
-  {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
-{{ end }}
-```
-
-The code above captures the error from the HTTP request, then fails the build:
-
-```text
-ERROR error calling resources.GetRemote: Get "https://broken-example.org/images/a.jpg": dial tcp: lookup broken-example.org on 127.0.0.53:53: no such host
-```
-
-To log an error as a warning instead of an error:
-
-```go-html-template
-{{ $url := "https://broken-example.org/images/a.jpg" }}
-{{ with resources.GetRemote $url }}
-  {{ with .Err }}
-    {{ warnf "%s" . }}
-  {{ else }}
-    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
-  {{ end }}
-{{ else }}
-  {{ errorf "Unable to get remote resource %q" $url }}
-{{ end }}
-```
-
-> [!note]
-> An HTTP response with a 404 status code is not an HTTP request error. To handle 404 status codes, code defensively using the nested `with-else-end` construct as shown above.
index e1cd2ab5989a39b0eca8e19cdc301adcd8048a9f..bc060f4c9c46c149fb76ab1de86e862f02712f25 100644 (file)
@@ -1,88 +1,15 @@
 ---
 title: Exif
-description: Applicable to JPEG, PNG, TIFF, and WebP images, returns an object containing Exif metadata.
+description: Returns an object containing Exif metadata for supported image formats.
 categories: []
 keywords: ['metadata']
 params:
   functions_and_methods:
     returnType: meta.ExifInfo
     signatures: [RESOURCE.Exif]
+expiryDate: 2028-01-28 # deprecated 2026-01-28 in v0.155.0
 ---
 
-{{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
-
-Applicable to JPEG, PNG, TIFF, and WebP images, the `Exif` method on an image `Resource` object returns an object containing [Exif][Exif_Definition] metadata.
-
-To extract [Exif][Exif_Definition], [IPTC][IPTC_Definition], and [XMP][XMP_Definition] metadata, use the [`Meta`] method instead.
-
-> [!note]
-> Metadata is not preserved during image transformation. Use this method with the _original_ image resource to extract metadata from JPEG, PNG, TIFF, and WebP images.
-
-## Methods
-
-### Date
-
-(`time.Time`) Returns the image creation date/time. Format with the [`time.Format`] function.
-
-### Lat
-
-(`float64`) Returns the GPS latitude in degrees from Exif metadata.
-
-### Long
-
-(`float64`) Returns the GPS longitude in degrees from Exif metadata.
-
-### Tags
-
-(`meta.Tags`) Returns a collection of available Exif fields for this image. Availability is determined by the [`includeFields`][] and [`excludeFields`][] settings in your project configuration.
-
-## Examples
-
-To list the creation date, latitude, and longitude:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Exif }}
-    <pre>
-      {{ printf "%-25s %v\n" "Date" .Date }}
-      {{ printf "%-25s %v\n" "Latitude" .Lat }}
-      {{ printf "%-25s %v\n" "Longitude" .Long }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
-
-To list the available Exif fields:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Exif }}
-    <pre>
-      {{ range $k, $v := .Tags -}}
-        {{ printf "%-25s %v\n" $k $v }}
-      {{ end }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
-
-To list specific Exif fields:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Exif }}
-    <pre>
-      {{ with .Tags.ApertureValue }}{{ printf "%-25s %v\n" "ApertureValue" . }}{{ end }}
-      {{ with .Tags.BrightnessValue }}{{ printf "%-25s %v\n" "BrightnessValue" . }}{{ end }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
-
-[`excludeFields`]: /configuration/imaging/#excludefields
-[`includeFields`]: /configuration/imaging/#includefields
-[`Meta`]: /methods/resource/meta/
-[`time.Format`]: /functions/time/format/
-[Exif_Definition]: https://en.wikipedia.org/wiki/Exif
-[IPTC_Definition]: https://en.wikipedia.org/wiki/IPTC_Information_Interchange_Model
-[XMP_Definition]: https://en.wikipedia.org/wiki/Extensible_Metadata_Platform
+{{< deprecated-in 0.155.0 >}}
+Use [`Meta`](/methods/resource/meta/) instead.
+{{< /deprecated-in >}}
index ba6577ff1df2b6032ce70ae9ed3c5575798e2eac..c510afe6d4478501524391919241f4faeb05f62e 100644 (file)
@@ -11,17 +11,24 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-Crop and resize an image according to the given [processing specification][]. You must provide both width and height (such as `500x200`) within the specification. Unlike [`Resize`][], which may stretch the image, `Fill` maintains the original aspect ratio by cropping the image to the target ratio before resizing. The operation uses the [anchor](#anchor) and [resampling filter](#resampling-filter) provided, if any.
+The `Fill` method returns a new resource from a [processable image](g) according to the given [processing specification][].
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+When filling, you must provide both width and height (such as `500x200`) within the specification. `Fill` maintains the original aspect ratio by resizing the image to cover the target area and cropping any overflowing pixels based on the [anchor](#anchor) provided.
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
-  {{ with .Fill "500x200 TopRight lanczos" }}
+  {{ with .Fill "500x200 TopRight" }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
   {{ end }}
 {{ end }}
 ```
 
-In the example above, `"500x200 TopRight lanczos"` is the _processing specification_.
+In the example above, `"500x200 TopRight"` is the _processing specification.
 
 {{% include "/_common/methods/resource/processing-spec.md" %}}
 
@@ -29,7 +36,7 @@ In the example above, `"500x200 TopRight lanczos"` is the _processing specificat
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
-  {{ with .Fill "500x200 TopRight lanczos webp q85" }}
+  {{ with .Fill "500x200 TopRight" }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
   {{ end }}
 {{ end }}
@@ -39,9 +46,9 @@ In the example above, `"500x200 TopRight lanczos"` is the _processing specificat
   src="images/examples/zion-national-park.jpg"
   alt="Zion National Park"
   filter="Process"
-  filterArgs="fill 500x200 TopRight lanczos webp q85"
+  filterArgs="fill 500x200 TopRight"
   example=true
 >}}
 
-[`Resize`]: /methods/resource/resize/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
 [processing specification]: #processing-specification
index 37fc656d1c91e13931a38772ee039f75a09f153b..812466a553291cb19247a0b5b85127835a4ff359 100644 (file)
@@ -12,7 +12,14 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-Apply one or more [image filters](#image-filters) to the given image.
+The `Filter` method returns a new resource from a [processable image](g) after applying one or more [image filters](#image-filters).
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+Use the `Filter` method to apply effects such as blurring, sharpening, or grayscale conversion. You can pass a single filter or a slice of filters. When providing a slice, Hugo applies the filters from left to right.
 
 To apply a single filter:
 
@@ -24,7 +31,7 @@ To apply a single filter:
 {{ end }}
 ```
 
-To apply two or more filters, executing from left to right:
+To apply multiple filters:
 
 ```go-html-template
 {{ $filters := slice
@@ -38,9 +45,7 @@ To apply two or more filters, executing from left to right:
 {{ end }}
 ```
 
-You can also apply image filters using the [`images.Filter`] function.
-
-[`images.Filter`]: /functions/images/filter/
+You can also apply image filters using the [`images.Filter`][] function.
 
 ## Example
 
@@ -64,4 +69,7 @@ You can also apply image filters using the [`images.Filter`] function.
 
 Use any of these filters with the `Filter` method.
 
-{{% list-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude %}}
+{{% render-list-of-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude %}}
+
+[`images.Filter`]: /functions/images/filter/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
index c7991f4a60b7e64b81bad46893c5d7091ddf1c63..2c0a7c91c53526c329b1b62ffa0029061d491bc5 100644 (file)
@@ -11,17 +11,24 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-Downscale an image to fit according to the given [processing specification][] while maintaining the aspect ratio. You must provide both width and height (such as `600x400`) within the specification. Unlike [`Fill`][] or [`Resize`][], this method will never upscale an image; if the source image is smaller than the target dimensions, it remains its original size. The operation uses the [resampling filter](#resampling-filter) provided, if any.
+The `Fit` method returns a new resource from a [processable image](g) according to the given [processing specification][].
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+When fitting, you must provide both width and height (such as `300x175`) within the specification. `Fit` maintains the original aspect ratio by downscaling the image until it fits within the specified dimensions. Unlike [`Fill`][] or [`Resize`][], this method will never upscale an image; if the source image is smaller than the target dimensions, the dimensions of the resulting image are the same as the original.
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
-  {{ with .Fit "300x175 lanczos" }}
+  {{ with .Fit "300x175" }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
   {{ end }}
 {{ end }}
 ```
 
-In the example above, `"300x175 lanczos"` is the _processing specification_.
+In the example above, `"300x175"` is the processing specification.
 
 {{% include "/_common/methods/resource/processing-spec.md" %}}
 
@@ -29,7 +36,7 @@ In the example above, `"300x175 lanczos"` is the _processing specification_.
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
-  {{ with .Fit "300x175 lanczos" }}
+  {{ with .Fit "300x175" }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
   {{ end }}
 {{ end }}
@@ -39,10 +46,11 @@ In the example above, `"300x175 lanczos"` is the _processing specification_.
   src="images/examples/zion-national-park.jpg"
   alt="Zion National Park"
   filter="Process"
-  filterArgs="fit 300x175 lanczos"
+  filterArgs="fit 300x175"
   example=true
 >}}
 
-[`Resize`]: /methods/resource/resize/
 [`Fill`]: /methods/resource/fill/
+[`Resize`]: /methods/resource/resize/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
 [processing specification]: #processing-specification
index cc131378a6fbff79acbe3561e14d3a948f8c29ba..726802cb0052d223a87a1214425bb7f80b5de3b0 100644 (file)
@@ -11,16 +11,16 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ .Height }} → 400
-{{ end }}
-```
-
-Use the `Width` and `Height` methods together when rendering an `img` element:
+Use the [`reflect.IsImageResourceWithMeta`][] function to verify that Hugo can determine the dimensions before calling the `Height` method.
 
 ```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+{{ with resources.GetMatch "images/featured.*" }}
+  {{ if reflect.IsImageResourceWithMeta . }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ else }}
+    <img src="{{ .RelPermalink }}" alt="">
+  {{ end }}
 {{ end }}
 ```
+
+[`reflect.IsImageResourceWithMeta`]: /functions/reflect/isimageresourcewithmeta/
index b02e99862ad03b84b0d1056c1f0148bc8a635e6b..8a992ba72be4514a255a16488d292a803482c848 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Meta
-description: Applicable to JPEG, PNG, TIFF, and WebP images, returns an object containing Exif, IPTC, and XMP metadata.
+description: Applicable to images, returns an object containing Exif, IPTC, and XMP metadata for supported image formats.
 categories: []
 keywords: ['metadata']
 params:
@@ -13,18 +13,32 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-Applicable to JPEG, PNG, TIFF, and WebP images, the `Meta` method on an image `Resource` object returns an object containing [Exif][Exif_Definition], [IPTC][IPTC_Definition], and [XMP][XMP_Definition] metadata.
+The `Meta` method on an image `Resource` object returns an object containing [Exif][Exif_Definition], [IPTC][IPTC_Definition], and [XMP][XMP_Definition] metadata.
 
-To extract Exif metadata only, use the [`Exif`] method instead.
+While Hugo classifies many file types as images, only certain formats support metadata extraction. Supported formats include AVIF, BMP, GIF, HEIC, HEIF, JPEG, PNG, TIFF, and WebP.
 
 > [!note]
-> Metadata is not preserved during image transformation. Use this method with the _original_ image resource to extract metadata from JPEG, PNG, TIFF, and WebP images.
+> Metadata is not preserved during image transformation. Use this method with the _original_ image resource to extract metadata from supported formats.
+
+## Usage
+
+Use the [`reflect.IsImageResourceWithMeta`][] function to verify that a resource supports metadata extraction before calling the `Meta` method.
+
+```go-html-template
+{{ with resources.GetMatch "images/featured.*" }}
+  {{ if reflect.IsImageResourceWithMeta . }}
+    {{ with .Meta }}
+      {{ .Date.Format "2006-01-02" }}
+    {{ end }}
+  {{ end }}
+{{ end }}
+```
 
 ## Methods
 
 ### Date
 
-(`time.Time`) Returns the image creation date/time. Format with the [`time.Format`] function.
+(`time.Time`) Returns the image creation date/time. Format with the [`time.Format`][] function.
 
 ### Lat
 
@@ -36,7 +50,7 @@ To extract Exif metadata only, use the [`Exif`] method instead.
 
 ### Orientation
 
-(`int`) Returns the value of the Exif `Orientation` tag, one of eight possible values:
+(`int`) Returns the value of the Exif `Orientation` tag, one of eight possible values.
 
 Value|Description
 :--|:--
@@ -51,7 +65,7 @@ Value|Description
 {class="!mt-0"}
 
 > [!tip]
-> Use the [`images.AutoOrient`] image filter to rotate and flip an image as needed per its Exif orientation tag
+> Use the [`images.AutoOrient`][] image filter to rotate and flip an image as needed per its Exif orientation tag
 
 ### Exif
 
@@ -70,96 +84,25 @@ Value|Description
 To list the creation date, latitude, longitude, and orientation:
 
 ```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Meta }}
-    <pre>
-      {{ printf "%-25s %v\n" "Date" .Date }}
-      {{ printf "%-25s %v\n" "Latitude" .Lat }}
-      {{ printf "%-25s %v\n" "Longitude" .Long }}
-      {{ printf "%-25s %v\n" "Orientation" .Orientation }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
-
-To list the available Exif fields:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Meta }}
-    <pre>
-      {{ range $k, $v := .Exif -}}
-        {{ printf "%-25s %v\n" $k $v }}
-      {{ end }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
-
-To list the available IPTC fields:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Meta }}
-    <pre>
-      {{ range $k, $v := .IPTC -}}
-        {{ printf "%-25s %v\n" $k $v }}
-      {{ end }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
-
-To list the available XMP fields:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Meta }}
-    <pre>
-      {{ range $k, $v := .XMP -}}
-        {{ printf "%-25s %v\n" $k $v }}
-      {{ end }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
-
-To list the available Exif, IPTC, and XMP fields together:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Meta }}
-    <pre>
-      {{ range $k, $v := merge .Exif .IPTC .XMP -}}
-        {{ printf "%-25s %v\n" $k $v }}
-      {{ end }}
-    </pre>
+{{ with resources.GetMatch "images/featured.*" }}
+  {{ if reflect.IsImageResourceWithMeta . }}
+    {{ with .Meta }}
+      <pre>
+        {{ printf "%-25s %v\n" "Date" .Date }}
+        {{ printf "%-25s %v\n" "Latitude" .Lat }}
+        {{ printf "%-25s %v\n" "Longitude" .Long }}
+        {{ printf "%-25s %v\n" "Orientation" .Orientation }}
+      </pre>
+    {{ end }}
   {{ end }}
 {{ end }}
 ```
 
-To list specific values:
-
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ with .Meta }}
-    <pre>
-      {{ with .Exif.ApertureValue }}{{ printf "%-25s %v\n" "ApertureValue" . }}{{ end }}
-      {{ with .Exif.BrightnessValue }}{{ printf "%-25s %v\n" "BrightnessValue" . }}{{ end }}
-
-      {{ with .IPTC.Headline }}{{ printf "%-25s %v\n" "Headline" . }}{{ end }}
-      {{ with index .IPTC "Province-State" }}{{ printf "%-25s %v\n" "Province-State" . }}{{ end }}
-
-      {{ with .XMP.Creator }}{{ printf "%-25s %v\n" "Creator" . }}{{ end }}
-      {{ with .XMP.Subject }}{{ printf "%-25s %v\n" "Subject" . }}{{ end }}
-    </pre>
-  {{ end }}
-{{ end }}
-```
+{{% include "/_common/functions/reflect/image-reflection-functions.md" %}}
 
-[`Exif`]: /methods/resource/exif/
 [`fields`]: /configuration/imaging/#fields
 [`images.AutoOrient`]: /functions/images/autoorient/
+[`reflect.IsImageResourceWithMeta`]: /functions/reflect/isimageresourcewithmeta/
 [`sources`]: /configuration/imaging/#sources
 [`time.Format`]: /functions/time/format/
 [Exif_Definition]: https://en.wikipedia.org/wiki/Exif
index e006d23ce4a6cce7e93c033b4d4573a717012bbf..9edb086e0051ad2d697e8620186fb9982047305c 100644 (file)
@@ -12,7 +12,14 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-Process an image according to the given [processing specification][]. This versatile method supports the full range of image transformations, including resizing, cropping, rotation, and format conversion, all within a single specification string.
+The `Process` method returns a new resource from a [processable image](g) according to the given [processing specification][].
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+This versatile method supports the full range of image transformations including resizing, cropping, rotation, and format conversion within a single specification string. Unlike specialized methods such as [`Resize`][] or [`Crop`][], you must explicitly include the [action](#action) in the specification if you are changing the image dimensions.
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
@@ -22,7 +29,7 @@ Process an image according to the given [processing specification][]. This versa
 {{ end }}
 ```
 
-In the example above, `"crop 200x200 TopRight webp q50"` is the _processing specification_.
+In the example above, `"crop 200x200 TopRight webp q50"` is the processing specification.
 
 You can also use this method to apply simple transformations such as rotation and conversion:
 
@@ -34,7 +41,7 @@ You can also use this method to apply simple transformations such as rotation an
 {{ $image := $image.Process "webp" }}
 ```
 
-The `Process` method is also available as a filter, which is more effective if you need to apply multiple filters to an image. See [`images.Process`].
+The `Process` method is also available as a filter. This is more effective if you need to apply multiple filters to an image. See [`images.Process`][].
 
 {{% include "/_common/methods/resource/processing-spec.md" %}}
 
@@ -56,5 +63,8 @@ The `Process` method is also available as a filter, which is more effective if y
   example=true
 >}}
 
+[`Crop`]: /methods/resource/crop/
+[`Resize`]: /methods/resource/resize/
 [`images.Process`]: /functions/images/process/
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
 [processing specification]: #processing-specification
index c26017abfd339ec4e95a670c208376154e27b640..f1e08dbaf280bf9a47cbb58fd805ec009e0862c9 100644 (file)
@@ -11,17 +11,26 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-Resize an image according to the given [processing specification][]. You may specify only the width (such as `300x`) or only the height (`such as x150`) for proportional scaling. If you specify both width and height (such as `300x150`), the resulting image will be scaled to those exact dimensions; if the aspect ratio differs from the original, the image will be non-proportionally scaled (stretched or squashed). The operation uses the [resampling filter](#resampling-filter) provided, if any.
+The `Resize` method returns a new resource from a [processable image](g) according to the given [processing specification][].
+
+> [!note]
+> Use the [`reflect.IsImageResourceProcessable`][] function to verify that an image can be processed.
+
+## Usage
+
+Resize an image according to the given processing specification. You may specify only the width (such as `300x`) or only the height (such as `x150`) for proportional scaling.
+
+If you specify both width and height (such as `300x150`), the resulting image will be scaled to those exact dimensions. If the target aspect ratio differs from the original, the image will be non-proportionally scaled (stretched or squashed).
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
-  {{ with .Resize "300x lanczos" }}
+  {{ with .Resize "300x" }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
   {{ end }}
 {{ end }}
 ```
 
-In the example above, `"300x lanczos"` is the _processing specification_.
+In the example above, `"300x"` is the processing specification.
 
 {{% include "/_common/methods/resource/processing-spec.md" %}}
 
@@ -29,7 +38,7 @@ In the example above, `"300x lanczos"` is the _processing specification_.
 
 ```go-html-template
 {{ with resources.Get "images/original.jpg" }}
-  {{ with .Resize "300x lanczos" }}
+  {{ with .Resize "300x" }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
   {{ end }}
 {{ end }}
@@ -39,8 +48,9 @@ In the example above, `"300x lanczos"` is the _processing specification_.
   src="images/examples/zion-national-park.jpg"
   alt="Zion National Park"
   filter="Process"
-  filterArgs="resize 300x lanczos"
+  filterArgs="resize 300x"
   example=true
 >}}
 
+[`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
 [processing specification]: #processing-specification
index e1b43f44c6ba637766b7dab0e7bf4da84b18c5e7..74eb373c450edd0021284d600b2455e2af4fa92f 100644 (file)
@@ -11,16 +11,16 @@ params:
 
 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
 
-```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  {{ .Width }} → 600
-{{ end }}
-```
-
-Use the `Width` and `Height` methods together when rendering an `img` element:
+Use the [`reflect.IsImageResourceWithMeta`][] function to verify that Hugo can determine the dimensions before calling the `Width` method.
 
 ```go-html-template
-{{ with resources.Get "images/a.jpg" }}
-  <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+{{ with resources.GetMatch "images/featured.*" }}
+  {{ if reflect.IsImageResourceWithMeta . }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ else }}
+    <img src="{{ .RelPermalink }}" alt="">
+  {{ end }}
 {{ end }}
 ```
+
+[`reflect.IsImageResourceWithMeta`]: /functions/reflect/isimageresourcewithmeta/
index aec40d55815e0dbfdc9460dd50f12f7ae5c1b73e..84e5648e9a7b2a72cb568f71a7f180e2da05e60c 100644 (file)
@@ -13,15 +13,3 @@ expiryDate: '2028-02-18' # deprecated 2026-02-18 in v0.156.0
 {{< deprecated-in 0.156.0 >}}
 See [details](https://discourse.gohugo.io/t/56732).
 {{< /deprecated-in >}}
-
-This method returns all page [kinds](g) in all languages, in the [default sort order](g). That includes the home page, section pages, taxonomy pages, term pages, and regular pages.
-
-In most cases you should use the [`RegularPages`] method instead.
-
-[`RegularPages`]: /methods/site/regularpages/
-
-```go-html-template
-{{ range .Site.AllPages }}
-  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
-{{ end }}
-```
index 7b5019ffe187f22ebd308163d895b95b4eae66eb..0a94adfd7f122ffa6c3e5625f2029b4caf56fae0 100644 (file)
@@ -13,21 +13,3 @@ expiryDate: '2028-02-18' # deprecated 2026-02-18 in v0.156.0
 {{< deprecated-in 0.156.0 >}}
 See [details](https://discourse.gohugo.io/t/56732).
 {{< /deprecated-in >}}
-
-By default, draft pages are not published when building a site. You can change this behavior with a command line flag:
-
-```sh
-hugo build --buildDrafts
-```
-
-Or by setting `buildDrafts` to `true` in your project configuration:
-
-{{< code-toggle file=hugo >}}
-buildDrafts = true
-{{< /code-toggle >}}
-
-Use the `BuildDrafts` method on a `Site` object to determine the current configuration:
-
-```go-html-template
-{{ .Site.BuildDrafts }} → true
-```
index e54bad0f16308d82d19548132094f25334296dd7..0790c4f86c1e31edc9755ad8d23f9ee1c0070b60 100644 (file)
@@ -13,96 +13,3 @@ expiryDate: '2028-02-18' # deprecated 2026-02-18 in v0.156.0
 {{< deprecated-in 0.156.0 >}}
 Use [`hugo.Data`](/functions/hugo/data/) instead.
 {{< /deprecated-in >}}
-
-Use the `Data` method on a `Site` object to access data within the `data` directory, or within any directory [mounted] to the `data` directory. Supported data formats include JSON, TOML, YAML, and XML.
-
-> [!note]
-> Although Hugo can unmarshal CSV files with the [`transform.Unmarshal`] function, do not place CSV files in the `data` directory. You cannot access data within CSV files using this method.
-
-Consider this `data` directory:
-
-```text
-data/
-├── books/
-│   ├── fiction.yaml
-│   └── nonfiction.yaml
-├── films.json
-├── paintings.xml
-└── sculptures.toml
-```
-
-And these data files:
-
-```yaml {file="data/books/fiction.yaml"}
-- title: The Hunchback of Notre Dame
-  author: Victor Hugo
-  isbn: 978-0140443530
-- title: Les Misérables
-  author: Victor Hugo
-  isbn: 978-0451419439
-```
-
-```yaml {file="data/books/nonfiction.yaml"}
-- title: The Ancien Régime and the Revolution
-  author: Alexis de Tocqueville
-  isbn: 978-0141441641
-- title: Interpreting the French Revolution
-  author: François Furet
-  isbn: 978-0521280495
-```
-
-Access the data by [chaining](g) the [identifiers](g):
-
-```go-html-template
-{{ range $category, $books := .Site.Data.books }}
-  <p>{{ $category | title }}</p>
-  <ul>
-    {{ range $books }}
-      <li>{{ .title }} ({{ .isbn }})</li>
-    {{ end }}
-  </ul>
-{{ end }}
-```
-
-Hugo renders this to:
-
-```html
-<p>Fiction</p>
-<ul>
-  <li>The Hunchback of Notre Dame (978-0140443530)</li>
-  <li>Les Misérables (978-0451419439)</li>
-</ul>
-<p>Nonfiction</p>
-<ul>
-  <li>The Ancien Régime and the Revolution (978-0141441641)</li>
-  <li>Interpreting the French Revolution (978-0521280495)</li>
-</ul>
-```
-
-To limit the listing to fiction, and sort by title:
-
-```go-html-template
-<ul>
-  {{ range sort .Site.Data.books.fiction "title" }}
-    <li>{{ .title }} ({{ .author }})</li>
-  {{ end }}
-</ul>
-```
-
-To find a fiction book by ISBN:
-
-```go-html-template
-{{ range where .Site.Data.books.fiction "isbn" "978-0140443530" }}
-  <li>{{ .title }} ({{ .author }})</li>
-{{ end }}
-```
-
-In the template examples above, each of the keys is a valid identifier. For example, none of the keys contains a hyphen. To access a key that is not a valid identifier, use the [`index`] function. For example:
-
-```go-html-template
-{{ index .Site.Data.books "historical-fiction" }}
-```
-
-[`index`]: /functions/collections/indexfunction/
-[`transform.Unmarshal`]: /functions/transform/unmarshal/
-[mounted]: /configuration/module/#mounts
index f21061a35967f848ef4a056714f4570ef74ab2fd..fab6e04652efbbeefaff04a8b9e3abbcf3596686 100644 (file)
@@ -71,7 +71,7 @@ With multilingual projects, the `GetPage` method on a `Site` object resolves the
 To get a page from a different language, query the `Sites` object:
 
 ```go-html-template
-{{ with where hugo.Sites "Language.Lang" "eq" "de" }}
+{{ with where hugo.Sites "Language.Name" "eq" "de" }}
   {{ with index . 0 }}
     {{ with .GetPage "/works/paintings/starry-night" }}
       {{ .Title }} → Sternenklare Nacht
index 251a3bbe4ed6cbf9393a5b8a15726d8622e9932e..543bc4f5249782621fec52a7eb7396ffd2452d07 100644 (file)
@@ -18,17 +18,17 @@ For example, the following configuration defines a matrix of sites across langua
 {{< code-toggle file=hugo >}}
 [languages.de]
 contentDir = 'content/de'
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
+direction = 'ltr'
+label = 'Deutsch'
+locale = 'de-DE'
 title = 'Projekt Dokumentation'
 weight = 1
 
 [languages.en]
 contentDir = 'content/en'
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
+direction = 'ltr'
+label = 'English'
+locale = 'en-US'
 title = 'Project Documentation'
 weight = 2
 
index 8e8cb7372343e54fab2753792cee7b3988228b05..6f2f013e7f1988a3bbea2d96aaa0dfa52ca11273 100644 (file)
@@ -15,16 +15,26 @@ You can also use the `Language` method on a `Page` object. See&nbsp;[details][].
 
 ## Methods
 
-The examples below assume the following in your project configuration:
+The examples below assume the following language definition.
 
 {{< code-toggle file=hugo >}}
 [languages.de]
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
-weight = 1
+direction = 'ltr'
+label = 'Deutsch'
+locale = 'de-DE'
+weight = 2
 {{< /code-toggle >}}
 
+### Direction
+
+{{< new-in 0.158.0 />}}
+
+(`string`) Returns the [`direction`][] from the language definition.
+
+```go-html-template
+{{ .Site.Language.Direction }} → ltr
+```
+
 ### IsDefault
 
 {{< new-in 0.153.0 />}}
@@ -35,43 +45,55 @@ weight = 1
 {{ .Site.Language.IsDefault }} → true
 ```
 
-### Lang
+### Label
 
-(`string`) Returns the language tag as defined by [RFC 5646][]. This is the lowercased key from your project configuration.
+{{< new-in 0.158.0 />}}
+
+(`string`) Returns the [`label`][] from the language definition.
 
 ```go-html-template
-{{ .Site.Language.Lang }} → de
+{{ .Site.Language.Label }} → Deutsch
 ```
 
+### Lang
+
+{{<deprecated-in 0.158.0 />}}
+
+Use [`Name`](#name) instead.
+
 ### LanguageCode
 
-(`string`) Returns the [`languageCode`][] from your project configuration. Falls back to `Lang` if not defined.
+{{<deprecated-in 0.158.0 />}}
 
-```go-html-template
-{{ .Site.Language.LanguageCode }} → de-DE
-```
+Use [`Locale`](#locale) instead.
 
 ### LanguageDirection
 
-(`string`) Returns the [`languageDirection`][] from your project configuration.
+{{<deprecated-in 0.158.0 />}}
 
-```go-html-template
-{{ .Site.Language.LanguageDirection }} → ltr
-```
+Use [`Direction`](#direction) instead.
 
 ### LanguageName
 
-(`string`) Returns the [`languageName`][] from your project configuration.
+{{<deprecated-in 0.158.0 />}}
+
+Use [`Label`](#label) instead.
+
+### Locale
+
+{{< new-in 0.158.0 />}}
+
+(`string`) Returns the [`locale`][] from the language definition, falling back to [`Name`](#name).
 
 ```go-html-template
-{{ .Site.Language.LanguageName }} → Deutsch
+{{ .Site.Language.Locale }} → de-DE
 ```
 
 ### Name
 
 {{< new-in 0.153.0 />}}
 
-(`string`) Returns the language tag as defined by [RFC 5646][]. This is the lowercased key from your project configuration. This is an alias for `Lang`.
+(`string`) Returns the language tag as defined by [RFC 5646][]. This is the lowercased key from the language definition.
 
 ```go-html-template
 {{ .Site.Language.Name }} → de
@@ -79,11 +101,7 @@ weight = 1
 
 ### Weight
 
-(`int`) Returns the language [`weight`][] from your project configuration.
-
-```go-html-template
-{{ .Site.Language.Weight }} → 1
-```
+{{<deprecated-in 0.158.0 />}}
 
 ## Example
 
@@ -91,15 +109,14 @@ Some of the methods above are commonly used in a base template as attributes for
 
 ```go-html-template
 <html
-  lang="{{ .Site.Language.LanguageCode }}" 
-  dir="{{ or .Site.Language.LanguageDirection `ltr` }}"
+  lang="{{ .Site.Language.Locale }}" 
+  dir="{{ or .Site.Language.Direction `ltr` }}"
 >
 ```
 
-[`languageCode`]: /configuration/languages/#languagecode
-[`languageDirection`]: /configuration/languages/#languagedirection
-[`languageName`]: /configuration/languages/#languagename
-[`weight`]: /configuration/languages/#weight
+[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646
+[`direction`]: /configuration/languages/#direction
+[`label`]: /configuration/languages/#label
+[`locale`]: /configuration/languages/#locale
 [default language]: /quick-reference/glossary/#default-language
 [details]: /methods/page/language/
-[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646
index 7b92c59505d81691f940ab75f1c4ddca18da6f89..59e7d3aeb84ccc8fb02ceae84b19b64ced922ab3 100644 (file)
@@ -16,16 +16,16 @@ defaultContentLanguage = 'de'
 defaultContentLanguageInSubdir = false
 
 [languages.de]
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
+direction = 'ltr'
+label = 'Deutsch'
+locale = 'de-DE'
 title = 'Projekt Dokumentation'
 weight = 1
 
 [languages.en]
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
+direction = 'ltr'
+label = 'English'
+locale = 'en-US'
 title = 'Project Documentation'
 weight = 2
 {{< /code-toggle >}}
@@ -48,4 +48,4 @@ If you change `defaultContentLanguageInSubdir` to `true`, when visiting the Germ
 {{ .Site.LanguagePrefix }} → /de
 ```
 
-You may use the `LanguagePrefix` method with both monolingual and multilingual sites.
+You may use the `LanguagePrefix` method with both monolingual and multilingual projects.
index 69277f32935382d42909e83a2eef1d72ebadc323..fa51f1e51476d301342676b207ff50d18e1b91ae 100644 (file)
@@ -13,51 +13,3 @@ expiryDate: '2028-02-18' # deprecated 2026-02-18 in v0.156.0
 {{< deprecated-in 0.156.0 >}}
 See [details](https://discourse.gohugo.io/t/56732).
 {{< /deprecated-in >}}
-
-The `Languages` method on a `Site` object returns a collection of language objects for all sites, ordered by language weight. Each language object points to its language definition in your project configuration.
-
-To inspect the data structure:
-
-```go-html-template
-<pre>{{ debug.Dump .Site.Languages }}</pre>
-```
-
-With this project configuration:
-
-{{< code-toggle file=hugo >}}
-defaultContentLanguage = 'de'
-defaultContentLanguageInSubdir = false
-
-[languages.de]
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
-title = 'Projekt Dokumentation'
-weight = 1
-
-[languages.en]
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
-title = 'Project Documentation'
-weight = 2
-{{< /code-toggle >}}
-
-This template:
-
-```go-html-template
-<ul>
-  {{ range .Site.Languages }}
-    <li>{{ .Title }} ({{ .LanguageName }})</li>
-  {{ end }}
-</ul>
-```
-
-Is rendered to:
-
-```html
-<ul>
-  <li>Projekt Dokumentation (Deutsch)</li>
-  <li>Project Documentation (English)</li>
-</ul>
-```
index 7a06e232fc31c89f5bd2dd308f8ba1533a95abba..ef7ff8bbddec14d823f9ddde32f312ba97cc2902 100644 (file)
@@ -11,76 +11,5 @@ expiryDate: '2028-02-18' # deprecated 2026-02-18 in v0.156.0
 ---
 
 {{< deprecated-in 0.156.0 >}}
-Use [`hugo.Sites`] instead.
-
-[`hugo.Sites`]: /functions/hugo/sites/
+Use [`hugo.Sites`](/functions/hugo/sites/) instead.
 {{< /deprecated-in >}}
-
-{{% include "/_common/functions/hugo/sites-collection.md" %}}
-
-With this project configuration:
-
-{{< code-toggle file=hugo >}}
-defaultContentLanguage = 'de'
-defaultContentLanguageInSubdir = true
-defaultContentVersionInSubdir = true
-
-[languages.de]
-contentDir = 'content/de'
-languageCode = 'de-DE'
-languageDirection = 'ltr'
-languageName = 'Deutsch'
-title = 'Projekt Dokumentation'
-weight = 1
-
-[languages.en]
-contentDir = 'content/en'
-languageCode = 'en-US'
-languageDirection = 'ltr'
-languageName = 'English'
-title = 'Project Documentation'
-weight = 2
-
-[versions.'v1.0.0']
-[versions.'v2.0.0']
-[versions.'v3.0.0']
-{{< /code-toggle >}}
-
-This template:
-
-```go-html-template
-<ul>
-  {{ range .Site.Sites }}
-    <li><a href="{{ .Home.RelPermalink }}">{{ .Title }} {{ .Version.Name }}</a></li>
-  {{ end }}
-</ul>
-```
-
-Produces a list of links to each home page:
-
-```html
-<ul>
-  <li><a href="/v3.0.0/de/">Projekt Dokumentation v3.0.0</a></li>
-  <li><a href="/v2.0.0/de/">Projekt Dokumentation v2.0.0</a></li>
-  <li><a href="/v1.0.0/de/">Projekt Dokumentation v1.0.0</a></li>
-  <li><a href="/v3.0.0/en/">Project Documentation v3.0.0</a></li>
-  <li><a href="/v2.0.0/en/">Project Documentation v2.0.0</a></li>
-  <li><a href="/v1.0.0/en/">Project Documentation v1.0.0</a></li>
-</ul>
-```
-
-To render a link to the home page of the [default site](g):
-
-```go-html-template
-{{ with .Site.Sites.Default }}
-  <a href="{{ .Home.RelPermalink }}">{{ .Title }}</a>
-{{ end }}
-```
-
-This is equivalent to:
-
-```go-html-template
-{{ with index .Site.Sites 0 }}
-  <a href="{{ .Home.RelPermalink }}">{{ .Title }}</a>
-{{ end }}
-```
diff --git a/content/en/quick-reference/glossary/interleave.md b/content/en/quick-reference/glossary/interleave.md
new file mode 100644 (file)
index 0000000..077ff7e
--- /dev/null
@@ -0,0 +1,5 @@
+---
+title: interleave
+---
+
+To _interleave_ (verb) is to insert a string at the beginning, the end, and between every character of another string.
index 12a4a64146ff8616760bc30083039d51c19e9307..1608e750408532e588b5949b0d2caeb48f36aed0 100644 (file)
@@ -4,4 +4,4 @@ params:
   reference: /configuration/module
 ---
 
-A _mount_ is a configuration object that maps a file system path (source) to a [_component_](g) path (target) within Hugo's [_unified file system_](g).
+A _mount_ is a configuration object that maps a file path (source) to a [_component_](g) path (target) within Hugo's [_unified file system_](g).
index 4359e4f7fadb21a117fe58081cc9eabd9659f128..eed69f105f2b95f89f2641ecb1226470eaa64d95 100644 (file)
@@ -4,12 +4,16 @@ title: processable image
 
 A _processable image_ is an image file characterized by one of the following [_media types_](g):
 
+  - `image/bmp`
   - `image/gif`
   - `image/jpeg`
   - `image/png`
   - `image/tiff`
   - `image/webp`
 
-  Hugo can decode and encode these image formats, allowing you to use any of the [resource methods][] applicable to images such as `Width`, `Height`, `Crop`, `Fill`, `Fit`, `Resize`, etc.
+  Hugo can decode and encode these image formats, allowing you to use any of the [resource methods][] applicable to images such as `Width`, `Height`, `Crop`, `Fill`, `Fit`, `Filter`, `Process`, `Resize`, etc.
 
+  Use the [`reflect.IsImageResourceProcessable`][] function to determine if an image can be processed.
+
+  [`reflect.IsImageResourceProcessable`]: /functions/reflect/isimageresourceprocessable/
   [resource methods]: /methods/resource
index 612b16651882d847d5521af086efeba98df7d902..21c62556b72f761cf50b30bfa75938caaa374711 100644 (file)
@@ -1,5 +1,7 @@
 ---
 title: segment
+params:
+  reference: /configuration/segments/
 ---
 
 A _segment_ is a subset of a site, filtered by [_logical path_](g), [_sites matrix_](g), [_page kind_](g), or [_output format_](g).
index 4d3d779dea0eef3ee0dfddac784007635a0de4f5..4e5f430d6f4faa4a3c8b67a9efd1a65e473ff889 100644 (file)
@@ -2,4 +2,4 @@
 title: unified file system
 ---
 
-Hugo's _unified file system_ provides a layered view for each of its seven [_component_](g) types: [_archetypes_](g), assets, content, data, templates, [_translation tables_](g), and static files. Project component directories are layered over [_module_](g) component directories. Hugo searches these layers in order to locate files.
+Hugo's _unified file system_ provides a layered view for each of its seven [_component_](g) types: [_archetypes_](g), assets, content, data, templates, [_translation tables_](g), and static files. Project component directories are layered over [_module_](g) component directories. When multiple layers contain the same file, Hugo uses the version from the highest layer.
index 4c2387bbef72fe05094f8ec7834011b39f3e8934..14bededbcac03f7f561b0e9d23433d986ae2ade4 100644 (file)
@@ -9,17 +9,17 @@ keywords: []
 
 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 titlePrefix=PAGE. %}}
+{{% render-list-of-pages-in-section path=/methods/page filter=methods_page_page_collections filterType=include titlePrefix=PAGE. %}}
 
 ## Site
 
 Use these `Site` methods when rendering lists on any page.
 
-{{% list-pages-in-section path=/methods/site filter=methods_site_page_collections filterType=include titlePrefix=SITE. %}}
+{{% render-list-of-pages-in-section path=/methods/site filter=methods_site_page_collections filterType=include titlePrefix=SITE. %}}
 
 ## Filter
 
-Use the [`where`] function to filter page collections.
+Use the [`where`][] function to filter page collections.
 
 ## Sort
 
@@ -27,12 +27,12 @@ Use the [`where`] function to filter page collections.
 
 Use these methods to sort page collections by different criteria.
 
-{{% list-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. titlePrefix=PAGES. %}}
+{{% render-list-of-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. titlePrefix=PAGES. %}}
 
 ## Group
 
 Use these methods to group page collections.
 
-{{% list-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. titlePrefix=PAGES. %}}
+{{% render-list-of-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. titlePrefix=PAGES. %}}
 
 [`where`]: /functions/collections/where/
index c89ce174607d052e407929a34608f0e6ebebcb87..91fe40f305af111bbb313e09307e331f51941bf5 100755 (executable)
@@ -105,7 +105,7 @@ Hugo includes an [embedded image render hook] to resolve Markdown image destinat
 useEmbedded = 'auto'
 {{< /code-toggle >}}
 
-When set to `auto` as shown above, Hugo automatically uses the embedded image render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom image render hooks are defined by your project, modules, or themes, these will be used instead.
+When set to `auto` as shown above, Hugo automatically uses the embedded image render hook for multilingual single-host projects, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such projects. If custom image render hooks are defined by your project, modules, or themes, these will be used instead.
 
 You can also configure Hugo to `always` use the embedded image render hook, use it only as a `fallback`, or `never` use it. See&nbsp;[details](/configuration/markup/#renderhooksimageuseembedded).
 
index ee765c14bb9a9134fc91cc719ed9d31d1faea23c..7cd65bdfa969735032a15df882ff4c4fbdeceb6a 100755 (executable)
@@ -78,7 +78,7 @@ Hugo includes an [embedded link render hook] to resolve Markdown link destinatio
 useEmbedded = 'auto'
 {{< /code-toggle >}}
 
-When set to `auto` as shown above, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link render hooks are defined by your project, modules, or themes, these will be used instead.
+When set to `auto` as shown above, Hugo automatically uses the embedded link render hook for multilingual single-host projects, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such projects. If custom link render hooks are defined by your project, modules, or themes, these will be used instead.
 
 You can also configure Hugo to `always` use the embedded link render hook, use it only as a `fallback`, or `never` use it. See&nbsp;[details](/configuration/markup/#renderhookslinkuseembedded).
 
index 19c0ae711e2eb5dbbf0a662f1dfd5701162285e9..29c4b0bbee0c75a34f63786a5dcbb0d0f137759d 100755 (executable)
@@ -12,7 +12,7 @@ keywords: []
 > [!note]
 > When working with Markdown this shortcode is obsolete. Instead, to properly resolve Markdown link destinations, use the [embedded link render hook] or create your own.
 >
-> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link render hooks are defined by your project, modules, or themes, these will be used instead.
+> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host projects, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such projects. If custom link render hooks are defined by your project, modules, or themes, these will be used instead.
 >
 > You can also configure Hugo to `always` use the embedded link render hook, use it only as a `fallback`, or `never` use it. See&nbsp;[details](/configuration/markup/#renderhookslinkuseembedded).
 
index 3f85b8419dd23b3f0a8e7a7bc13a76f21006cfe0..1045ee91be13581092daecde678310bce1d67887 100755 (executable)
@@ -12,7 +12,7 @@ keywords: []
 > [!note]
 > When working with Markdown this shortcode is obsolete. Instead, to properly resolve Markdown link destinations, use the [embedded link render hook] or create your own.
 >
-> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link render hooks are defined by your project, modules, or themes, these will be used instead.
+> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host projects, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such projects. If custom link render hooks are defined by your project, modules, or themes, these will be used instead.
 >
 > You can also configure Hugo to `always` use the embedded link render hook, use it only as a `fallback`, or `never` use it. See&nbsp;[details](/configuration/markup/#renderhookslinkuseembedded).
 
index d7ca7ee6cc754fe9ab43da19e9eaf905aff41822..7bca4b86e78483c22c16618158ddad733bb530c8 100755 (executable)
@@ -14,18 +14,18 @@ keywords: []
 To display a Vimeo video with this URL:
 
 ```text
-https://vimeo.com/channels/staffpicks/55073825
+https://vimeo.com/19899678
 ```
 
 Include this in your Markdown:
 
 ```text
-{{</* vimeo 55073825 */>}}
+{{</* vimeo 19899678 */>}}
 ```
 
 Hugo renders this to:
 
-{{< vimeo 55073825 >}}
+{{< vimeo 19899678 >}}
 
 ## Arguments
 
@@ -49,7 +49,7 @@ title
 Here's an example using some of the available arguments:
 
 ```text
-{{</* vimeo id=55073825 allowFullScreen=false loading=lazy */>}}
+{{</* vimeo id=19899678 allowFullScreen=false loading=lazy */>}}
 ```
 
 ## Privacy
index 9704d40cd0aa8d13b621bab8474c638cf55e1669..c37322de768fde0b50ee84862baf14745c42926d 100644 (file)
@@ -21,7 +21,7 @@ To render a 404 error page in the root of your site, create a 404 template in th
 {{ end }}
 ```
 
-For multilingual sites, add the language key to the file name:
+For multilingual projects, add the language key to the file name:
 
 ```text
 layouts/
index d8de3061a9302b1b17f222612cbc0069233b6da5..755a23259cb66eebdb083e1f7287a38369e4a30d 100644 (file)
@@ -75,7 +75,7 @@ Provide your tracking ID in your configuration file:
 
 {{< code-toggle file=hugo >}}
 [services.googleAnalytics]
-id = "G-MEASUREMENT_ID"
+id = 'G-MEASUREMENT_ID'
 {{</ code-toggle >}}
 
 To use this value in your own template, access the configured ID with `{{ site.Config.Services.GoogleAnalytics.ID }}`.
@@ -124,8 +124,8 @@ Hugo's Open Graph template is configured using a mix of configuration settings a
 {{</ code-toggle >}}
 
 {{< code-toggle file=content/blog/my-post.md fm=true >}}
-title = "Post title"
-description = "Text about this post"
+title = 'Post title'
+description = 'Text about this post'
 date = 2024-03-08T08:18:11-08:00
 images = ["post-cover.png"]
 audio = []
@@ -186,12 +186,12 @@ Hugo's X (Twitter) Card template is configured using a mix of configuration sett
 {{< code-toggle file=hugo >}}
 [params]
   images = ["site-feature-image.jpg"]
-  description = "Text about my cool site"
+  description = 'Text about my cool site'
 {{</ code-toggle >}}
 
 {{< code-toggle file=content/blog/my-post.md fm=true >}}
-title = "Post title"
-description = "Text about this post"
+title = 'Post title'
+description = 'Text about this post'
 images = ["post-cover.png"]
 {{</ code-toggle >}}
 
@@ -203,7 +203,7 @@ Set the value of `twitter:site` in your project configuration:
 
 {{< code-toggle file=hugo >}}
 [params.social]
-twitter = "GoHugoIO"
+twitter = 'GoHugoIO'
 {{</ code-toggle >}}
 
 NOTE: The `@` will be added for you
index fcc7d445ed59d9a44801e65e0f13bcdbed921101..505724b9d54a7f7880a6a998099004a479eae7bd 100644 (file)
@@ -11,14 +11,14 @@ weight: 10
 
 {{% glossary-term template %}}
 
-Templates use [variables], [functions], and [methods] to transform your content, resources, and data into a published page.
+Templates use [variables][], [functions][], and [methods][] to transform your content, resources, and data into a published page.
 
 > [!note]
-> Hugo uses Go's [text/template] and [html/template] packages.
+> Hugo uses Go's [`text/template`][] and [`html/template`][] packages.
 >
-> The text/template package implements data-driven templates for generating textual output, while the html/template package implements data-driven templates for generating HTML output safe against code injection.
+> The `text/template` package implements data-driven templates for generating textual output, while the `html/template` package implements data-driven templates for generating HTML output safe against code injection.
 >
-> By default, Hugo uses the html/template package when rendering HTML files.
+> By default, Hugo uses the `html/template` package when rendering HTML files.
 
 For example, this HTML template initializes the `$v1` and `$v2` variables, then displays them and their product within an HTML paragraph.
 
@@ -44,9 +44,9 @@ Within a template, the dot (`.`) represents the current context.
 <h2>{{ .Title }}</h2>
 ```
 
-In the example above the dot represents the `Page` object, and we call its [`Title`] method to return the title as defined in [front matter].
+In the example above the dot represents the `Page` object, and we call its [`Title`][] method to return the title as defined in [front matter][].
 
-The current context may change within a template. For example, at the top of a template the context might be a `Page` object, but we rebind the context to another value or object within [`range`] or [`with`] blocks.
+The current context may change within a template. For example, at the top of a template the context might be a `Page` object, but we rebind the context to another value or object within [`range`][] or [`with`][] blocks.
 
 ```go-html-template {file="layouts/page.html"}
 <h2>{{ .Title }}</h2>
@@ -251,7 +251,7 @@ Use `:=` to initialize a variable, and use `=` to assign a value to a variable t
 
 Variables initialized inside of an `if`, `range`, or `with` block are scoped to the block. Variables initialized outside of these blocks are scoped to the template.
 
-With variables that represent a slice or map, use the [`index`] function to return the desired value.
+With variables that represent a slice or map, use the [`index`][] function to return the desired value.
 
 ```go-html-template
 {{ $slice := slice "foo" "bar" "baz" }}
@@ -281,9 +281,9 @@ With variables that represent a map or object, [chain](g) identifiers to return
 
 Used within a template action, a function takes one or more arguments and returns a value. Unlike methods, functions are not associated with an object.
 
-Go's text/template and html/template packages provide a small set of functions, operators, and statements for general use. See the [go-templates] section of the function documentation for details.
+Go's `text/template` and `html/template` packages provide a small set of functions, operators, and statements for general use. See the [go-templates][] section of the function documentation for details.
 
-Hugo provides hundreds of custom [functions] categorized by namespace. For example, the `strings` namespace includes these and other functions:
+Hugo provides hundreds of custom [functions][] categorized by namespace. For example, the `strings` namespace includes these and other functions:
 
 Function|Alias
 :--|:--
@@ -303,7 +303,7 @@ When calling a function, separate the arguments from the function, and from each
 
 Used within a template action and associated with an object, a method takes zero or more arguments and either returns a value or performs an action.
 
-The most commonly accessed objects are the [`Page`] and [`Site`] objects. This is a small sampling of the [methods] available to each object.
+The most commonly accessed objects are the [`Page`][] and [`Site`][] objects. This is a small sampling of the [methods][] available to each object.
 
 Object|Method|Description
 :--|:--|:--
@@ -314,7 +314,7 @@ Object|Method|Description
 `Site`|[`Params`](methods/site/params/)|Returns a map of custom parameters as defined in your project configuration.
 `Site`|[`Title`](methods/site/title/)|Returns the title as defined in the your project configuration.
 
-Chain the method to its object with a dot (`.`) as shown below, remembering that the leading dot represents the [current context].
+Chain the method to its object with a dot (`.`) as shown below, remembering that the leading dot represents the [current context][].
 
 ```go-html-template {file="layouts/page.html"}
 {{ .Site.Title }} → My Site Title
@@ -364,7 +364,7 @@ adjacent whitespace removed.
 
 You may not nest one comment inside of another.
 
-To render an HTML comment, pass a string through the [`safeHTML`] template function. For example:
+To render an HTML comment, pass a string through the [`safeHTML`][] template function. For example:
 
 ```go-html-template
 {{ "<!-- I am an HTML comment. -->" | safeHTML }}
@@ -373,7 +373,7 @@ To render an HTML comment, pass a string through the [`safeHTML`] template funct
 
 ## Include
 
-Use the [`template`] function to include one or more of Hugo's [embedded templates]:
+Use the [`template`][] function to include one or more of Hugo's [embedded templates]:
 
 ```go-html-template
 {{ partial "google_analytics.html" . }}
@@ -383,7 +383,7 @@ Use the [`template`] function to include one or more of Hugo's [embedded templat
 {{ partial "twitter_cards.html" . }}
 ```
 
-Use the [`partial`] or [`partialCached`] function to include one or more [partial templates]:
+Use the [`partial`][] or [`partialCached`][] function to include one or more [partial templates][]:
 
 ```go-html-template
 {{ partial "breadcrumbs.html" . }}
@@ -397,11 +397,11 @@ Create your _partial_ templates in the `layouts/_partials` directory.
 
 ## Examples
 
-This limited set of contrived examples demonstrates some of concepts described above. Please see the [functions], [methods], and [templates] documentation for specific examples.
+This limited set of contrived examples demonstrates some of concepts described above. Please see the [functions][], [methods][], and [templates][] documentation for specific examples.
 
 ### Conditional blocks
 
-See documentation for [`if`], [`else`], and [`end`].
+See documentation for [`if`][], [`else`][], and [`end`][].
 
 ```go-html-template
 {{ $var := 42 }}
@@ -418,7 +418,7 @@ See documentation for [`if`], [`else`], and [`end`].
 
 ### Logical operators
 
-See documentation for [`and`] and [`or`].
+See documentation for [`and`][] and [`or`][].
 
 ```go-html-template
 {{ $v1 := true }}
@@ -439,7 +439,7 @@ See documentation for [`and`] and [`or`].
 
 ### Loops
 
-See documentation for [`range`], [`else`], and [`end`].
+See documentation for [`range`][], [`else`][], and [`end`][].
 
 ```go-html-template
 {{ $s := slice "foo" "bar" "baz" }}
@@ -462,7 +462,7 @@ To loop a specified number of times:
 
 ### Rebind context
 
-See documentation for [`with`], [`else`], and [`end`].
+See documentation for [`with`][], [`else`][], and [`end`][].
 
 ```go-html-template
 {{ $var := "foo" }}
@@ -534,7 +534,7 @@ key-with-hyphens = 'must use index function'
   name = 'John Smith'
 {{< /code-toggle >}}
 
-The `title` and `date` fields are standard [front matter fields], while the other fields are user-defined.
+The `title` and `date` fields are standard [front matter fields][], while the other fields are user-defined.
 
 Access the custom fields by [chaining](g) the [identifiers](g) when needed:
 
@@ -544,7 +544,7 @@ Access the custom fields by [chaining](g) the [identifiers](g) when needed:
 {{ .Params.author.name }} → John Smith
 ```
 
-In the template example above, each of the keys is a valid identifier. For example, none of the keys contains a hyphen. To access a key that is not a valid identifier, use the [`index`] function:
+In the template example above, each of the keys is a valid identifier. For example, none of the keys contains a hyphen. To access a key that is not a valid identifier, use the [`index`][] function:
 
 ```go-html-template
 {{ index .Params "key-with-hyphens" }} → must use index function
@@ -571,9 +571,9 @@ In the template example above, each of the keys is a valid identifier. For examp
 [front matter]: /content-management/front-matter/
 [functions]: /functions/
 [go-templates]: /functions/go-template/
-[html/template]: https://pkg.go.dev/html/template
+[`html/template`]: https://pkg.go.dev/html/template
 [methods]: /methods/
 [partial templates]: /templates/types/#partial
 [templates]: /templates/
-[text/template]: https://pkg.go.dev/text/template
+[`text/template`]: https://pkg.go.dev/text/template
 [variables]: #variables
index 3891da57475d257ed93e727dd62956d29bdc6bdc..363b18af53a1f28b735a10c4fda171418d743aac 100644 (file)
@@ -40,8 +40,8 @@ See [configure pagination](/configuration/pagination).
 
 To paginate a `home`, `section`, `taxonomy`, or `term` page, invoke either of these methods on the `Page` object in the corresponding template:
 
-- [`Paginate`]
-- [`Paginator`]
+- [`Paginate`][]
+- [`Paginator`][]
 
 The `Paginate` method is more flexible, allowing you to:
 
@@ -101,7 +101,7 @@ When paginating conditionally, do not use the `compare.Conditional` function due
 
 ## Grouping
 
-Use pagination with any of the [grouping methods]. For example:
+Use pagination with any of the [grouping methods][]. For example:
 
 ```go-html-template
 {{ $pages := where site.RegularPages "Type" "posts" }}
@@ -138,13 +138,13 @@ The `terse` format has fewer controls and page slots, consuming less space when
 ```
 
 > [!note]
-> To override Hugo's embedded pagination template, copy the [source code] to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`] function:
+> To override Hugo's embedded pagination template, copy the [source code][] to a file with the same name in the `layouts/_partials` directory, then call it from your templates using the [`partial`][] function:
 >
 > `{{ partial "pagination.html" . }}`
 
 Create custom navigation components using any of the `Pager` methods:
 
-{{% list-pages-in-section path=/methods/pager %}}
+{{% render-list-of-pages-in-section path=/methods/pager %}}
 
 ## Structure
 
index 34cf46f5a4c5af530176e3536a9a9e5d6c9f9904..69c2f17fc47ad6f0518b664b07551031ab91bb8a 100644 (file)
@@ -10,11 +10,11 @@ aliases: [/templates/shortcode-templates/]
 {{< newtemplatesystem >}}
 
 > [!note]
-> Before creating custom shortcodes, please review the [shortcodes] page in the [content management] section. Understanding the usage details will help you design and create better templates.
+> Before creating custom shortcodes, please review the [shortcodes][] page in the [content management][] section. Understanding the usage details will help you design and create better templates.
 
 ## Introduction
 
-Hugo provides [embedded shortcodes] for many common tasks, but you'll likely need to create your own for more specific needs. Some examples of custom shortcodes you might develop include:
+Hugo provides [embedded shortcodes][] for many common tasks, but you'll likely need to create your own for more specific needs. Some examples of custom shortcodes you might develop include:
 
 - Audio players
 - Video players
@@ -72,7 +72,7 @@ foo|rss|en|`layouts/_shortcodes/foo.xml`
 
 Use these methods in your _shortcode_ templates. Refer to each methods's documentation for details and examples.
 
-{{% list-pages-in-section path=/methods/shortcode %}}
+{{% render-list-of-pages-in-section path=/methods/shortcode %}}
 
 ## Examples
 
@@ -92,7 +92,7 @@ Then call the shortcode from within your markup:
 This is {{</* year */>}}, and look at how far we've come.
 ```
 
-This shortcode can be used inline or as a block on its own line. If a shortcode might be used inline, remove the surrounding [whitespace] by using [template action](g) delimiters with hyphens.
+This shortcode can be used inline or as a block on its own line. If a shortcode might be used inline, remove the surrounding [whitespace][] by using [template action](g) delimiters with hyphens.
 
 ### Insert image
 
@@ -124,14 +124,14 @@ Then call the shortcode from within your markup:
 
 The example above uses:
 
-- The [`with`] statement to rebind the [context](g) after each successful operation
-- The [`Get`] method to retrieve arguments by name
+- The [`with`][] statement to rebind the [context](g) after each successful operation
+- The [`Get`][] method to retrieve arguments by name
 - The `$` to access the template context
 
 > [!note]
 > Make sure that you thoroughly understand the concept of context. The most common templating errors made by new users relate to context.
 >
-> Read more about context in the [introduction to templating].
+> Read more about context in the [introduction to templating][].
 
 ### Insert image with error handling
 
@@ -158,7 +158,7 @@ The previous example, while functional, silently fails if the image is missing,
 
 This template throws an error and gracefully fails the build if the author neglected to provide a `path` or `width` argument, and it emits a warning if it cannot find the image at the specified path. If the author does not provide an `alt` argument, the `alt` attribute is set to an empty string.
 
-The [`Name`] and [`Position`] methods provide helpful context for errors and warnings. For example, a missing `width` argument causes the shortcode to throw this error:
+The [`Name`][] and [`Position`][] methods provide helpful context for errors and warnings. For example, a missing `width` argument causes the shortcode to throw this error:
 
 ```text
 ERROR The "image" shortcode requires a 'width' argument: see "/home/user/project/content/example/index.md:7:1"
@@ -166,7 +166,7 @@ ERROR The "image" shortcode requires a 'width' argument: see "/home/user/project
 
 ### Positional arguments
 
-Shortcode arguments can be [named or positional]. We used named arguments previously; let's explore positional arguments. Here's the named argument version of our example:
+Shortcode arguments can be [named or positional][]. We used named arguments previously; let's explore positional arguments. Here's the named argument version of our example:
 
 ```text {file="content/example/index.md"}
 {{</* image path=a.jpg width=300 alt="A white kitten" */>}}
@@ -191,7 +191,7 @@ Using the `Get` method with zero-indexed keys, we'll initialize variables with d
 
 ### Named and positional arguments
 
-You can create a shortcode that will accept both named and positional arguments, but not at the same time. Use the [`IsNamedParams`] method to determine whether the shortcode call used named or positional arguments:
+You can create a shortcode that will accept both named and positional arguments, but not at the same time. Use the [`IsNamedParams`][] method to determine whether the shortcode call used named or positional arguments:
 
 ```go-html-template {file="layouts/_shortcodes/image.html"}
 {{ $path := cond (.IsNamedParams) (.Get "path") (.Get 0) }}
@@ -199,11 +199,11 @@ You can create a shortcode that will accept both named and positional arguments,
 {{ $alt := cond (.IsNamedParams) (.Get "alt") (.Get 2) }}
 ```
 
-This example uses the `cond` alias for the [`compare.Conditional`] function to get the argument by name if `IsNamedParams` returns `true`, otherwise get the argument by position.
+This example uses the `cond` alias for the [`compare.Conditional`][] function to get the argument by name if `IsNamedParams` returns `true`, otherwise get the argument by position.
 
 ### Argument collection
 
-Use the [`Params`] method to access the arguments as a collection.
+Use the [`Params`][] method to access the arguments as a collection.
 
 When using named arguments, the `Params` method returns a map:
 
@@ -229,11 +229,11 @@ When using named arguments, the `Params` method returns a map:
 {{ index .Params 1 }} → A white kitten
 ```
 
-Combine the `Params` method with the [`collections.IsSet`] function to determine if a parameter is set, even if its value is falsy.
+Combine the `Params` method with the [`collections.IsSet`][] function to determine if a parameter is set, even if its value is falsy.
 
 ### Inner content
 
-Extract the content enclosed within shortcode tags using the [`Inner`] method. This example demonstrates how to pass both content and a title to a shortcode. The shortcode then generates a `div` element containing an `h2` element (displaying the title) and the provided content.
+Extract the content enclosed within shortcode tags using the [`Inner`][] method. This example demonstrates how to pass both content and a title to a shortcode. The shortcode then generates a `div` element containing an `h2` element (displaying the title) and the provided content.
 
 ```text {file="content/example.md"}
 {{</* contrived title="A Contrived Example" */>}}
@@ -248,11 +248,11 @@ This is a **bold** word, and this is an _emphasized_ word.
 </div>
 ```
 
-The preceding example called the shortcode using [standard notation], requiring us to process the inner content with the [`RenderString`] method to convert the Markdown to HTML. This conversion is unnecessary when calling a shortcode using [Markdown notation].
+The preceding example called the shortcode using [standard notation][], requiring us to process the inner content with the [`RenderString`][] method to convert the Markdown to HTML. This conversion is unnecessary when calling a shortcode using [Markdown notation][].
 
 ### Nesting
 
-The  [`Parent`] method provides access to the parent shortcode context when the shortcode in question is called within the context of a parent shortcode. This provides an inheritance model.
+The  [`Parent`][] method provides access to the parent shortcode context when the shortcode in question is called within the context of a parent shortcode. This provides an inheritance model.
 
 The following example is contrived but demonstrates the concept. Assume you have a `gallery` shortcode that expects one named `class` argument:
 
@@ -295,11 +295,11 @@ This will output the following HTML. Note how the first two `img` shortcodes inh
 
 ### Other examples
 
-For guidance, consider examining Hugo's embedded shortcodes. The source code, available on [GitHub], can provide a useful model.
+For guidance, consider examining Hugo's embedded shortcodes. The source code, available on [GitHub][], can provide a useful model.
 
 ## Detection
 
-The [`HasShortcode`] method allows you to check if a specific shortcode has been called on a page. For example, consider a custom audio shortcode:
+The [`HasShortcode`][] method allows you to check if a specific shortcode has been called on a page. For example, consider a custom audio shortcode:
 
 ```text {file="content/example.md"}
 {{</* audio src=/audio/test.mp3 */>}}
index a030d7fdf10eed0041734ece107d6168d62e5403..ce9ef9854ed3a8a9fec41e71c673cecde36c3cea 100644 (file)
@@ -75,7 +75,7 @@ For example, the _base_ template below calls the [`partial`] function to include
 
 ```go-html-template {file="layouts/baseof.html"}
 <!DOCTYPE html>
-<html lang="{{ site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
+<html lang="{{ site.Language.Locale }}" dir="{{ or site.Language.Direction `ltr` }}">
 <head>
   {{ partial "head.html" . }}
 </head>
index f1c10e6fa6361981b456e53108222c8bb8a17c30..0af57aa27f1a0ec82f6769281ac2588a5b1136f0 100644 (file)
@@ -89,6 +89,9 @@ Alternatively, you can use the [Jekyll import command](/commands/hugo_import_jek
 [BloggerToHugo](https://github.com/huanlin/blogger-to-hugo)
 : Yet another tool to import Blogger posts to Hugo. For Windows platform only, and .NET Framework 4.5 is required. See README.md before using this tool.
 
+[blogger2hugo](https://github.com/noorkhafidzin/blogger2hugo)
+: Converts a Blogger backup file (`.atom`) from [Google Takeout](https://takeout.google.com/takeout/custom/blogger?hl=en) to Markdown (`.md`) files. The tool generates output compatible with the Hugo `content/` structure.
+
 ## Contentful
 
 [contentful-hugo](https://github.com/ModiiMedia/contentful-hugo)
index 2a98633d78825db5f0584b52d53c2498e9789d0d..709845dd9d6b5e26ef952a29538e5a32c532f998 100644 (file)
@@ -46,7 +46,7 @@ debug
 
 You can also use template functions to print warnings or errors to the console. These functions are typically used to report data validation errors, missing files, etc.
 
-{{% list-pages-in-section path=/functions/fmt filter=functions_fmt_logging filterType=include %}}
+{{% render-list-of-pages-in-section path=/functions/fmt filter=functions_fmt_logging filterType=include %}}
 
 ## LiveReload
 
index b5a519c2cae87cbda7fef6df1af4ce10ee9b26e3..feada5970e33a983030be07b5916dd52e1c78a04 100644 (file)
@@ -1038,7 +1038,6 @@ chroma:
     - zig
     Name: Zig
   styles:
-  - RPGLE
   - abap
   - algol
   - algol_nu
@@ -1091,6 +1090,7 @@ chroma:
   - rose-pine
   - rose-pine-dawn
   - rose-pine-moon
+  - rpgle
   - rrt
   - solarized-dark
   - solarized-dark256
@@ -1157,6 +1157,9 @@ config:
     misc:
       dir: :cacheDir/:project
       maxAge: -1
+    modulegitinfo:
+      dir: :cacheDir/modules
+      maxAge: 24h
     modulequeries:
       dir: :cacheDir/modules
       maxAge: 24h
@@ -1239,24 +1242,36 @@ config:
   ignoreLogs: null
   ignoreVendorPaths: ''
   imaging:
-    bgColor: '#ffffff'
+    anchor: smart
+    bgColor: ffffff
     compression: lossy
-    hint: photo
+    exif:
+      disableDate: false
+      disableLatLong: false
+      excludeFields: GPS|Exif|Exposure[M|P|B]|Contrast|Resolution|Sharp|JPEG|Metering|Sensing|Saturation|ColorSpace|Flash|WhiteBalance
+      includeFields: ''
+    meta:
+      fields:
+      - '! *{GPS,Exif,Exposure[MPB],Contrast,Resolution,Sharp,JPEG,Metering,Sensing,Saturation,ColorSpace,Flash,WhiteBalance}*'
+      sources:
+      - exif
+      - iptc
     quality: 75
     resampleFilter: box
     webp:
-      method: 4
-      useSharpYuv: true
-  languageCode: ''
+      hint: photo
+      method: 2
+      useSharpYuv: false
   languages:
     en:
+      direction: ''
       disabled: false
-      languageCode: ''
-      languageDirection: ''
-      languageName: ''
+      label: ''
+      locale: ''
       title: ''
       weight: 0
   layoutDir: layouts
+  locale: ''
   mainSections: null
   markup:
     asciiDocExt:
@@ -1400,6 +1415,10 @@ config:
       delimiter: .
       suffixes:
       - ttf
+    image/avif:
+      delimiter: .
+      suffixes:
+      - avif
     image/bmp:
       delimiter: .
       suffixes:
@@ -1408,6 +1427,14 @@ config:
       delimiter: .
       suffixes:
       - gif
+    image/heic:
+      delimiter: .
+      suffixes:
+      - heic
+    image/heif:
+      delimiter: .
+      suffixes:
+      - heif
     image/jpeg:
       delimiter: .
       suffixes:
@@ -2181,12 +2208,12 @@ tpl:
         Description: |-
           Append appends args up to the last one to the slice in the last argument.
           This construct allows template constructs like this:
-          
+
                {{ $pages = $pages | append $p2 $p1 }}
-          
+
           Note that with 2 arguments where both are slices of the same type,
           the first slice will be appended to the second:
-          
+
                {{ $pages = $pages | append .Site.RegularPages }}
         Examples: []
       Apply:
@@ -2207,11 +2234,11 @@ tpl:
         Description: |-
           Complement gives the elements in the last element of ls that are not in
           any of the others.
-          
+
           All elements of ls must be slices or arrays of comparable types.
-          
+
           The reasoning behind this rather clumsy API is so we can do this in the templates:
-          
+
                {{ $c := .Pages | complement $last4 }}
         Examples:
         - - '{{ slice "a" "b" "c" "d" "e" "f" | complement (slice "b" "c") (slice "d" "e") }}'
@@ -2286,9 +2313,9 @@ tpl:
           Index returns the result of indexing its first argument by the following
           arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each
           indexed item must be a map, slice, or array.
-          
+
           Adapted from Go stdlib src/text/template/funcs.go.
-          
+
           We deviate from the stdlib mostly because of https://github.com/golang/go/issues/14751.
         Examples: []
       Intersect:
@@ -2338,7 +2365,7 @@ tpl:
         Description: |-
           Merge creates a copy of the final parameter in params and merges the preceding
           parameters into it in reverse order.
-          
+
           Currently only maps are supported. Key handling is case insensitive.
         Examples:
         - - '{{ dict "title" "Hugo Rocks!" | collections.Merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!") | sort }}'
@@ -2385,9 +2412,9 @@ tpl:
         - args
         Description: |-
           Seq creates a sequence of integers from args. It's named and used as GNU's seq.
-          
+
           Examples:
-          
+
                3 => 1, 2, 3
                1 2 4 => 1, 3
                -3 => -1, -2, -3
@@ -2476,7 +2503,7 @@ tpl:
         - v2
         Description: |-
           Conditional can be used as a ternary operator.
-          
+
           It returns v1 if cond is true, else v2.
         Examples:
         - - '{{ cond (eq (add 2 2) 4) "2+2 is 4" "what?" | safeHTML }}'
@@ -2603,6 +2630,14 @@ tpl:
         - - '{{ sha256 "Hello world, gophers!" }}'
           - 6ec43b78da9669f50e4e422575c54bf87536954ccd58280219c393f2ce352b46
     css:
+      Build:
+        Aliases: null
+        Args:
+        - args
+        Description: |-
+          Build processes the given CSS Resource with ESBuild.
+          Note that this method is identical to the one in the js Namespace.
+        Examples: []
       PostCSS:
         Aliases:
         - postCSS
@@ -2644,10 +2679,10 @@ tpl:
           Dump returns a object dump of val as a string.
           Note that not every value passed to Dump will print so nicely, but
           we'll improve on that.
-          
+
           We recommend using the "go" Chroma lexer to format the output
           nicely.
-          
+
           Also note that the output from Dump may change from Hugo version to the next,
           so don't depend on a specific output.
         Examples:
@@ -2847,11 +2882,26 @@ tpl:
         - - '{{ hash.XxHash "The quick brown fox jumps over the lazy dog" }}'
           - 0b242d361fda71bc
     hugo:
+      Data:
+        Aliases: null
+        Args: null
+        Description: ''
+        Examples: null
       Deps:
         Aliases: null
         Args: null
         Description: ''
         Examples: null
+      Environment:
+        Aliases: null
+        Args: null
+        Description: ''
+        Examples: null
+      ForEeachIdentityByName:
+        Aliases: null
+        Args: null
+        Description: ''
+        Examples: null
       Generator:
         Aliases: null
         Args: null
@@ -2892,6 +2942,11 @@ tpl:
         Args: null
         Description: ''
         Examples: null
+      Sites:
+        Aliases: null
+        Args: null
+        Description: ''
+        Examples: null
       Store:
         Aliases: null
         Args: null
@@ -3049,7 +3104,7 @@ tpl:
         - v
         Description: |-
           Humanize returns the humanized form of v.
-          
+
           If v is either an integer or a string containing an integer
           value, the behavior is to add the appropriate ordinal.
         Examples:
@@ -3101,7 +3156,7 @@ tpl:
         Aliases: null
         Args:
         - args
-        Description: Build processes the given Resource with ESBuild.
+        Description: Build processes the given JavaScript Resource with ESBuild.
         Examples: []
     lang:
       FormatAccounting:
@@ -3113,7 +3168,7 @@ tpl:
         Description: |-
           FormatAccounting returns the currency representation of number for the given currency and precision
           for the current language in accounting notation.
-          
+
           The return value is formatted with at least two decimal places.
         Examples:
         - - '{{ 512.5032 | lang.FormatAccounting 2 "NOK" }}'
@@ -3127,7 +3182,7 @@ tpl:
         Description: |-
           FormatCurrency returns the currency representation of number for the given currency and precision
           for the current language.
-          
+
           The return value is formatted with at least two decimal places.
         Examples:
         - - '{{ 512.5032 | lang.FormatCurrency 2 "USD" }}'
@@ -3617,6 +3672,16 @@ tpl:
         Args: null
         Description: ''
         Examples: null
+      IsImageResourceProcessable:
+        Aliases: null
+        Args: null
+        Description: ''
+        Examples: null
+      IsImageResourceWithMeta:
+        Aliases: null
+        Args: null
+        Description: ''
+        Examples: null
       IsMap:
         Aliases: null
         Args:
@@ -3725,16 +3790,16 @@ tpl:
           so if you organize your resources in sub-folders, you need to be explicit about it, e.g.:
           "images/*.png". To match any PNG image anywhere in the bundle you can do "**.png", and
           to match all PNG images below the images folder, use "images/**.jpg".
-          
+
           The matching is case insensitive.
-          
+
           Match matches by using the files name with path relative to the file system root
           with Unix style slashes (/) and no leading slash, e.g. "images/logo.png".
-          
+
           See https://github.com/gobwas/glob for the full rules set.
-          
+
           It looks for files in the assets file system.
-          
+
           See Match for a more complete explanation about the rules used.
         Examples: []
       Minify:
@@ -3871,6 +3936,11 @@ tpl:
         Args: null
         Description: ''
         Examples: null
+      IsDefault:
+        Aliases: null
+        Args: null
+        Description: ''
+        Examples: null
       Key:
         Aliases: null
         Args: null
@@ -4075,7 +4145,7 @@ tpl:
           expression in content. Each element is a slice of strings holding the text
           of the leftmost match of the regular expression and the matches, if any, of
           its subexpressions.
-          
+
           By default all matches will be included. The number of matches can be
           limited with the optional limit parameter. A return value of nil indicates
           no match.
@@ -4140,6 +4210,19 @@ tpl:
           - Batman and Catwoman
         - - '{{ replace "aabbaabb" "a" "z" 2 }}'
           - zzbbaabb
+      ReplacePairs:
+        Aliases: null
+        Args:
+        - args
+        Description: |-
+          ReplacePairs returns a copy of a string with multiple replacements performed
+          in a single pass. The last argument is the source string. Preceding arguments
+          are old/new string pairs, either as a slice or as individual arguments.
+        Examples:
+        - - '{{ "aab" | strings.ReplacePairs "a" "b" "b" "c" }}'
+          - bbc
+        - - '{{ "aab" | strings.ReplacePairs (slice "a" "b" "b" "c") }}'
+          - bbc
       ReplaceRE:
         Aliases:
         - replaceRE
@@ -4435,7 +4518,7 @@ tpl:
         - s
         Description: |-
           Emojify returns a copy of s with all emoji codes replaced with actual emojis.
-          
+
           See http://www.emoji-cheat-sheet.com/
         Examples:
         - - '{{ "I :heart: Hugo" | emojify }}'
index ec77f4caecf0f953ec7eff7aae652b1fccae66c9..ce29b0753a70afb1893a689c53f33a2a5091f05e 100644 (file)
@@ -1,12 +1,10 @@
-# Do not delete. Required for layouts/_shortcodes/list-pages-in-section.html.
+# Do not delete. This file defines filters that can be applied to lists of
+# pages when rendering. The filters are defined as lists of page paths. A
+# filter can be applied to a list of pages by specifying the filter name and
+# filter type (include or exclude). Used by:
 #
-# When calling the list-pages-in-section shortcode, you can specify a page
-# filter, and whether the pages in the filter should be included or excluded
-# from the list.
-#
-# For example:
-#
-# {{% list-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude %}}
+#   - layouts/_shortcodes/render-list-of-pages-in-section.html
+#   - layouts/_shortcodes/render-table-of-pages-in-section.html
 
 functions_fmt_logging:
   - /functions/fmt/errorf
@@ -86,3 +84,10 @@ methods_page_navigation:
   - /methods/page/nextinsection
   - /methods/page/prev
   - /methods/page/previnsection
+methods_resource_image_processing:
+  - /methods/resource/crop
+  - /methods/resource/fill
+  - /methods/resource/filter
+  - /methods/resource/fit
+  - /methods/resource/fit
+  - /methods/resource/resize
index 1bc50ce1ba9f014cfd106078deb92274c5aff328..7be9895ee0bafbd55f5106315f87fdf6edcdb84d 100644 (file)
--- a/hugo.toml
+++ b/hugo.toml
@@ -53,9 +53,10 @@ disableAliases = true
 
 [languages]
   [languages.en]
-    languageCode = "en-US"
-    languageName = "English"
-    weight       = 1
+    direction = 'ltr'
+    label     = 'English'
+    locale    = 'en-US'
+    weight    = 1
 
 [markup]
   [markup.goldmark]
@@ -66,7 +67,7 @@ disableAliases = true
           block  = [['\[', '\]'], ['$$', '$$']]
           inline = [['\(', '\)']]
     [markup.goldmark.parser]
-      autoDefinitionTermID = true
+      autoDefinitionTermID               = true
       wrapStandAloneImageWithinParagraph = false
       [markup.goldmark.parser.attribute]
         block = true
@@ -152,7 +153,7 @@ disableAliases = true
 [taxonomies]
   category = 'categories'
 
-######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES ########
+  ######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES ########
 
 [menus]
   [[menus.global]]
index 70011220e7205e469922a73e73afd13244173b65..4cc871f05d19cb8fdfc92471e9bda5d6e4a6ad6c 100644 (file)
@@ -287,11 +287,12 @@ either of these shortcodes in conjunction with this render hook.
   {{- /* There's a better way to handle this, but it works for now. */}}
   {{- $cheating := dict
     "chaining" "chain"
+    "ci/cd" "cicd"
+    "interleaved" "interleave"
     "localize" "localization"
     "localized" "localization"
     "paginating" "paginate"
     "walking" "walk"
-    "ci/cd" "cicd"
   }}
 
   {{- /* Verify that a glossary term page exists for the given term. */}}
index 710226ebb360e516a22865eb5ec80793e569940a..e106c8ca84bffe23f20256aee422d3ac6a770dcc 100644 (file)
@@ -4,7 +4,7 @@
 {{- $text := .text | default "" }}
 {{- $class := .class | default "mt-6 mb-8" }}
 <div
-  class="border-l-4 overflow-x-auto border-{{ $color }}-400 bg-{{ $color }}-50 dark:bg-{{ $color }}-800 border-1 dark:border-{{ $color }}-700 p-4 {{ $class }}">
+  class="border-l-4 overflow-x-auto border-{{ $color }}-400 bg-{{ $color }}-50 dark:bg-{{ $color }}-800 border dark:border-{{ $color }}-700 p-4 {{ $class }}">
   <div class="flex">
     <div class="shrink-0">
       <svg class="fill-{{ $color }}-500 dark:fill-{{ $color }}-400 h-7 w-7">
diff --git a/layouts/_partials/layouts/blocks/feature-state.html b/layouts/_partials/layouts/blocks/feature-state.html
new file mode 100644 (file)
index 0000000..98c12d3
--- /dev/null
@@ -0,0 +1,100 @@
+{{/* prettier-ignore-start */ -}}
+{{- /*
+This must be used in conjunction with the "deprecated-in" and "new-in"
+shortcodes. The "deprecated-in" shortcode should be used to indicate when a
+feature was deprecated, and the "new-in" shortcode should be used to indicate
+when a feature was introduced. This template will render the appropriate
+admonition or badge based on the feature status and version information provided
+by the shortcodes.
+
+@param {string} inner The inner content of the shortcode, if any.
+@param {string} name The name of the shortcode.
+@param {string} page The page context in which the shortcode is used.
+@param {string} position The position of the shortcode in the source file.
+@param {string} status The feature status, either "deprecated" or "new".
+@param {string} version The version in which the feature was deprecated or introduced.
+
+@config {int} majorVersionDiffThreshold The major version difference before warning.
+@config {int} minorVersionDiffThresholdDeprecatedFeature Minor versions to wait before warning about a deprecated feature.
+@config {int} minorVersionDiffThresholdNewFeature Minor versions to wait before warning about a "new" feature.
+@config {slice} validStatusValues Allowed values for the status parameter.
+@config {string} classAnchorBase Base classes for the anchor element.
+@config {string} classSpanBase Base classes for the span/badge element.
+
+@example
+
+  {{- partial "layouts/blocks/feature-state.html" (dict
+    "inner" (strings.TrimSpace $.Inner)
+    "name" $.Name
+    "page" $.Page
+    "position" $.Position
+    "status" "deprecated"
+    "version" $version
+    )
+  }}
+
+*/ -}}
+{{/* prettier-ignore-end */ -}}
+
+{{- /* Configuration */ -}}
+{{- $majorVersionDiffThreshold := 0 }}
+{{- $minorVersionDiffThresholdDeprecatedFeature := 30 }}
+{{- $minorVersionDiffThresholdNewFeature := 30 }}
+{{- $validStatusValues := slice "deprecated" "new" }}
+{{- $classAnchorBase := "dark:text-black no-underline" }}
+{{- $classSpanBase := "not-prose inline-flex items-center px-2 mr-1 rounded text-sm font-medium" }}
+
+{{- /* Initialization */ -}}
+{{- $classAnchor := $classAnchorBase }}
+{{- $classSpan := $classSpanBase }}
+{{- $color := "" }}
+{{- $expiryMessage := "" }}
+{{- $icon := "" }}
+{{- $minorVersionDiffThreshold := 0 }}
+{{- $text := "" }}
+
+{{- if and $.name $.page $.position $.status $.version }}
+  {{- if in $validStatusValues $.status }}
+    {{- if eq $.status "deprecated" }}
+      {{- $classAnchor = printf "text-orange-800 hover:text-orange-600 %s" $classAnchor }}
+      {{- $classSpan = printf "bg-orange-200 dark:bg-orange-400 fill-orange-600 %s" $classSpan }}
+      {{- $color = "orange" }}
+      {{- $expiryMessage = "The deprecation period has ended. Remove this shortcode call and the associated content" }}
+      {{- $icon = "exclamation" }}
+      {{- $minorVersionDiffThreshold = $minorVersionDiffThresholdDeprecatedFeature }}
+      {{- $text = "Deprecated in" }}
+    {{- else if eq $.status "new" }}
+      {{- $classAnchor = printf "text-green-800 hover:text-green-600 %s" $classAnchor }}
+      {{- $classSpan = printf "bg-green-200 dark:bg-green-400 fill-green-600 %s" $classSpan }}
+      {{- $color = "green" }}
+      {{- $expiryMessage = "This feature is no longer new. Remove this shortcode call" }}
+      {{- $icon = "exclamation" }}
+      {{- $minorVersionDiffThreshold = $minorVersionDiffThresholdNewFeature }}
+      {{- $text = "New in" }}
+    {{- else }}
+      {{- errorf "BUG: The %q template does not support the %q feature status: see %s" templates.Current.Name $.status $.position }}
+    {{- end }}
+
+    {{- $hv := split hugo.Version "." }}
+    {{- $sv := split $.version "." }}
+    {{- $majorDiff := sub (index $hv 0 | int) (index $sv 0 | int) }}
+    {{- $minorDiff := sub (index $hv 1 | int) (index $sv 1 | int) }}
+
+    {{- if or (gt $majorDiff $majorVersionDiffThreshold) (gt $minorDiff $minorVersionDiffThreshold) }}
+      {{- warnf "%s: %s" $expiryMessage $.position }}
+    {{- end }}
+
+    {{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $.version }}
+    {{- if $.inner }}
+      {{- $text = printf "%s [v%s](%s)\n\n%s" $text $.version $href $.inner  | $.page.RenderString (dict "display" "block") }}
+      {{- partial "layouts/blocks/alert.html" (dict "color" $color "icon" $icon "text" $text) }}
+    {{- else }}
+      {{- $target := "_blank"}}
+      {{- printf "<span class=%q><a class=%q href=%q target=%q>%s v%s</a></span>" $classSpan $classAnchor $href $target $text $.version | safeHTML }}
+    {{- end }}
+  {{- else }}
+    {{- errorf "The %q template does not support the %q feature status: see %s" templates.Current.Name $.status $.position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q template requires the following context: name, page, position, status, version: see %s" templates.Current.Name $.position }}
+{{- end }}
index 48a83b3d3d8aa4e74effc26f5b850d3d02b01e5f..a266f990ae053309f3793241e853c811441a3688 100644 (file)
@@ -80,7 +80,7 @@ Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
   <nav class="relative flex" aria-label="Tabs">
     {{- with $file }}
       <div
-        class="select-none flex-none text-sm px-2 content-center border-b-1 border-gray-300 dark:border-gray-700"
+        class="select-none flex-none text-sm px-2 content-center border-b border-gray-300 dark:border-gray-700"
         aria-label="Filename">
         {{ . }}{{ if not $fm }}.{{ end }}
       </div>
@@ -90,10 +90,10 @@ Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
       <button
         x-on:click="$store.nav.userSettings.settings.configFileType = '{{ index $langs $i }}'"
         aria-label="{{ printf `Toggle %s` . }}"
-        class="px-3 py-2 font-semibold text-black dark:text-slate-200 border-l-1 border-t-1 {{ if $isLast }}
-          border-r-1
+        class="px-3 py-2 font-semibold text-black dark:text-slate-200 border-l border-t {{ if $isLast }}
+          border-r
         {{ end }} border-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 dark:border-gray-700 cursor-pointer relative min-w-0 flex-1 overflow-hidden text-sm no-underline text-center focus:z-10 overflow-x-auto"
-        :class="$store.nav.userSettings.settings.configFileType === '{{ index $langs $i }}' ? 'border-b-0 bg-light dark:bg-dark' : 'border-b-1'">
+        :class="$store.nav.userSettings.settings.configFileType === '{{ index $langs $i }}' ? 'border-b-0 bg-light dark:bg-dark' : 'border-b'">
         <span class="select-none">
           {{ . }}
         </span>
@@ -103,7 +103,7 @@ Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
   {{- if $code }}
     {{- range $i, $lang := $langs }}
       <div
-        class="max-h-96 overflow-y-auto border-l-1 border-b-1 border-r-1 border-gray-300 dark:border-gray-700"
+        class="max-h-96 overflow-y-auto border-l border-b border-r border-gray-300 dark:border-gray-700"
         x-ref="{{ $lang }}"
         x-cloak
         x-transition:enter.opacity.duration.300ms
index ce2ba389e0ade3cf57a83de21eab5c7247b58ea9..b4d1156076d78ad2c83c3ac4315436a2da119fa5 100644 (file)
@@ -1,9 +1,10 @@
 {{/* prettier-ignore-start */ -}}
 {{- /*
-Renders a callout indicating the version in which a feature was deprecated.
+Renders an admonition or badge indicating the version in which a feature was deprecated.
 
-Include descriptive text between the opening and closing tags, or omit the
-descriptive text and call the shortcode with a self-closing tag.
+To render an admonition, include descriptive text between the opening and closing
+tags. To render a badge, omit the descriptive text and call the shortcode with a
+self-closing tag.
 
 @param {string} 0 The semantic version string, with or without a leading v.
 
@@ -15,13 +16,13 @@ descriptive text and call the shortcode with a self-closing tag.
 */ -}}
 {{/* prettier-ignore-end */ -}}
 {{- with $version := .Get 0 | strings.TrimLeft "vV" }}
-  {{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}
-  {{- $inner := strings.TrimSpace $.Inner }}
-  {{- $text := printf "Deprecated in [v%s](%s)\n\n%s" $version $href $inner | $.Page.RenderString (dict "display" "block") }}
-  {{- partial "layouts/blocks/alert.html" (dict
-    "color" "orange"
-    "icon" "exclamation"
-    "text" $text
+  {{- partial "layouts/blocks/feature-state.html" (dict
+    "inner" (strings.TrimSpace $.Inner)
+    "name" $.Name
+    "page" $.Page
+    "position" $.Position
+    "status" "deprecated"
+    "version" $version
     )
   }}
 {{- else }}
diff --git a/layouts/_shortcodes/get-page-desc.html b/layouts/_shortcodes/get-page-desc.html
new file mode 100644 (file)
index 0000000..c87dac3
--- /dev/null
@@ -0,0 +1,17 @@
+{{- /*
+Returns the Description of the page specified by the logical path in the first
+positional argument.
+
+@param {string} logicalPath The logical path to the page.
+
+@example {{% get-page-desc "/functions/reflect/isimageresource" %}}
+*/}}
+{{- with $logicalPath := .Get 0 }}
+  {{- with $.Page.GetPage $logicalPath }}
+{{- .Description }}{{/* Do not indent. */}}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find %s: see %s" $.Name $logicalPath $.Position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a positional argument with the logical path to the page: see %s" $.Name $logicalPath $.Position }}
+{{- end -}}
diff --git a/layouts/_shortcodes/list-pages-in-section.html b/layouts/_shortcodes/list-pages-in-section.html
deleted file mode 100644 (file)
index cf74bd9..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-{{- /*
-Renders a description list of the pages in the given section.
-
-Render a subset of the pages in the section by specifying a predefined filter,
-and whether to include those pages.
-
-Filters are defined in the data directory, in the file named page_filters. Each
-filter is an array of paths to a file, relative to the root of the content
-directory. Hugo will throw an error if the specified filter does not exist, or
-if any of the pages in the filter do not exist.
-
-@param {string} path The path to the section.
-@param {string} [filter=""] The name of filter list.
-@param {string} [filterType=""] The type of filter, either include or exclude.
-@param {string} [titlePrefix=""] The string to prepend to the link title.
-
-@example {{% list-pages-in-section path=/methods/resources %}}
-@example {{% list-pages-in-section path=/functions/images filter=some_filter filterType=exclude %}}
-@example {{% list-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo %}}
-*/}}
-
-{{/* Initialize. */}}
-{{ $filter := or "" (.Get "filter" | lower) }}
-{{ $filterType := or (.Get "filterType") "none" | lower }}
-{{ $filteredPages := slice }}
-{{ $titlePrefix := or (.Get "titlePrefix") "" }}
-
-{{/* Build slice of filtered pages. */}}
-{{ with $filter }}
-  {{ with index hugo.Data.page_filters . }}
-    {{ range . }}
-      {{ with site.GetPage . }}
-        {{ $filteredPages = $filteredPages | append . }}
-      {{ else }}
-        {{ errorf "The %q shortcode was unable to find %q as specified in the page_filters data file. See %s" $.Name . $.Position }}
-      {{ end }}
-    {{ end }}
-  {{ else }}
-    {{ errorf "The %q shortcode was unable to find the %q filter in the page_filters data file. See %s" $.Name . $.Position }}
-  {{ end }}
-{{ end }}
-
-{{/* Render. */}}
-{{ with $sectionPath := .Get "path" }}
-  {{ with site.GetPage . }}
-    {{ with .RegularPages }}
-        {{ range $page := .ByTitle }}
-          {{ if or
-            (and (eq $filterType "include") (in $filteredPages $page))
-            (and (eq $filterType "exclude") (not (in $filteredPages $page)))
-            (eq $filterType "none")
-          }}
-            {{ $linkTitle := .LinkTitle }}
-            {{ with $titlePrefix }}
-              {{ $linkTitle = printf "%s%s" . $linkTitle }}
-            {{ end }}
-{{/* Use page Path as the link destination for render hook to resolve correctly. */}}
-[{{ $linkTitle }}]({{ $page.Path }}){{/* Do not indent. */}}
-: {{ $page.Description }}{{/* Do not indent. */}}
-          {{ end }}
-        {{ end }}
-    {{ else }}
-      {{ warnf "The %q shortcode found no pages in the %q section. See %s" $.Name $sectionPath $.Position }}
-    {{ end }}
-  {{ else }}
-    {{ errorf "The %q shortcode was unable to find %q. See %s" $.Name $sectionPath $.Position }}
-  {{ end }}
-{{ else }}
-  {{ errorf "The %q shortcode requires a 'path' parameter indicating the path to the section. See %s" $.Name $.Position }}
-{{ end }}
index 51399064e889b38a7a560fb3bfae260aa6aa3f54..67b48c2033968649fbe86b2931a0db27d4a79e69 100644 (file)
@@ -1,61 +1,30 @@
 {{/* prettier-ignore-start */ -}}
 {{- /*
-Renders a callout or badge indicating the version in which a feature was added.
+Renders an admonition or badge indicating the version in which a feature was introduced.
 
-To render a callout, include descriptive text between the opening and closing
-tags. To render a badge,omit the descriptive text and call the shortcode with a
+To render an admonition, include descriptive text between the opening and closing
+tags. To render a badge, omit the descriptive text and call the shortcode with a
 self-closing tag.
 
-When comparing the current version to the specified version, the "new in"
-button will be hidden if any of the following conditions is true:
-
-- The major version difference exceeds the majorVersionDiffThreshold
-- The minor version difference exceeds the minorVersionDiffThreshold
-
 @param {string} 0 The semantic version string, with or without a leading v.
 
-@example  {{< new-in 0.100.0 />}}
+@example  {{< new-in 0.144.0 />}}
 
-@example  {{{< new-in 0.100.0 >}}
+@example  {{< new-in 0.144.0 >}}
           Some descriptive text here.
           {{< /new-in >}}
 */ -}}
 {{/* prettier-ignore-end */ -}}
-{{- $majorVersionDiffThreshold := 0 }}
-{{- $minorVersionDiffThreshold := 30 }}
-{{- $displayExpirationWarning := true }}
-
 {{- with $version := .Get 0 | strings.TrimLeft "vV" }}
-  {{- $majorVersionDiff := sub (index (split hugo.Version ".") 0 | int) (index (split $version ".") 0 | int) }}
-  {{- $minorVersionDiff := sub (index (split hugo.Version ".") 1 | int) (index (split $version ".") 1 | int) }}
-  {{- if or (gt $majorVersionDiff $majorVersionDiffThreshold) (gt $minorVersionDiff $minorVersionDiffThreshold) }}
-    {{- if $displayExpirationWarning }}
-      {{- warnf "This call to the %q shortcode should be removed: %s. The button is now hidden because the specified version (%s) is older than the display threshold." $.Name $.Position $version }}
-    {{- end }}
-  {{- else }}
-    {{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}
-    {{- with $.Inner }}
-      {{- $inner := strings.TrimSpace . }}
-      {{- $text := printf "New in [v%s](%s)\n\n%s" $version $href $inner | $.Page.RenderString (dict "display" "block") }}
-      {{ partial "layouts/blocks/alert.html" (dict
-        "color" "green"
-        "icon" "exclamation"
-        "text" $text
-        )
-      }}
-    {{- else }}
-      <span
-        class="not-prose inline-flex items-center px-2 mr-1 rounded text-sm font-medium bg-green-200 dark:bg-green-400 fill-green-600">
-        <a
-          class="text-green-800 dark:text-black hover:text-green-600 no-underline"
-          href="{{ $href }}"
-          target="_blank">
-          New in
-          v{{ $version }}
-        </a>
-      </span>
-    {{- end }}
-  {{- end }}
+  {{- partial "layouts/blocks/feature-state.html" (dict
+    "inner" (strings.TrimSpace $.Inner)
+    "name" $.Name
+    "page" $.Page
+    "position" $.Position
+    "status" "new"
+    "version" $version
+    )
+  }}
 {{- else }}
   {{- errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
 {{- end }}
index 31d7daf6a5608d3501402673d1c2aedbfee2e9a7..0a15a512b578951bfae03e10a569d8ad73616053 100644 (file)
@@ -21,7 +21,7 @@ separately for each language.
   (dict "enableEmoji " "/configuration/all/#enableemoji")
   (dict "frontmatter" "/configuration/front-matter/")
   (dict "hasCJKLanguage" "/configuration/all/#hascjklanguage")
-  (dict "languageCode" "/configuration/all/#languagecode")
+  (dict "locale" "/configuration/all/#locale")
   (dict "mainSections" "/configuration/all/#mainsections")
   (dict "markup" "/configuration/markup/")
   (dict "mediaTypes" "/configuration/media-types/")
diff --git a/layouts/_shortcodes/render-list-of-pages-in-section.html b/layouts/_shortcodes/render-list-of-pages-in-section.html
new file mode 100644 (file)
index 0000000..fcc8bce
--- /dev/null
@@ -0,0 +1,70 @@
+{{- /*
+Renders a description list of the pages in the given section.
+
+Render a subset of the pages in the section by specifying a predefined filter,
+and whether to include those pages.
+
+Filters are defined in the data directory, in the file named page_filters. Each
+filter is an array of paths to a file, relative to the root of the content
+directory. Hugo will throw an error if the specified filter does not exist, or
+if any of the pages in the filter do not exist.
+
+@param {string} path The path to the section.
+@param {string} [filter=""] The name of filter list.
+@param {string} [filterType=""] The type of filter, either include or exclude.
+@param {string} [titlePrefix=""] The string to prepend to the link title.
+
+@example {{% render-list-of-pages-in-section path=/methods/resource %}}
+@example {{% render-list-of-pages-in-section path=/functions/images filter=some_filter filterType=exclude %}}
+@example {{% render-list-of-pages-in-section path=/functions/images filter=some_filter filterType=exclude titlePrefix=foo %}}
+*/}}
+
+{{- /* Initialize. */}}
+{{- $filter := or "" (.Get "filter" | lower) }}
+{{- $filterType := or (.Get "filterType") "none" | lower }}
+{{- $filteredPages := slice }}
+{{- $titlePrefix := or (.Get "titlePrefix") "" }}
+
+{{- /* Build slice of filtered pages. */}}
+{{- with $filter }}
+  {{- with index hugo.Data.page_filters . }}
+    {{- range . }}
+      {{- with site.GetPage . }}
+        {{- $filteredPages = $filteredPages | append . }}
+      {{- else }}
+        {{- errorf "The %q shortcode was unable to find %q as specified in the page_filters data file. See %s" $.Name . $.Position }}
+      {{- end }}
+    {{- end }}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find the %q filter in the page_filters data file. See %s" $.Name . $.Position }}
+  {{- end }}
+{{- end }}
+
+{{- /* Render. */}}
+{{- with $sectionPath := .Get "path" }}
+  {{- with site.GetPage . }}
+    {{- with .RegularPages }}
+        {{- range $page := .ByTitle }}
+          {{- if or
+            (and (eq $filterType "include") (in $filteredPages $page))
+            (and (eq $filterType "exclude") (not (in $filteredPages $page)))
+            (eq $filterType "none")
+          }}
+            {{- $linkTitle := .LinkTitle }}
+            {{- with $titlePrefix }}
+              {{- $linkTitle = printf "%s%s" . $linkTitle }}
+            {{- end }}
+{{- /* Use page Path as the link destination for render hook to resolve correctly. */}}
+[{{ $linkTitle }}]({{ $page.Path }}){{/* Do not indent. */}}
+: {{ $page.Description }}{{/* Do not indent. */}}
+          {{ end }}
+        {{- end }}
+    {{- else }}
+      {{- warnf "The %q shortcode found no pages in the %q section. See %s" $.Name $sectionPath $.Position }}
+    {{- end }}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name $sectionPath $.Position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a 'path' parameter indicating the path to the section. See %s" $.Name $.Position }}
+{{- end }}
diff --git a/layouts/_shortcodes/render-table-of-pages-in-section.html b/layouts/_shortcodes/render-table-of-pages-in-section.html
new file mode 100644 (file)
index 0000000..7383627
--- /dev/null
@@ -0,0 +1,82 @@
+{{- /*
+Renders a table of the pages in the given section.
+
+Render a subset of the pages in the section by specifying a predefined filter,
+and whether to include those pages.
+
+Filters are defined in the data directory, in the file named page_filters. Each
+filter is an array of paths to a file, relative to the root of the content
+directory. Hugo will throw an error if the specified filter does not exist, or
+if any of the pages in the filter do not exist.
+
+@param {string} path The path to the section.
+@param {string} [filter=""] The name of filter list.
+@param {string} [filterType=""] The type of filter, either include or exclude.
+@param {string} [titlePrefix=""] The string to prepend to the link title.
+@param {string} [headingColumn1="Item"] The heading for the first column of the table.
+@param {string} [headingColumn2="Description"] The heading for the second column of the table.
+
+@example
+
+{{% render-table-of-pages-in-section
+  path=/methods/resource
+  filter=methods_resource_image_processing
+  filterType=include
+  headingColumn1=Method
+  headingColumn2=Description
+%}}
+
+*/}}
+
+{{- /* Initialize. */}}
+{{- $filter := or "" (.Get "filter" | lower) }}
+{{- $filterType := or (.Get "filterType") "none" | lower }}
+{{- $filteredPages := slice }}
+{{- $titlePrefix := or (.Get "titlePrefix") "" }}
+{{- $headingColumn1 := or (.Get "headingColumn1") "Item" }}
+{{- $headingColumn2 := or (.Get "headingColumn2") "Description" }}
+
+{{- /* Build slice of filtered pages. */}}
+{{- with $filter }}
+  {{- with index hugo.Data.page_filters . }}
+    {{- range . }}
+      {{- with site.GetPage . }}
+        {{- $filteredPages = $filteredPages | append . }}
+      {{- else }}
+        {{- errorf "The %q shortcode was unable to find %q as specified in the page_filters data file. See %s" $.Name . $.Position }}
+      {{- end }}
+    {{- end }}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find the %q filter in the page_filters data file. See %s" $.Name . $.Position }}
+  {{- end }}
+{{- end }}
+
+{{- /* Render. */}}
+{{- with $sectionPath := .Get "path" }}
+  {{- with site.GetPage . }}
+    {{- with .RegularPages }}
+{{ $headingColumn1 }}|{{ $headingColumn2 }}{{/* Do not indent. */}}
+:--|:--{{/* Do not indent. */}}
+        {{- range $page := .ByTitle }}
+          {{- if or
+            (and (eq $filterType "include") (in $filteredPages $page))
+            (and (eq $filterType "exclude") (not (in $filteredPages $page)))
+            (eq $filterType "none")
+          }}
+            {{- $linkTitle := .LinkTitle }}
+            {{- with $titlePrefix }}
+              {{- $linkTitle = printf "%s%s" . $linkTitle }}
+            {{- end }}
+{{- /* Use page Path as the link destination for render hook to resolve correctly. */}}
+[`{{ $linkTitle }}`]({{ $page.Path }})|{{ $page.Description }}{{/* Do not indent. */}}
+          {{- end }}
+        {{- end }}
+    {{- else }}
+      {{- warnf "The %q shortcode found no pages in the %q section. See %s" $.Name $sectionPath $.Position }}
+    {{- end }}
+  {{- else }}
+    {{- errorf "The %q shortcode was unable to find %q. See %s" $.Name $sectionPath $.Position }}
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a 'path' parameter indicating the path to the section. See %s" $.Name $.Position }}
+{{- end }}
index ad4dd90a9788179f69b129c8c19b382a95864845..9b0c6248f9d0a960fd4bf7c5c0c171c57fd5e4a4 100644 (file)
@@ -1,7 +1,7 @@
 <!doctype html>
 <html
   class="h-full antialiased scheme-light dark:scheme-dark"
-  lang="{{ or site.Language.LanguageCode `en-US` }}">
+  lang="{{ site.Language.Locale }}">
   <head>
     <meta charset="utf-8">
     <title>
index 90fa22148bc5c53a346856a90839c4c238b594e2..08d1242577446ccd1c443148b0be9fa4888e4d48 100644 (file)
@@ -5,7 +5,7 @@
     <description>Recent news about Hugo, a static site generator written in Go, optimized for speed and designed for flexibility.</description>
     <link>{{ .Permalink }}</link>
     <generator>Hugo {{ hugo.Version }}</generator>
-    <language>{{ or site.Language.LanguageCode site.Language.Lang }}</language>
+    <language>{{ site.Language.Locale }}</language>
     {{- with site.Copyright }}
       <copyright>{{ . }}</copyright>
     {{- end }}
index c49f06d4179dc16c6d3c8ae0a4cb8858e64e4054..270f41a7a4199ff375f4f3b7b37a0b5937f88c25 100644 (file)
@@ -3,7 +3,7 @@
   command = "npm ls && hugo --gc --minify"
 
   [build.environment]
-    HUGO_VERSION = "0.156.0"
+    HUGO_VERSION = "0.158.0"
 
 [context.production.environment]
   HUGO_ENV           = "production"