]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Squashed 'docs/' changes from 4dd2d6415..3b1a8579d
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 26 Jan 2024 07:11:52 +0000 (08:11 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 26 Jan 2024 07:11:52 +0000 (08:11 +0100)
3b1a8579d Update theme
b1f04fd47 params: Adjust the twitter handle
2c8ba029f Fix typo
4421e46ec Update Where.md
5f9fec6a5 Update glossary.md
fb16945cf collections.Where - Clarify description of "collection"
4d6d7018b Update Include.md - improve return statement example
037151073 Update IncludeCached - improve return statement example
b053fa09c Improve return types
f7d615267 Describe minimum required Windows version
e97762b2a Update front matter in math.Sub
9e4d03a79 Fix data.GetJSON examples
9029ee123 Update spellcheck GitHub Action
c852fe421 Add version verification step to quick start guide
8fafca49c Correct front matter example
b412fdf65 Fix closing tag in notes docs
9a64d9579 Add hreflang Tag to Translation Link example
2d2a82101 Fix inverted examples in Permalink and RelPermalink
ff3e67e3f Correct spelling
3904b72e3 Fix documentation contribution steps enumeration
348fd3c02 Fix some typos in the content summaries page
a5823459a Fix two links, one to bonsai.io and one to digital.gov
c36978686 Fix typo
0ee3ff44f Vendor theme
6b0a9b75d Fix typo
44e4cb5c6 Fix typos
815071742 Update min Go version to build from source
192d14df5 Fix typo
e4a18946e Miscellaneous corrections
f12b7b74e netlify: Hugo 0.121.2
97dbc1ea1 Merge branch 'tempv0.121.2'
dc1c0aeeb Add cache note to resources.Concat
a8d1a6020 Correct return type
eca22e97c Fix front matter
7de247a03 Correct return type
5058bc520 collections.Seq: Specify max slice size
e24d81a4b Fix typo on FAQ page
ff8cf5a88 Correct 'related' front matter values
88b21fae0 Adjust deprecation handling
f7e19a25b Update terminology on shortcode templates page
01e10942a Adjust formatting
6ed2e19c2 tpl/math: Add math.Rand template function
b494a8d8d Update js.md
6d78035f4 Add interval description to glossary (#2378)
f9b612b64 Templates Lookup Order: Add missing parenthesis
741ab1bb2 Show vendorClosest in module default config
eb8cb878f Fix Babel headings
cdcdfc8e8 Change project name in Codeowners example
f31fe0d63 Update link to image filters
9dee1ee0e Update Solus installation instructions
716636fee Add TOC to collections.Sort
f7c64143c Update collections.Sort
4b8f6b991 Add id attributes to Scratch and Store methods
2a1adea79 Add id attributes to GitInfo, File, and Resources methods
b12d9cb8f Add Alpine Linux installation instructions
dfbebeec7 Change writeStats to buildStats
175b8aac8 resources/images: Create AutoOrient image filter
ba8e05c31 Update img shortcode
7fc15a6cc Fix default value of  pluralizeListTitles
a0be4fd8a Add Comentario to available comment engines
71aa7d8ab Update GitInfo.md
348441491 EXIF: describe applicable image types
743497eda Disable TOC for lang.Translate
b3b1df75d Describe lang.Translate fallback behavior
a6d9c362c Categorize CLI commands to improve search results
08cc2da4b Document canonical config for enabling inline shortcodes
8945be9c6 Update description of the humanize ordinal conversion
b8b4ccb6f Fix grammatical error
f53f9f936 Fix description of strings.HasSuffix
cdbe19b5b Update Params.md
e00c4eea2 Reformat site config descriptions
6f50c0755 Enumerate root configuration keys
1f2e7b9b2 Use canonical key when documenting menu configs
7d5a13d8d Update images.Text filter
315d2f8c3 Add math.Counter example to warnf
8ed9cdaa9 Miscellaneous edits
2bda491eb Fix front matter example
5c5bbbe3a netlify: Bump to Hugo 0.121.1
ed08f5943 Update Gentoo installation instructions
e4eb48457 Miscellaneous edits
8c3700d12 netlify: Bump to Hugo 0.121.0
1bb5a377f Merge branch 'tempv0.121.0'
8cba89504 Improve where function
0dfc00b0f docs: Regen docshelper
028076a66 Fix link to Gentoo package
52d2db4ff Fix typo
120025c19 Improve Gentooo installation instructions
0c31a4b45 Update GitHub hosting workflow example
dee99c36a Defend against missing aliases in quick-reference shortcode
d305278f1 Add Gentoo installation instructions
be98a37e1 docs: Adjust last merge from docs repository
a703dab53 docs: Regen docs helper
2e9c3532f Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
f57fdb44b deps: Update github.com/tdewolff/minify/v2 v2.20.7 => v2.20.8
50cad5e38 tpl/transform: Add transform.XMLEscape template function

git-subtree-dir: docs
git-subtree-split: 3b1a8579d2e032c1aab8a74d4cf63849ba11e7a8

143 files changed:
.cspell.json
.github/workflows/spellcheck.yml
.markdownlint.yaml
_vendor/github.com/gohugoio/gohugoioTheme/assets/js/menutoggle.js
_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/deprecated-in.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/include.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/list-pages-in-section.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/new-in.html
_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/quick-reference.html
_vendor/modules.txt
assets/images/examples/landscape-exif-orientation-5.jpg [new file with mode: 0644]
config/_default/params.toml
content/en/content-management/comments.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/summaries.md
content/en/contribute/documentation.md
content/en/functions/collections/Append.md
content/en/functions/collections/Apply.md
content/en/functions/collections/Delimit.md
content/en/functions/collections/Dictionary.md
content/en/functions/collections/First.md
content/en/functions/collections/Group.md
content/en/functions/collections/In.md
content/en/functions/collections/IndexFunction.md
content/en/functions/collections/IsSet.md
content/en/functions/collections/NewScratch.md
content/en/functions/collections/Querify.md
content/en/functions/collections/Reverse.md
content/en/functions/collections/Seq.md
content/en/functions/collections/Shuffle.md
content/en/functions/collections/Slice.md
content/en/functions/collections/Sort.md
content/en/functions/collections/SymDiff.md
content/en/functions/collections/Union.md
content/en/functions/collections/Uniq.md
content/en/functions/collections/Where.md
content/en/functions/crypto/FNV32a.md
content/en/functions/data/GetJSON.md
content/en/functions/fmt/Warnf.md
content/en/functions/global/page.md
content/en/functions/go-template/range.md
content/en/functions/go-template/with.md
content/en/functions/images/AutoOrient.md [new file with mode: 0644]
content/en/functions/images/Text.md
content/en/functions/inflect/Humanize.md
content/en/functions/lang/Translate.md
content/en/functions/math/Rand.md [new file with mode: 0644]
content/en/functions/math/Sub.md
content/en/functions/openapi3/Unmarshal.md
content/en/functions/partials/Include.md
content/en/functions/partials/IncludeCached.md
content/en/functions/resources/Concat.md
content/en/functions/resources/ExecuteAsTemplate.md
content/en/functions/resources/FromString.md
content/en/functions/resources/Minify.md
content/en/functions/resources/ToCSS.md
content/en/functions/safe/HTMLAttr.md
content/en/functions/safe/URL.md
content/en/functions/strings/FindRESubmatch.md
content/en/functions/strings/FindRe.md
content/en/functions/strings/HasSuffix.md
content/en/functions/transform/XMLEscape.md [new file with mode: 0644]
content/en/getting-started/configuration.md
content/en/getting-started/glossary.md
content/en/getting-started/quick-start.md
content/en/hosting-and-deployment/hosting-on-github/index.md
content/en/hosting-and-deployment/hosting-on-gitlab.md
content/en/hosting-and-deployment/hosting-on-netlify.md
content/en/hugo-modules/configuration.md
content/en/hugo-modules/use-modules.md
content/en/hugo-pipes/babel.md
content/en/hugo-pipes/js.md
content/en/hugo-pipes/minification.md
content/en/installation/_common/04-build-from-source.md
content/en/installation/_common/homebrew.md
content/en/installation/bsd.md
content/en/installation/linux.md
content/en/installation/macos.md
content/en/installation/windows.md
content/en/methods/menu-entry/Children.md
content/en/methods/menu-entry/HasChildren.md
content/en/methods/menu-entry/Identifier.md
content/en/methods/menu-entry/KeyName.md
content/en/methods/menu-entry/Page.md
content/en/methods/menu-entry/Params.md
content/en/methods/menu-entry/Parent.md
content/en/methods/menu-entry/_common/pre-post.md
content/en/methods/menu/ByName.md
content/en/methods/menu/ByWeight.md
content/en/methods/menu/Limit.md
content/en/methods/menu/Reverse.md
content/en/methods/page/AllTranslations.md
content/en/methods/page/CodeOwners.md
content/en/methods/page/CurrentSection.md
content/en/methods/page/File.md
content/en/methods/page/FirstSection.md
content/en/methods/page/Fragments.md
content/en/methods/page/GetPage.md
content/en/methods/page/GitInfo.md
content/en/methods/page/Next.md
content/en/methods/page/NextInSection.md
content/en/methods/page/Page.md
content/en/methods/page/Params.md
content/en/methods/page/Parent.md
content/en/methods/page/Permalink.md
content/en/methods/page/Prev.md
content/en/methods/page/PrevInSection.md
content/en/methods/page/RelPermalink.md
content/en/methods/page/Resources.md
content/en/methods/page/Store.md
content/en/methods/page/Translations.md
content/en/methods/page/_common/scratch-methods.md
content/en/methods/pages/Next.md
content/en/methods/pages/Prev.md
content/en/methods/resource/Exif.md
content/en/methods/shortcode/Page.md
content/en/methods/site/DisqusShortname.md
content/en/methods/site/GetPage.md
content/en/methods/site/GoogleAnalytics.md
content/en/methods/site/Home.md
content/en/methods/site/IsDevelopment.md
content/en/methods/site/IsServer.md
content/en/methods/site/Menus.md
content/en/methods/taxonomy/_common/ordered-taxonomy-element-methods.md
content/en/showcase/digitalgov/index.md
content/en/templates/internal.md
content/en/templates/lookup-order.md
content/en/templates/shortcode-templates.md
content/en/tools/search.md
content/en/troubleshooting/deprecation.md
content/en/troubleshooting/faq.md
content/en/troubleshooting/performance.md
data/docs.yaml
go.mod
go.sum
hugo.toml
layouts/shortcodes/new-in.html [deleted file]
netlify.toml

index ae469d6461139d8e362d35023bef1b9acc59167e..1c386ee296969576d0e260811428ca17cd127ce1 100644 (file)
@@ -7,8 +7,10 @@
   "flagWords": [
     "alot",
     "hte",
+    "langauge",
     "reccommend",
-    "seperate"
+    "seperate",
+    "teh"
   ],
   "ignorePaths": [
     "**/emojis.md",
@@ -69,6 +71,7 @@
     "transpile",
     "transpiles",
     "unmarshal",
+    "unmarshals",
     "unmarshaling",
     "# ----------------------------------------------------------------------",
     "# cspell: ignore foreign language words",
index a650f153c9ffd6cabac62df141095ab00fe6eed0..86f8f53a5ccb98aafa229361d6c71659a98e8057 100644 (file)
@@ -13,7 +13,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - uses: streetsidesoftware/cspell-action@v4
+      - uses: streetsidesoftware/cspell-action@v5
         with:
           check_dot_files: false
           files: content/**/*.md
index 58f84dc67a35f6a1e9d7c3bedcad2b7b2b7b578d..d9c2c5a674367b41d10025da685f64e106a74334 100644 (file)
@@ -1,5 +1,6 @@
 # https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
 
+MD001: false
 MD002: false
 MD003: false
 MD004: false
index d0e6453850cdc366873ec380a0a46d16adda1d4c..40bda0ce9bdfe21bddbf2fb9de8b14580fddd937 100644 (file)
@@ -1,4 +1,4 @@
-// Grab any element that has the 'js-toggle' class and add an event listner for the toggleClass function
+// Grab any element that has the 'js-toggle' class and add an event listener for the toggleClass function
 var toggleBtns = document.getElementsByClassName('js-toggle')
   for (var i = 0; i < toggleBtns.length; i++) {
     toggleBtns[i].addEventListener('click', toggleClass, false)
index 7b3d58c2df58e2c586c84ab72b24c1d57bf6aa48..5583d53d7bc5a7ec86f6a33164a45f6c8fd4e437 100644 (file)
@@ -201,7 +201,7 @@ either of these shortcodes in conjunction with this render hook.
   Validates the fragment portion of a link destination.
 
   @context {string} contentPath The page containing the link.
-  @context {srting} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
+  @context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
   @context {page} page The page corresponding to the link destination
   @context {struct} parsedURL The link destination parsed by urls.Parse.
   @context {string} renderHookName The name of the render hook.
index ce16953c8dd7b200c78d4e3e5799908494813c67..7451c15d631a1bac0cfcd12d4b24f775566ad429 100644 (file)
@@ -1,9 +1,21 @@
-{{/*
-  Disable Twitter for now as we lost access to the account.
-  with site.Params.social.twitter }}
-  <a href="https://twitter.com/intent/follow?screen_name={{ . }}" title="Follow on Twitter" class="link-transition twitter link dib z-999 pt3 pt0-l mr2">
-    {{ partial "svg/twitter.svg" (dict "size" "32px") }}
-  </a>
-{{ end */}}
-  <a rel="me" class="mstdn mr3" href="https://fosstodon.org/@gohugoio" target="_blank">gohugoio</a>
-  <a class="github-button needs-js link primary-color-dark" href="https://github.com/gohugoio/hugo" data-size="large" data-show-count="false" aria-label="Star gohugoio/hugo on GitHub">Star</a>
+<a
+  href="https://twitter.com/intent/follow?screen_name=gohugoiov2"
+  title="Follow on Twitter"
+  class="link-transition twitter link dib z-999 pt3 pt0-l mr2">
+  {{ partial "svg/twitter.svg" (dict "size" "32px") }}
+</a>
+<a
+  rel="me"
+  class="mstdn mr3"
+  href="https://fosstodon.org/@gohugoio"
+  target="_blank"
+  >gohugoio</a
+>
+<a
+  class="github-button needs-js link primary-color-dark"
+  href="https://github.com/gohugoio/hugo"
+  data-size="large"
+  data-show-count="false"
+  aria-label="Star gohugoio/hugo on GitHub"
+  >Star</a
+>
index cab85541d0403f85c35e065d1e069ee5e3998b91..7219d7f541a8f797d8f9fac1128e137166e49c23 100644 (file)
@@ -5,7 +5,7 @@
   {{ $href := printf "https://github.com/gohugoio/hugo/releases/tag/%s" $version }}
   <aside>
     <div class="admonition-content bl bw2 b--dark-red" >
-      <p>Deprecated in <a href="{{ $href }}">{{ $version }}</a></p>
+      <p>Deprecated in <a href="{{ $href }}">{{ $version }}</a>.</p>
       {{ $.Inner }}
     </div>
   </aside>
index ea5b6de1d8a86a2191e69c53b550fdbae0e727d9..50d4da9edbaf1fe62e604f9f2dbbb3d49310da1f 100644 (file)
@@ -100,7 +100,7 @@ Renders the given image using the given filter, if any.
   "fontSize" 64
   "lineHeight" 1.2
   "fontColor" "#ffffff"
-  "fontPath" "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Regular.ttf"
+  "fontPath" "https://github.com/google/fonts/raw/main/ofl/lato/Lato-Regular.ttf"
 }}
 
 {{- /* Get and validate parameters. */}}
@@ -119,9 +119,10 @@ Renders the given image using the given filter, if any.
 {{- end }}
 
 {{- $validFilters := slice
-  "brightness" "colorbalance" "colorize" "contrast" "gamma" "gaussianblur"
-  "grayscale" "hue" "invert" "none" "opacity" "overlay" "padding" "pixelate"
-  "process" "saturation" "sepia" "sigmoid" "text" "unsharpmask"
+  "autoorient" "brightness" "colorbalance" "colorize" "contrast" "gamma"
+  "gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay"
+  "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
+  "unsharpmask"
 }}
 
 {{- with $filter }}
@@ -157,7 +158,11 @@ Renders the given image using the given filter, if any.
 {{- /* Create filter. */}}
 {{- $f := "" }}
 {{- $ctx := dict "filter" $filter "args" $filterArgs "name" .Name "position" .Position }}
-{{- if eq $filter "brightness" }}
+{{- if eq $filter "autoorient" }}
+  {{- $ctx = merge $ctx (dict "argsRequired" 0) }}
+  {{- template "validate-arg-count" $ctx }}
+  {{- $f = images.AutoOrient }}
+{{- else if eq $filter "brightness" }}
   {{- $ctx = merge $ctx (dict "argsRequired" 1) }}
   {{- template "validate-arg-count" $ctx }}
   {{- $filterArgs = apply $filterArgs "float" "." }}
index a13dd756a446d0576dc479ce415dce1885d347d3..9ad6e4ecb0f975a4c749387be10d26d047a1d5f1 100644 (file)
@@ -3,7 +3,7 @@ Renders the page using the RenderShortcode method on the Page object.
 
 You must call this shortcode using the {{% %}} notation.
 
-@param {string} (postional parameter 0) The path to the page, relative to the content directory.
+@param {string} (positional parameter 0) The path to the page, relative to the content directory.
 @returns template.HTML
 
 @example {{% include "functions/_common/glob-patterns" %}}
index 07a41d613a1255fce1fa6e9bc42a83b912e4760a..73e7f85a9820a38582ac98c4307292be8657c579 100644 (file)
@@ -1,5 +1,5 @@
 {{- /*
-Renders a desciption list of the pages in the given section.
+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.
index 9236cf2bc857b5ac24d1337612e075203a3f182b..e22a91f3d9649e3ee281ff4157652cae3b6aaac7 100644 (file)
@@ -1,13 +1,36 @@
-{{ $version := .Get 0 }}
-{{ if not $version }}
-  {{ errorf "Missing version in new-in shortcode " }}
-{{ end }}
-{{ $version = $version | strings.TrimPrefix "v" }}
-<button
-  class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow">
-  <a
-    href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}"
-    target="_blank"
-    >New in v{{ $version }}</a
-  >
-</button>
+{{- /*
+Renders a "new in" button indicating the version in which a feature was added.
+
+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} version The semantic version string, with or without a leading v.
+@returns {template.HTML}
+
+@example {{< new-in 0.100.0 >}}
+*/}}
+
+{{- /* Set defaults. */}}
+{{- $majorVersionDiffThreshold := 0 }}
+{{- $minorVersionDiffThreshold := 30 }}
+{{- $displayExpirationWarning := true }}
+
+{{- /* Render. */}}
+{{- with $version := .Get 0 | strings.TrimPrefix "v" }}
+  {{- $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 }}
+    <button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow">
+      <a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}">New in v{{ $version }}</a>
+    </button>
+  {{- end }}
+{{- else }}
+  {{- errorf "The %q shortcode requires a positional parameter (version). See %s" .Name .Position }}
+{{- end -}}
index 250bfc0657041d7cf3dce0b35c6170c268df0f51..fc53c93bd8f7c26350a79dd1c67b9ba1078a3420 100644 (file)
@@ -1,5 +1,5 @@
 {{/*
-Renders the child sections of the given top-level section, listing each childs's immediate descendants.
+Renders the child sections of the given top-level section, listing each child's immediate descendants.
 
 @param {string} section The top-level section to render.
 @returns template.HTML
@@ -11,7 +11,7 @@ Renders the child sections of the given top-level section, listing each childs's
 {{ with .Get "section" }}
   {{ $section = . }}
 {{ else }}
-  {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Postion }}
+  {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Position }}
 {{ end }}
 
 {{/* Do not change the markdown indentation, and do not remove blank lines. */}}
@@ -24,7 +24,9 @@ Renders the child sections of the given top-level section, listing each childs's
     {{ range .Pages }}
       {{ $aliases := "" }}
       {{ if eq .Section "functions" }}
-        {{ $aliases = delimit .Params.action.aliases " or " }}
+        {{ with .Params.action.aliases }}
+          {{ $aliases = delimit . " or " }}
+        {{ end }}
       {{ end }}
 
 [{{ .LinkTitle }}]({{ .RelPermalink }}) {{ with $aliases }}({{ . }}){{ end }}
@@ -33,5 +35,5 @@ Renders the child sections of the given top-level section, listing each childs's
     {{ end }}
   {{ end }}
 {{ else }}
-  {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Postion }}
+  {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }}
 {{ end }}
index 7a692e0cefbb8422618a6bafdba8a7f710630717..a7e53c51cfe8d9c2d30bdec43d9832ca2f688291 100644 (file)
@@ -1 +1 @@
-# github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e
+# github.com/gohugoio/gohugoioTheme v0.0.0-20240125093153-bea12fdc0b15
diff --git a/assets/images/examples/landscape-exif-orientation-5.jpg b/assets/images/examples/landscape-exif-orientation-5.jpg
new file mode 100644 (file)
index 0000000..ad64835
Binary files /dev/null and b/assets/images/examples/landscape-exif-orientation-5.jpg differ
index b41679c61ce2ef9de44448d6b19341b9bebaa944..dddd53b5bd4708c9b70180a39087ef3af557a4b7 100644 (file)
@@ -21,7 +21,7 @@ flex_box_interior_classes = "flex-auto w-100 w-40-l mr3 mb3 bg-white ba b--moon-
 #sidebar_direction = "sidebar_left"
 
 [social]
-twitter = "GoHugoIO"
+  twitter = "GoHugoIOv2"
 
 [render_hooks.link]
-errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
+  errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
index 5f2f9660b4eadb17d524ae65d465c5e10997e569..6e58b36e490fb61775122f4af7fa7c1e332b6a6b 100644 (file)
@@ -25,7 +25,8 @@ Hugo comes with all the code you need to load Disqus into your templates. Before
 Disqus comments require you set a single value in your [site's configuration file][configuration] like so:
 
 {{< code-toggle file=hugo >}}
-disqusShortname = "yourDisqusShortname"
+[services.disqus]
+shortname = 'your-disqus-shortname'
 {{</ code-toggle >}}
 
 For many websites, this is enough configuration. However, you also have the option to set the following in the [front matter] of a single content file:
@@ -47,6 +48,7 @@ Disqus has its own [internal template](/templates/internal/#disqus) available, t
 These are some alternatives to Disqus:
 
 * [Cactus Comments](https://cactus.chat/docs/integrations/hugo/) (Open Source, Matrix appservice, Docker install)
+* [Comentario](https://gitlab.com/comentario/comentario) (Open Source, self-hosted, Go/Angular, run locally, in Docker or Kubernetes)
 * [Commento](https://commento.io/) (Open Source, available as a service, local install, or docker image)
 * [Giscus](https://giscus.app/) (Open source, comments system powered by GitHub Discussions)
 * [Graph Comment](https://graphcomment.com/)
index 51136570002c66426e52236566a4b51e372e644e..9a4f55da197bed0b69c376358f331dd2243233fa 100644 (file)
@@ -505,7 +505,7 @@ hugo --gc
 [mounted]: /hugo-modules/configuration#module-configuration-mounts
 [page bundle]: /content-management/page-bundles
 [`lang.FormatNumber`]: /functions/lang/formatnumber
-[filters]: /functions/images
+[filters]: /functions/images/filter/#image-filters
 [github.com/disintegration/imaging]: <https://github.com/disintegration/imaging#image-resizing>
 [Smartcrop]: <https://github.com/muesli/smartcrop#smartcrop>
 [Exif]: <https://en.wikipedia.org/wiki/Exif>
index e2a72f12434e4294124967a061b39957cc44cb99..1f5d1ef71d80879f8829312a231477e47836d0e7 100644 (file)
@@ -48,7 +48,7 @@ To add a page to the "main" menu:
 
 {{< code-toggle file=content/about.md fm=true >}}
 title = 'About'
-menu = 'main'
+menus = 'main'
 {{< /code-toggle >}}
 
 Access the entry with `site.Menus.main` in your templates. See [menu templates] for details.
@@ -57,11 +57,15 @@ To add a page to the "main" and "footer" menus:
 
 {{< code-toggle file=content/contact.md fm=true >}}
 title = 'Contact'
-menu = ['main','footer']
+menus = ['main','footer']
 {{< /code-toggle >}}
 
 Access the entry with `site.Menus.main` and `site.Menus.footer` in your templates. See [menu templates] for details.
 
+{{% note %}}
+The configuration key in the examples above is `menus`. The `menu` (singular) configuration key is an alias for `menus`.
+{{% /note %}}
+
 ### Properties {#properties-front-matter}
 
 Use these properties when defining menu entries in front matter:
@@ -96,11 +100,11 @@ This front matter menu entry demonstrates some of the available properties:
 
 {{< code-toggle file=content/products/software.md fm=true >}}
 title = 'Software'
-[menu.main]
+[[menus.main]]
 parent = 'Products'
 weight = 20
 pre = '<i class="fa-solid fa-code"></i>'
-[menu.main.params]
+[menus.main.params]
 class = 'center'
 {{< /code-toggle >}}
 
@@ -111,17 +115,17 @@ Access the entry with `site.Menus.main` in your templates. See [menu templates]
 To define entries for the "main" menu:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Home'
 pageRef = '/'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Products'
 pageRef = '/products'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Services'
 pageRef = '/services'
 weight = 30
@@ -132,12 +136,12 @@ This creates a menu structure that you can access with `site.Menus.main` in your
 To define entries for the "footer" menu:
 
 {{< code-toggle file=hugo >}}
-[[menu.footer]]
+[[menus.footer]]
 name = 'Terms'
 pageRef = '/terms'
 weight = 10
 
-[[menu.footer]]
+[[menus.footer]]
 name = 'Privacy'
 pageRef = '/privacy'
 weight = 20
@@ -145,6 +149,10 @@ weight = 20
 
 This creates a menu structure that you can access with `site.Menus.footer` in your templates. See [menu templates] for details.
 
+{{% note %}}
+The configuration key in the examples above is `menus`. The `menu` (singular) configuration key is an alias for `menus`.
+{{% /note %}}
+
 ### Properties {#properties-site-configuration}
 
 {{% note %}}
@@ -177,34 +185,34 @@ url
 This nested menu demonstrates some of the available properties:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Products'
 pageRef = '/products'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Hardware'
 pageRef = '/products/hardware'
 parent = 'Products'
 weight = 1
 
-[[menu.main]]
+[[menus.main]]
 name = 'Software'
 pageRef = '/products/software'
 parent = 'Products'
 weight = 2
 
-[[menu.main]]
+[[menus.main]]
 name = 'Services'
 pageRef = '/services'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Hugo'
 pre = '<i class="fa fa-heart"></i>'
 url = 'https://gohugo.io/'
 weight = 30
-[menu.main.params]
+[menus.main.params]
 rel = 'external'
 {{< /code-toggle >}}
 
index 07eecbaaffa74f2417372f7c175cf4d042d33306..ea9f717870f372447aa27862ff2801ec51f2f86f 100644 (file)
@@ -71,7 +71,7 @@ disabled
 : (`bool`) If `true`, Hugo will not render content for this language. Default is `false`.
 
 languageCode
-: (`string`) The language tag as defined by [RFC 5646]. This value may include upper and lower case characters, hyphens or underscores, and does not affect localization or URLs. Hugo uses this value to populate the `language` element in the [built-in RSS template], and the `lang` attribute of the `html` element in the [built-in alias template]. Examples:
+: (`string`) The language tag as defined by [RFC 5646]. This value may include upper and lower case characters, hyphens, or underscores, and does not affect localization or URLs. Hugo uses this value to populate the `language` element in the [built-in RSS template], and the `lang` attribute of the `html` element in the [built-in alias template]. Examples:
 
 - `en`
 - `en-GB`
@@ -546,12 +546,12 @@ languageCode = 'de-DE'
 languageName = 'Deutsch'
 weight = 1
 
-[[languages.de.menu.main]]
+[[languages.de.menus.main]]
 name = 'Produkte'
 pageRef = '/products'
 weight = 10
 
-[[languages.de.menu.main]]
+[[languages.de.menus.main]]
 name = 'Leistungen'
 pageRef = '/services'
 weight = 20
@@ -561,12 +561,12 @@ languageCode = 'en-US'
 languageName = 'English'
 weight = 2
 
-[[languages.en.menu.main]]
+[[languages.en.menus.main]]
 name = 'Products'
 pageRef = '/products'
 weight = 10
 
-[[languages.en.menu.main]]
+[[languages.en.menus.main]]
 name = 'Services'
 pageRef = '/services'
 weight = 20
@@ -579,13 +579,12 @@ With a more complex menu structure, create a [configuration directory] and split
 ```text
 config/
 └── _default/
-    ├── menus/
-    │  ├── menu.de.toml
-    │  └── menu.en.toml
+    ├── menus.de.toml
+    ├── menus.en.toml
     └── hugo.toml
 ```
 
-{{< code-toggle file=config/_default/menus/menu.de >}}
+{{< code-toggle file=config/_default/menus.de >}}
 [[main]]
 name = 'Produkte'
 pageRef = '/products'
@@ -596,7 +595,7 @@ pageRef = '/services'
 weight = 20
 {{< /code-toggle >}}
 
-{{< code-toggle file=config/_default/menus/menu.en >}}
+{{< code-toggle file=config/_default/menus.en >}}
 [[main]]
 name = 'Products'
 pageRef = '/products'
@@ -627,12 +626,12 @@ The `identifier` depends on how you define menu entries:
 For example, if you define menu entries in site configuration:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
   identifier = 'products'
   name = 'Products'
   pageRef = '/products'
   weight = 10
-[[menu.main]]
+[[menus.main]]
   identifier = 'services'
   name = 'Services'
   pageRef = '/services'
index 2ff1fec343aa782e68bb6fe658c6ab71151a15f9..22ed3fc81cbeb755fbfea265415298cdfac3ecd2 100644 (file)
@@ -73,7 +73,7 @@ Cons
 
 Because there are multiple ways in which a summary can be specified it is useful to understand the order of selection Hugo follows when deciding on the text to be returned by `.Summary`. It is as follows:
 
-1. If there is a `<!--more-->`> summary divider present in the article the text up to the divider will be provided as per the manual summary split method
+1. If there is a `<!--more-->` summary divider present in the article, the text up to the divider will be provided as per the manual summary split method
 2. If there is a `summary` variable in the article front matter the value of the variable will be provided as per the front matter summary method
 3. The text at the start of the article will be provided as per the automatic summary split method
 
index 14df5cdee3f6e0a728a98a06b1d03177de1da020..862df619f8c453d9891a4c7c1be60439da1c7315 100644 (file)
@@ -100,7 +100,7 @@ Level 6 markdown headings are styled as `dt` elements. This was implemented to s
 
 ## Code examples
 
-Indent code by two spaces. With examples of template code, include a space after opening action delimiters, and include a space before closing action delimeters.
+Indent code by two spaces. With examples of template code, include a space after opening action delimiters, and include a space before closing action delimiters.
 
 ### Fenced code blocks
 
@@ -269,7 +269,7 @@ Use the "note" shortcode with `{{%/* */%}}` delimiters to call attention to impo
 Use the [`math.Mod`] function to control...
 
 [`math.Mod`]: /functions/math/mod/
-{{%/* /code */%}}
+{{%/* /note */%}}
 ```
 
 Rendered:
@@ -278,7 +278,7 @@ Rendered:
 Use the [`math.Mod`] function to control...
 
 [`math.Mod`]: /functions/math/mod/
-{{% /code %}}
+{{% /note %}}
 
 ## New features
 
@@ -306,13 +306,9 @@ When deprecating a function or method, add this to front matter:
 
 {{< code-toggle file=content/something/foo.md fm=true >}}
 expiryDate: 2024-10-30
-_build:
-  list: never
 {{< /code-toggle >}}
 
-Set the `expiryDate` to one year from the date of deprecation, and add a brief front matter comment to explain the settings.
-
-Users will be able to search for the page, but the page will not appear in any list views, including section menus.
+Set the `expiryDate` to one year from the date of deprecation, and add a brief front matter comment to explain the setting.
 
 ## GitHub workflow
 
@@ -348,13 +344,13 @@ Closes #1234
 Closes #5678"
 ```
 
-Step 5
+Step 6
 : Push the new branch to your fork of the documentation repository.
 
-Step 6
+Step 7
 : Visit the [documentation repository] and create a pull request (PR).
 
-Step 7
+Step 8
 : A project maintainer will review your PR and may request changes. You may delete your branch after the maintainer merges your PR.
 
 [ATX]: https://spec.commonmark.org/0.30/#atx-headings
index 5632dccfbb637db4e6f1130062a3344d2223df11..cb29dc2f29133f0290ddded089d8d3bf29f34fcc 100644 (file)
@@ -7,7 +7,6 @@ action:
   aliases: [append]
   related:
     - functions/collections/Merge
-    - functions/collections/Slice
   returnType: any
   signatures:
     - collections.Append ELEMENT [ELEMENT...] COLLECTION
@@ -82,7 +81,7 @@ To create a slice of slices, starting with an empty slice:
 {{ $s = $s | append (slice (slice "a" "b")) }}
 {{ $s }} → [[a b]]
 
-{{ $s = $s | append  (slice "c" "d") }}
+{{ $s = $s | append (slice "c" "d") }}
 {{ $s }} → [[a b] [c d]]
 ```
 
index abd6fca77671ae1ff71e9919432e331419750c41..9153e546aeafaaecde6ef0d91d4cd1233f0f6db5 100644 (file)
@@ -5,14 +5,9 @@ categories: []
 keywords: []
 action:
   aliases: [apply]
+  related: []
   returnType: '[]any'
   signatures: [collections.Apply COLLECTION FUNCTION PARAM...]
-relatedFunctions:
-  - collections.Delimit
-  - collections.In
-  - collections.Reverse
-  - collections.Seq
-  - collections.Slice
 aliases: [/functions/apply]
 ---
 
index 6aea467ee17ee895a4e35cd2f138faa7a8928c3d..b85059d4b2ba3ef777e261bf050ddf90e42f0904 100644 (file)
@@ -6,11 +6,6 @@ keywords: []
 action:
   aliases: [delimit]
   related:
-    - functions/collections/Apply
-    - functions/collections/In
-    - functions/collections/Reverse
-    - functions/collections/Seq
-    - functions/collections/Slice
     - functions/strings/Split
   returnType: string
   signatures: ['collections.Delimit COLLECTION DELIMITER [LAST]']
index 2e933aca9789caccad9470fed004f6f0184227be..f46b02e755ba985ace9d7ae510985392538c3602 100644 (file)
@@ -6,10 +6,7 @@ keywords: []
 action:
   aliases: [dict]
   related:
-    - functions/collections/Group
-    - functions/collections/IndexFunction
-    - functions/collections/IsSet
-    - functions/collections/Where
+    - functions/collections/Slice
   returnType: mapany
   signatures: ['collections.Dictionary KEY VALUE [VALUE...]']
 aliases: [/functions/dict]
index 49a0362f576c43e81fb4ab5dcfc857440065a7fd..cb2397af1c2114e440a075f38596b64d5da1538c 100644 (file)
@@ -8,6 +8,7 @@ action:
   related:
     - functions/collections/After
     - functions/collections/Last
+    - methods/pages/Limit
   returnType: any
   signatures: [collections.First N COLLECTION]
 aliases: [/functions/first]
index 74aa869df2c03106763e62f0b26d78c819ee9e0f..2f5a333c0bb05c58914fdcb93d430cfdf75fb0f7 100644 (file)
@@ -5,11 +5,7 @@ categories: []
 keywords: []
 action:
   aliases: [group]
-  related:
-    - functions/collections/Dictionary
-    - functions/collections/IndexFunction
-    - functions/collections/IsSet
-    - functions/collections/Where
+  related: []
   returnType: any
   signatures: [collections.Group KEY PAGES]
 aliases: [/functions/group]
index a3ec83d9b679f070634ad42ce613ff20bd60765b..131c0abcfd397424ae0b55978ec385b2464f09ee 100644 (file)
@@ -6,7 +6,6 @@ keywords: []
 action:
   aliases: [in]
   related:
-    - functions/collections/Slice
     - functions/strings/Contains
     - functions/strings/ContainsAny
     - functions/strings/ContainsNonSpace
index e595d2b413a2a9026ad0270f99a432be8052221c..6482884fd3c51f2f4e80b37f2483076cc001a800 100644 (file)
@@ -5,11 +5,7 @@ categories: []
 keywords: []
 action:
   aliases: [index]
-  related:
-    - functions/collections/Dictionary
-    - functions/collections/Group
-    - functions/collections/IsSet
-    - functions/collections/Where
+  related: []
   returnType: any
   signatures:
     - collections.Index COLLECTION INDEXES
index 76b336ae37762dc6a546ff4e9f293d2bbfa64cdd..62b81b712a92a09a47552afcde07bd1e96c57c3f 100644 (file)
@@ -6,10 +6,6 @@ keywords: []
 action:
   aliases: [isset]
   related:
-    - functions/collections/Dictionary
-    - functions/collections/Group
-    - functions/collections/IndexFunction
-    - functions/collections/Where
     - functions/go-template/if
     - functions/go-template/with
   returnType: bool
index 793b2b4b58af3f588db02df27171e7df71bfff13..96f85a8d00213bbfbb05981d01765de2b12e4331 100644 (file)
@@ -8,6 +8,7 @@ action:
   related:
     - methods/page/scratch
     - methods/page/store
+    - methods/shortcode/scratch
   returnType: maps.Scratch
   signatures: [collections.NewScratch ]
 ---
@@ -20,16 +21,18 @@ The `collections.NewScratch` function creates a locally scoped [scratch pad] to
 
 ## Methods
 
-Set
-: Sets the value of a given key.
+###### Set
+
+Sets the value of a given key.
 
 ```go-html-template
 {{ $s := newScratch }}
 {{ $s.Set "greeting" "Hello" }}
 ```
 
-Get
-: Gets the value of a given key.
+###### Get
+
+Gets the value of a given key.
 
 ```go-html-template
 {{ $s := newScratch }}
@@ -37,10 +40,11 @@ Get
 {{ $s.Get "greeting" }} → Hello
 ```
 
-Add
-: Adds a given value to existing value(s) of the given key.
+###### Add
 
-: For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
+Adds a given value to existing value(s) of the given key.
+
+For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
 
 ```go-html-template
 {{ $s := newScratch }}
@@ -63,8 +67,9 @@ Add
 {{ $s.Get "greetings" }} → [Hello Welcome Cheers]
 ```
 
-SetInMap
-: Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
+###### SetInMap
+
+Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
 
 ```go-html-template
 {{ $s := newScratch }}
@@ -73,8 +78,9 @@ SetInMap
 {{ $s.Get "greetings" }} → map[english:Hello french:Bonjour]
 ```
 
-DeleteInMap
-: Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
+###### DeleteInMap
+
+Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
 
 ```go-html-template
 {{ $s := newScratch }}
@@ -84,8 +90,9 @@ DeleteInMap
 {{ $s.Get "greetings" }} → map[french:Bonjour]
 ```
 
-GetSortedMapValues
-: Returns an array of values from `key` sorted by `mapKey`.
+###### GetSortedMapValues
+
+Returns an array of values from `key` sorted by `mapKey`.
 
 ```go-html-template
 {{ $s := newScratch }}
@@ -94,8 +101,9 @@ GetSortedMapValues
 {{ $s.GetSortedMapValues "greetings" }} → [Hello Bonjour]
 ```
 
-Delete
-: Removes the given key.
+###### Delete
+
+Removes the given key.
 
 ```go-html-template
 {{ $s := newScratch }}
@@ -103,8 +111,9 @@ Delete
 {{ $s.Delete "greeting" }}
 ```
 
-Values
-: Returns the raw backing map. Do not use with `Scratch` or `Store` methods on a `Page` object due to concurrency issues.
+###### Values
+
+Returns the raw backing map. Do not use with `Scratch` or `Store` methods on a `Page` object due to concurrency issues.
 
 ```go-html-template
 {{ $s := newScratch }}
index e195c417ff76cffff729b7dd51df68dcba55d85e..ea0434fc5a63c8abe952da6fa3752a458bec6e45 100644 (file)
@@ -5,13 +5,12 @@ categories: []
 keywords: []
 action:
   aliases: [querify]
+  related:
+    - functions/go-template/urlquery.md
   returnType: string
   signatures:
     - collections.Querify VALUE [VALUE...]
     - collections.Querify COLLECTION
-related:
-  - collections.Querify
-  - urlquery
 aliases: [/functions/querify]
 ---
 
index 12c964c76e40396ddcde8685055032717c2ee9bd..d0a449763e7c27d1f4d5c9787c8c2e853107e43c 100644 (file)
@@ -5,15 +5,12 @@ categories: []
 keywords: []
 action:
   aliases: []
+  related:
+    - functions/collections/Sort
+    - functions/collections/Shuffle
+    - functions/collections/Uniq
   returnType: any
   signatures: [collections.Reverse COLLECTION]
-related:
-  - collections.Apply
-  - collections.Delimit
-  - collections.In
-  - collections.Reverse
-  - collections.Seq
-  - collections.Slice
 aliases: [/functions/collections.reverse]
 ---
 
index e7430e0d0d730afe83acc2d3cbe4985cbf088e06..b572bd7c0d63c093f70ef01973e70a5638072e41 100644 (file)
@@ -5,18 +5,12 @@ categories: []
 keywords: []
 action:
   aliases: [seq]
+  related: []
   returnType: '[]int'
   signatures:
     - collections.Seq LAST
     - collections.Seq FIRST LAST
     - collections.Seq FIRST INCREMENT LAST
-related:
-  - collections.Apply
-  - collections.Delimit
-  - collections.In
-  - collections.Reverse
-  - collections.Seq
-  - collections.Slice
 aliases: [/functions/seq]
 ---
 
@@ -27,7 +21,7 @@ aliases: [/functions/seq]
 {{ seq -2 2 2 }} → [-2 0 2]
 ```
 
-Iterate over a sequence of integers:
+A contrived example of iterating over a sequence of integers:
 
 ```go-html-template
 {{ $product := 1 }}
@@ -37,10 +31,6 @@ Iterate over a sequence of integers:
 {{ $product }} → 24
 ```
 
-The example above is contrived. To calculate the product of 2 or more numbers, use the [`math.Product`] function:
-
-```go-html-template
-{{ math.Product (seq 4) }} → 24
-```
-
-[`math.Product`]: /functions/math/product
+{{% note %}}
+The slice created by the `seq` function is limited to 2000 elements.
+{{% /note %}}
index 18b8cc664cd338462302c611f98bc3b19b15f0b1..0f28eb4d80e6db71a0ce973e36b3a17a7dabc8ab 100644 (file)
@@ -5,13 +5,12 @@ categories: []
 keywords: []
 action:
   aliases: [shuffle]
+  related:
+    - functions/collections/Reverse
+    - functions/collections/Sort
+    - functions/collections/Uniq
   returnType: any
   signatures: [collections.Shuffle COLLECTION]
-related:
-  - collections.Reverse
-  - collections.Shuffle
-  - collections.Sort
-  - collections.Uniq
 aliases: [/functions/shuffle]
 ---
 
index e24b394ca6b9b844ef47212032db1893a192e688..56c068d4b5b3f4b268858f0fd635a7fbb383ae06 100644 (file)
@@ -5,16 +5,10 @@ categories: []
 keywords: []
 action:
   aliases: [slice]
+  related:
+    - functions/collections/Dictionary
   returnType: any
   signatures: [collections.Slice ITEM...]
-related:
-  - collections.Append
-  - collections.Apply
-  - collections.Delimit
-  - collections.In
-  - collections.Reverse
-  - collections.Seq
-  - collections.Slice
 aliases: [/functions/slice]
 ---
 
index 6b9ea2c34c9e09cb443ec7ca63217d03c8e26457..2277f883c01a2fb88fb0503fc53e2b0a7d4734b9 100644 (file)
@@ -5,13 +5,13 @@ categories: []
 keywords: []
 action:
   aliases: [sort]
+  related:
+    - functions/collections/Reverse
+    - functions/collections/Shuffle
+    - functions/collections/Uniq
   returnType: any
   signatures: ['collections.Sort COLLECTION [KEY] [ORDER]']
-related:
-  - collections.Reverse
-  - collections.Shuffle
-  - collections.Sort
-  - collections.Uniq
+toc: true
 aliases: [/functions/sort]
 ---
 
@@ -105,6 +105,40 @@ This produces:
 Victor Marius Jean
 ```
 
+### First level key removal
+
+Hugo removes the first level keys when sorting a map.
+
+Original map:
+
+```json
+{
+  "felix": {
+    "breed": "malicious",
+    "type": "cat"
+  },
+  "spot": {
+    "breed": "boxer",
+    "type": "dog"
+  }
+}
+```
+
+After sorting:
+
+```json
+[
+  {
+    "breed": "malicious",
+    "type": "cat"
+  },
+  {
+    "breed": "boxer",
+    "type": "dog"
+  }
+]
+```
+
 ## Sort a page collection
 
 {{% note %}}
index 828c10ce532597846077f3920252373c0d92d3b7..7eba3ef429f89aee6f3b30acd1eb2724916de3aa 100644 (file)
@@ -5,13 +5,13 @@ categories: []
 keywords: []
 action:
   aliases: [symdiff]
+  related:
+    - functions/collections/Complement
+    - functions/collections/Intersect
+    - functions/collections/SymDiff
+    - functions/collections/Union
   returnType: any
   signatures: [COLLECTION | collections.SymDiff COLLECTION]
-related:
-  - collections.Complement
-  - collections.Intersect
-  - collections.SymDiff
-  - collections.Union
 aliases: [/functions/symdiff]
 ---
 
index e2eb6131337d7448911231d47f9a6fd7d253eb87..7fed49a1086ad839da2ae77276e506ecb694de6d 100644 (file)
@@ -5,13 +5,13 @@ categories: []
 keywords: []
 action:
   aliases: [union]
+  related:
+    - functions/collections/Complement
+    - functions/collections/Intersect
+    - functions/collections/SymDiff
+    - functions/collections/Union
   returnType: any
   signatures: [collections.Union SET1 SET2]
-related:
-  - collections.Complement
-  - collections.Intersect
-  - collections.SymDiff
-  - collections.Union
 aliases: [/functions/union] 
 ---
 
index 8266142ac715fcae69091e2538e269f8ba19c4a4..02b590c1874ff65bd4a55ca2e6c4ce94e2839e8c 100644 (file)
@@ -5,13 +5,13 @@ categories: []
 keywords: []
 action:
   aliases: [uniq]
+  related:
+    - functions/collections/Reverse
+    - functions/collections/Shuffle
+    - functions/collections/Sort
+    - functions/collections/Uniq
   returnType: any
   signatures: [collections.Uniq COLLECTION]
-related:
-  - collections.Reverse
-  - collections.Shuffle
-  - collections.Sort
-  - collections.Uniq
 aliases: [/functions/uniq]
 ---
 
index e053ed3d555077cf1463a38129e31bbf7c02e5d1..ca900d85ef7d1a42d21652dffefcb92b3710f5c2 100644 (file)
@@ -5,16 +5,11 @@ categories: []
 keywords: []
 action:
   aliases: [where]
+  related: []
   returnType: any
   signatures: ['collections.Where COLLECTION KEY [OPERATOR] VALUE']
-related:
-  - collections.Dictionary
-  - collections.Group
-  - collections.Index
-  - collections.IsSet
-  - collections.Where 
-aliases: [/functions/where]
 toc: true
+aliases: [/functions/where]
 ---
 
 The `where` function returns the given collection, removing elements that do not satisfy the comparison condition. The comparison condition is comprised of the `KEY`, `OPERATOR`, and `VALUE` arguments:
@@ -37,9 +32,10 @@ Hugo will test for equality if you do not provide an `OPERATOR` argument. For ex
 The where function takes three or four arguments. The `OPERATOR` argument is optional.
 
 COLLECTION
-: (`any`) Typically a page collection or a [slice] of [maps].
+: (`any`) A [page collection] or a [slice] of [maps].
 
 [maps]: /getting-started/glossary/#map
+[page collection]: /getting-started/glossary/#page-collection
 [slice]: /getting-started/glossary/#slice
 
 KEY
@@ -50,7 +46,7 @@ KEY
 ```
 
 [chain]: /getting-started/glossary/#chain
-
+Typically a
 OPERATOR
 : (`string`) The logical comparison [operator](#operators).
 
@@ -64,7 +60,7 @@ Comparison|Result
 `false "eq" "false"`|`false`
 `false "eq" false`|`true`
 
-When one or both of the values to compare is a slice, use the `in`, `not in` or `intersect` operators as described below.
+When one or both of the values to compare is a slice, use the `in`, `not in`, or `intersect` operators as described below.
 
 ## Operators
 
@@ -123,14 +119,14 @@ Compare the value of the given field to an [`int`] or [`float`]:
 [`float`]: /getting-started/glossary/#float
 
 ```go-html-template
-{{ $sectionPages := where site.RegularPages "Section" "eq" "books" }}
-
-{{ $pages := where $sectionPages "Params.price" "eq" 42 }}
-{{ $pages := where $sectionPages "Params.price" "ne" 42.67 }}
-{{ $pages := where $sectionPages "Params.price" "ge" 42 }}
-{{ $pages := where $sectionPages "Params.price" "gt" 42.67 }}
-{{ $pages := where $sectionPages "Params.price" "le" 42 }}
-{{ $pages := where $sectionPages "Params.price" "lt" 42.67 }}
+{{ $books := where site.RegularPages "Section" "eq" "books" }}
+
+{{ $pages := where $books "Params.price" "eq" 42 }}
+{{ $pages := where $books "Params.price" "ne" 42.67 }}
+{{ $pages := where $books "Params.price" "ge" 42 }}
+{{ $pages := where $books "Params.price" "gt" 42.67 }}
+{{ $pages := where $books "Params.price" "le" 42 }}
+{{ $pages := where $books "Params.price" "lt" 42.67 }}
 ```
 
 ## Boolean comparison
@@ -140,12 +136,12 @@ Compare the value of the given field to a [`bool`]:
 [`bool`]: /getting-started/glossary/#bool
 
 ```go-html-template
-{{ $sectionPages := where site.RegularPages "Section" "eq" "books" }}
+{{ $books := where site.RegularPages "Section" "eq" "books" }}
 
-{{ $pages := where $sectionPages "Params.fiction" "eq" true }}
-{{ $pages := where $sectionPages "Params.fiction" "eq" false }}
-{{ $pages := where $sectionPages "Params.fiction" "ne" true }}
-{{ $pages := where $sectionPages "Params.fiction" "ne" false }}
+{{ $pages := where $books "Params.fiction" "eq" true }}
+{{ $pages := where $books "Params.fiction" "eq" false }}
+{{ $pages := where $books "Params.fiction" "ne" true }}
+{{ $pages := where $books "Params.fiction" "ne" false }}
 ```
 
 ## Member comparison
@@ -158,19 +154,19 @@ Compare a [`scalar`] to a [`slice`].
 For example, to return a collection of pages where the `color` page parameter is either "red" or "yellow":
 
 ```go-html-template
-{{ $sectionPages := where site.RegularPages "Section" "eq" "fruit" }}
+{{ $fruit := where site.RegularPages "Section" "eq" "fruit" }}
 
 {{ $colors := slice "red" "yellow" }}
-{{ $pages := where $sectionPages "Params.color" "in" $colors }}
+{{ $pages := where $fruit "Params.color" "in" $colors }}
 ```
 
 To return a collection of pages where the "color" page parameter is neither "red" nor "yellow":
 
 ```go-html-template
-{{ $sectionPages := where site.RegularPages "Section" "eq" "fruit" }}
+{{ $fruit := where site.RegularPages "Section" "eq" "fruit" }}
 
 {{ $colors := slice "red" "yellow" }}
-{{ $pages := where $sectionPages "Params.color" "not in" $colors }}
+{{ $pages := where $fruit "Params.color" "not in" $colors }}
 ```
 
 ## Intersection comparison
@@ -180,10 +176,10 @@ Compare a [`slice`] to a [`slice`], returning collection elements with common va
 For example, to return a collection of pages where any of the terms in the "genres" taxonomy are "suspense" or "romance":
 
 ```go-html-template
-{{ $sectionPages := where site.RegularPages "Section" "eq" "books" }}
+{{ $books := where site.RegularPages "Section" "eq" "books" }}
 
 {{ $genres := slice "suspense" "romance" }}
-{{ $pages := where $sectionPages "Params.genres" "intersect" $genres }}
+{{ $pages := where $books "Params.genres" "intersect" $genres }}
 ```
 
 ## Regular expression comparison
index 5c091ebee13d4d9f44bc1094aa3a6dc0e33843f1..eda303e62d4014ab2ff5cc2c49329d04d8f6c777 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: crypto.FNV32a
-description: Returns the FNV (Fowler–Noll–Vo) 32 bit hash of a given string.
+description: Returns the FNV (Fowler–Noll–Vo) 32-bit hash of a given string.
 categories: []
 keywords: []
 action:
@@ -15,7 +15,7 @@ action:
 aliases: [/functions/crypto.fnv32a]
 ---
 
-This function calculates the 32 bit [FNV1a hash](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash) of a given string according to the [specification](https://datatracker.ietf.org/doc/html/draft-eastlake-fnv-12):
+This function calculates the 32-bit [FNV1a hash](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash) of a given string according to the [specification](https://datatracker.ietf.org/doc/html/draft-eastlake-fnv-12):
 
 ```go-html-template
 {{ crypto.FNV32a "Hello world" }} → 1498229191
index 96812e7c063eae39dc96129179a791722253aad9..4db3c89880473a9a9182b3a19c8fb3ca245dfd00 100644 (file)
@@ -89,8 +89,7 @@ my-project/
 {{ $data := "" }}
 {{ $p := "data/books.json" }}
 {{ with resources.Get $p }}
-  {{ $opts := dict "delimiter" "," }}
-  {{ $data = . | transform.Unmarshal $opts }}
+  {{ $data = . | transform.Unmarshal }}
 {{ else }}
   {{ errorf "Unable to get resource %q" $p }}
 {{ end }}
@@ -113,8 +112,7 @@ my-project/
 {{ $data := "" }}
 {{ $p := "books.json" }}
 {{ with .Resources.Get $p }}
-  {{ $opts := dict "delimiter" "," }}
-  {{ $data = . | transform.Unmarshal $opts }}
+  {{ $data = . | transform.Unmarshal }}
 {{ else }}
   {{ errorf "Unable to get resource %q" $p }}
 {{ end }}
@@ -131,8 +129,7 @@ Consider using the [`resources.GetRemote`] function with [`transform.Unmarshal`]
   {{ with .Err }}
     {{ errorf "%s" . }}
   {{ else }}
-    {{ $opts := dict "delimiter" "," }}
-    {{ $data = . | transform.Unmarshal $opts }}
+    {{ $data = . | transform.Unmarshal }}
   {{ end }}
 {{ else }}
   {{ errorf "Unable to get remote resource %q" $u }}
index b07cf3cc3e8465bb50bbc27494cf4a35a7de2123..0a90251d3189082cc5b41c5380bdc7f1d4baf06b 100644 (file)
@@ -20,3 +20,14 @@ The `warnf` function evaluates the format string, then prints the result to the
 ```go-html-template
 {{ warnf "The %q shortcode was unable to find %s. See %s" .Name $file .Position }}
 ```
+
+To prevent suppression of duplicate messages when using `warnf` for debugging, make each message unique with the [`math.Counter`] function. For example:
+
+
+```go-html-template
+{{ range site.RegularPages }}
+  {{ .Section | warnf "%#[2]v [%[1]d]" math.Counter }}
+{{ end }}
+```
+
+[`math.Counter`]: /functions/math/counter
index e17fb076789f0515d0ef5e3e2b4c17e27e43ad82..6c96b747e19ffcde929fbf06299dfa3479d491d6 100644 (file)
@@ -86,7 +86,7 @@ Do not use the global `page` function in:
 - Partials called by shortcodes
 - Partials cached by the [`partialCached`] function
 
-Hugo caches rendered shortcodes. If you use the global `page` function within a shortcode, and the page content is rendered in two or more templates, the cached shortcodes may be incorrect.
+Hugo caches rendered shortcodes. If you use the global `page` function within a shortcode, and the page content is rendered in two or more templates, the cached shortcode may be incorrect.
 
 Consider this section template:
 
index e8642e50b0d844586ea49b777d32298c140511f7..e2f401371405ac8487a52c6a4fc7cbb9def189ce 100644 (file)
@@ -20,7 +20,7 @@ toc: true
 
 ```go-html-template
 {{ $s := slice "foo" "bar" "baz" }}
-{{ range $var }}
+{{ range $s }}
   {{ . }} → foo bar baz
 {{ end }}
 ```
index 1971819530d10aa99b03a30848c9c3e23f00bf4c..0f3255b1a823d12faa0c3f66c032c2bee1e22ed4 100644 (file)
@@ -36,7 +36,7 @@ Use with the [`else`] statement:
 {{ end }}
 ```
 
-Intialize a variable, scoped to the current block:
+Initialize a variable, scoped to the current block:
 
 ```go-html-template
 {{ with $var := 42 }}
diff --git a/content/en/functions/images/AutoOrient.md b/content/en/functions/images/AutoOrient.md
new file mode 100644 (file)
index 0000000..8f27a95
--- /dev/null
@@ -0,0 +1,52 @@
+---
+title: images.AutoOrient
+description: Returns an image filter that rotates and flips an image as needed per its EXIF orientation tag.
+categories: []
+keywords: []
+action:
+  aliases: []
+  related:
+    - functions/images/Filter
+    - methods/resource/Filter
+  returnType: images.filter
+  signatures: [images.AutoOrient]
+toc: true
+---
+
+{{< new-in 0.121.2 >}}
+
+## Usage
+
+Create the filter:
+
+```go-html-template
+{{ $filter := images.AutoOrient }}
+```
+
+{{% include "functions/images/_common/apply-image-filter.md" %}}
+
+{{% note %}}
+When using with other filters, specify `images.AutoOrient` first.
+{{% /note %}}
+
+```go-html-template
+{{ $filters := slice
+  images.AutoOrient
+  (images.Process "resize 200x")
+}}
+{{ with resources.Get "images/original.jpg" }}
+  {{ with images.Filter $filters . }}
+    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
+  {{ end }}
+{{ end }}
+```
+
+## Example
+
+{{< img
+  src="images/examples/landscape-exif-orientation-5.jpg"
+  alt="Zion National Park"
+  filter="AutoOrient"
+  filterArgs=""
+  example=true
+>}}
index 0c1e74bce5eab66d9b1eba8f4b340f1e54321004..8c6670d422ddf8033d79a3ac048a7024ba0aee05 100644 (file)
@@ -21,7 +21,9 @@ color
 : (`string`) The font color, either a 3-digit or 6-digit hexadecimal color code. Default is `#ffffff` (white).
 
 font
-: (`resource.Resource`) The font can be a [global resource], a [page resource], or a [remote resource]. Default is the "Go Regular" TrueType font.
+: (`resource.Resource`) The font can be a [global resource], a [page resource], or a [remote resource]. Default is [Go Regular], a proportional sans-serif TrueType font.
+
+[Go Regular]: https://go.dev/blog/go-fonts#sans-serif
 
 linespacing
 : (`int`) The number of pixels between each line. For a line height of 1.4, set the `linespacing` to 0.4 multiplied by the `size`. Default is `2`.
@@ -45,7 +47,7 @@ Capture the font as a resource:
 
 ```go-html-template
 {{ $font := "" }}
-{{ $path := "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Regular.ttf" }}
+{{ $path := "https://github.com/google/fonts/raw/main/ofl/lato/Lato-Regular.ttf" }}
 {{ with resources.GetRemote $path }}
   {{ with .Err }}
     {{ errorf "%s" . }}
index 41d61a4e512e3b92af479fd6a08db1295ab6509b..71b4a5fd2df9d4a33e0e4ccbe52f78f34f659a7a 100644 (file)
@@ -18,7 +18,7 @@ aliases: [/functions/humanize]
 {{ humanize "myCamelPost" }} → My camel post
 ```
 
-If the input is either an int64 value or the string representation of an integer, humanize returns the number with the proper ordinal appended.
+If the input is an integer or a string representation of an integer, humanize returns the number with the proper ordinal appended.
 
 ```go-html-template
 {{ humanize "52" }} → 52nd
index 630098a9696d2488aa3f02e4f1704ddecaf302c5..3366d7751e22102a73fc01f308ab1483fb55c66c 100644 (file)
@@ -11,6 +11,23 @@ action:
 aliases: [/functions/i18n]
 ---
 
+The `lang.Translate` function returns the value associated with given key as defined in the translation table for the current language.
+
+If the key is not found in the translation table for the current language, the `lang.Translate` function falls back to the translation table for the [`defaultContentLanguage`]. 
+
+If the key is not found in the translation table for the `defaultContentLanguage`, the `lang.Translate` function returns an empty string.
+
+[`defaultContentLanguage`]: /getting-started/configuration/#defaultcontentlanguage
+
+{{% note %}}
+To list missing and fallback translations, use the `--printI18nWarnings` flag when building your site.
+
+To render placeholders for missing and fallback translations, set 
+[`enableMissingTranslationPlaceholders`] to `true` in your site configuration.
+
+[`enableMissingTranslationPlaceholders`]: /getting-started/configuration/#enablemissingtranslationplaceholders
+{{% /note %}}
+
 Let's say your multilingual site supports two languages, English and Polish. Create a translation table for each language in the `i18n` directory.
 
 ```text
diff --git a/content/en/functions/math/Rand.md b/content/en/functions/math/Rand.md
new file mode 100644 (file)
index 0000000..4f71cfc
--- /dev/null
@@ -0,0 +1,46 @@
+---
+title: math.Rand
+description: Returns a pseudo-random number in the half-open interval [0.0, 1.0).
+categories: []
+keywords: []
+action:
+  aliases: []
+  related: []
+  returnType: float64
+  signatures: [math.Rand]
+---
+
+{{< new-in 0.121.2 >}}
+
+The `math.Rand` function returns a pseudo-random number in the [half-open interval] [0.0, 1.0).
+
+```go-html-template
+{{ math.Rand }} → 0.6312770459590062
+```
+
+To generate a random integer in the [closed interval] [0, 5]:
+
+```go-html-template
+{{ math.Rand | mul 6 | math.Floor }}
+```
+
+To generate a random integer in the closed interval [1, 6]:
+
+```go-html-template
+{{ math.Rand | mul 6 | math.Ceil }}
+```
+
+To generate a random float, with one digit after the decimal point, in the closed interval [0, 4.9]:
+
+```go-html-template
+{{ div (math.Rand | mul 50 | math.Floor) 10 }}
+```
+
+To generate a random float, with one digit after the decimal point, in the closed interval [0.1, 5.0]:
+
+```go-html-template
+{{ div (math.Rand | mul 50 | math.Ceil) 10 }}
+```
+
+[closed interval]: /getting-started/glossary/#interval
+[half-open interval]: /getting-started/glossary/#interval
index 2865ac191a7fef02f20fee49cb0d9164d4058a04..a89d0e69df21caef15536a186bffa737cf45c4b5 100644 (file)
@@ -2,6 +2,7 @@
 title: math.Sub
 description: Subtracts one or more numbers from the first number. 
 categories: []
+keywords: []
 action:
   aliases: [sub]
   related:
index 50c7936850a5cfb9b3c63acf72e037ef31494a4a..433337aefbf100b9447b3bf3434cbc9f4364611c 100644 (file)
@@ -17,7 +17,7 @@ Use the `openapi3.Unmarshal` function with [global], [page], or [remote] resourc
 [remote]: /getting-started/glossary/#remote-resource
 [OpenAPI]: https://www.openapis.org/
 
-For example, to work with a remote [OpenAPI] defintion:
+For example, to work with a remote [OpenAPI] definition:
 
 ```go-html-template
 {{ $url := "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json" }}
index 859f6665baec0fa15f822ec5b2d274bcfb29b393..e08b32fd1bdf60a73c828b2388681afde32899bb 100644 (file)
@@ -68,7 +68,7 @@ Then, within the partial template:
 To return a value from a partial template, it must contain only one `return` statement, placed at the end of the template:
 
 ```go-html-template
-{{ $result := false }}
+{{ $result := "" }}
 {{ if math.ModBool . 2 }}
   {{ $result = "even" }}
 {{ else }}
index db275fa9ea87342a50bdfd80b7c9b0267de80db9..66ef4a6acb9cd34d20843187d14769e6f7b7c526 100644 (file)
@@ -51,7 +51,7 @@ The variant arguments are not available to the underlying partial template; they
 To return a value from a partial template, it must contain only one `return` statement, placed at the end of the template:
 
 ```go-html-template
-{{ $result := false }}
+{{ $result := "" }}
 {{ if math.ModBool . 2 }}
   {{ $result = "even" }}
 {{ else }}
index 3bdf975bf9aeab2198672003531888c595236056..809ee83d00ee63f7253303b7f60cbb0c5a3a5049 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: resources.Concat
-description: Concatenates a slice of resources.
+description: Returns a concatenated slice of resources.
 categories: []
 keywords: []
 action:
@@ -10,12 +10,17 @@ action:
   signatures: ['resources.Concat TARGETPATH [RESOURCE...]']
 ---
 
+The `resources.Concat` function returns a concatenated slice of resources, caching the result using the target path as its cache key. Each resource must have the same [media type].
+
+Hugo publishes the resource to the target path when you call its [`Publish`], [`Permalink`], or [`RelPermalink`] methods. 
+
+[media type]: https://en.wikipedia.org/wiki/Media_type
+[`publish`]: /methods/resource/publish
+[`permalink`]: /methods/resource/permalink
+[`relpermalink`]: /methods/resource/relpermalink
+
 ```go-html-template
 {{ $plugins := resources.Get "js/plugins.js" }}
 {{ $global := resources.Get "js/global.js" }}
 {{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}
 ```
-
-Asset files of the same [media type] can be bundled into one resource using the `resources.Concat` function which takes two arguments, the target path for the created resource bundle and a slice of resource objects to be concatenated.
-
-[media type]: https://en.wikipedia.org/wiki/Media_type
index d17f0580ca5b66dff6edc92c4f0337e2c618b7af..5f7e584132d87bce56a623505f4b0c90cd798f67 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: resources.ExecuteAsTemplate
-description: Creates a resource from a Go template, parsed and executed with the given context.
+description: Returns a resource created from a Go template, parsed and executed with the given context.
 categories: []
 keywords: []
 action:
@@ -11,7 +11,13 @@ action:
   signatures: [resources.ExecuteAsTemplate TARGETPATH CONTEXT RESOURCE]
 ---
 
-Hugo publishes the resource to the target path when you call its`.Publish`, `.Permalink`, or `.RelPermalink` method. The resource is cached, using the target path as the cache key.
+The `resources.ExecuteAsTemplate` function returns a resource created from a Go template, parsed and executed with the given context, caching the result using the target path as its cache key.
+
+Hugo publishes the resource to the target path when you call its [`Publish`], [`Permalink`], or [`RelPermalink`] methods.
+
+[`publish`]: /methods/resource/publish
+[`permalink`]: /methods/resource/permalink
+[`relpermalink`]: /methods/resource/relpermalink
 
 Let's say you have a CSS file that you wish to populate with values from your site configuration:
 
index 6c22b53104c4d60ba5e900e959adc22d3a800c08..75f48ad9cc0552f8c84525bd734997e4faf4e882 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: resources.FromString
-description: Creates a resource from a string.
+description: Returns a resource created from a string.
 categories: []
 keywords: []
 action:
@@ -11,7 +11,13 @@ action:
   signatures: [resources.FromString TARGETPATH STRING]
 ---
 
-Hugo publishes the resource to the target path when you call its`.Publish`, `.Permalink`, or `.RelPermalink` method. The resource is cached, using the target path as the cache key.
+The `resources.FromString` function returns a resource created from a string, caching the result using the target path as its cache key.
+
+Hugo publishes the resource to the target path when you call its [`Publish`], [`Permalink`], or [`RelPermalink`] methods.
+
+[`publish`]: /methods/resource/publish
+[`permalink`]: /methods/resource/permalink
+[`relpermalink`]: /methods/resource/relpermalink
 
 Let's say you need to publish a file named "site.json" in the root of your public directory, containing the build date, the Hugo version used to build the site, and the date that the content was last modified. For example:
 
index 44f5f990b61bf5b3688514d203d8dfa7868e8851..9749df20a4c79f6212cae28e5e69d92a6d08c209 100644 (file)
@@ -20,4 +20,4 @@ action:
 {{ $style := $css | minify }}
 ```
 
-Any CSS, JS, JSON, HTML, SVG or XML resource can be minified using resources.Minify which takes for argument the resource object.
+Any CSS, JS, JSON, HTML, SVG, or XML resource can be minified using resources.Minify which takes for argument the resource object.
index 872bf996b8a49d392c371567b5a68b03c03255fc..d226f26880bc4149e13595a051a899f182695d86 100644 (file)
@@ -139,8 +139,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file
 
 ```yaml
 variables:
-  HUGO_VERSION: 0.115.1
-  DART_SASS_VERSION: 1.63.6
+  HUGO_VERSION: 0.121.0
+  DART_SASS_VERSION: 1.69.5
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
   GIT_SUBMODULE_STRATEGY: recursive
@@ -173,8 +173,8 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should
 
 ```toml
 [build.environment]
-HUGO_VERSION = "0.115.1"
-DART_SASS_VERSION = "1.63.6"
+HUGO_VERSION = "0.121.0"
+DART_SASS_VERSION = "1.69.5"
 TZ = "America/Los_Angeles"
 
 [build]
index 6e1fd2af76599927ea86d2313574b177f0e81a92..198fc8ff3609d0b791bfb98af0592f0235a8f06c 100644 (file)
@@ -19,7 +19,7 @@ aliases: [/functions/safehtmlattr]
 Given a site configuration that contains this menu entry:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
   name = "IRC"
   url = "irc://irc.freenode.net/#golang"
 {{< /code-toggle >}}
index 2ae67bd7fd29350ca475ed43580f5b035db31c7a..2da6895e5364f85d5b24ce1cdb8caf208e670543 100644 (file)
@@ -23,7 +23,7 @@ Without `safeURL`, only the URI schemes `http:`, `https:` and `mailto:` are cons
 The following examples use a [site `hugo.toml`][configuration] with the following [menu entry][menus]:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = "IRC: #golang at freenode"
 url = "irc://irc.freenode.net/#golang"
 {{< /code-toggle >}}
index 029cb323e1a03bbe7b6ebe0cfce28d90c31f218d..302d1d9b4f0529b8bbccb0ad709a099295248e55 100644 (file)
@@ -9,7 +9,7 @@ action:
     - functions/strings/FindRE
     - functions/strings/Replace
     - functions/strings/ReplaceRE
-  returnType: '[]string'
+  returnType: '[][]string'
   signatures: ['strings.FindRESubmatch PATTERN INPUT [LIMIT]']
 aliases: [/functions/findresubmatch]
 ---
index d26bae4a36c644f0a3b7bd24e89ce4cc5527e897..861f38a12941906521bdcaae6046e06e3a7bd4a0 100644 (file)
@@ -9,7 +9,7 @@ action:
     - functions/strings/FindRESubmatch
     - functions/strings/Replace
     - functions/strings/ReplaceRE
-  returnType: string
+  returnType: '[]string'
   signatures: ['strings.FindRE PATTERN INPUT [LIMIT]']
 aliases: [/functions/findre]
 ---
index e7f253ce92800b7d9d83959a30b02b931ffc1a23..8fb12c52708b78d3ba3c977dd9e930ebf8a3477d 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: strings.HasSuffix
-description: Reports whether the given string begins with the given suffix.
+description: Reports whether the given string ends with the given suffix.
 categories: []
 keywords: []
 action:
diff --git a/content/en/functions/transform/XMLEscape.md b/content/en/functions/transform/XMLEscape.md
new file mode 100644 (file)
index 0000000..d0aafc4
--- /dev/null
@@ -0,0 +1,40 @@
+---
+title: transform.XMLEscape
+description: Returns the given string, removing disallowed characters then escaping the result to its XML equivalent.
+categories: []
+keywords: []
+action:
+  aliases: []
+  related: []
+  returnType: string
+  signatures: [transform.XMLEscape INPUT]
+---
+
+{{< new-in 0.121.0 >}}
+
+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;`
+- `&` → `&amp;`
+- `<` → `&lt;`
+- `>` → `&gt;`
+- `\t` → `&#x9;`
+- `\n` → `&#xA;`
+- `\r` → `&#xD;`
+
+For example:
+
+```go-html-template
+{{ 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:
+
+{{< code file="layouts/_default/rss.xml" >}}
+<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
+{{< /code >}}
+
+[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
index 2ab5450f3eaa49a1a8607634a906b1087d1374a5..a2819c7fdca411dae79768eb06b7b05f4a2f48e5 100644 (file)
@@ -15,61 +15,117 @@ aliases: [/overview/source-directory/,/overview/configuration/]
 
 ## Configuration file
 
-Hugo uses the `hugo.toml`, `hugo.yaml`, or `hugo.json` (if found in the
-site root) as the default site configuration file.
+Create a site configuration file in the root of your project directory, naming it `hugo.toml`, `hugo.yaml`, or `hugo.json`, with that order of precedence.
 
-The user can choose to override that default with one or more site configuration files using the command-line `--config` switch.
+```text
+my-project/
+└── hugo.toml
+```
+
+{{% note %}}
+With v0.109.0 and earlier the basename of the site configuration file was `config` instead of `hugo`. You can use either, but should transition to the new naming convention when practical.
+{{% /note %}}
 
-Examples:
+A simple example:
 
-```txt
-hugo --config debugconfig.toml
-hugo --config a.toml,b.toml,c.toml
+{{< code-toggle file=hugo >}}
+baseURL = 'https://example.org/'
+languageCode = 'en-us'
+title = 'ABC Widgets, Inc.'
+[params]
+subtitle = 'The Best Widgets on Earth'
+[params.contact]
+email = 'info@example.org'
+phone = '+1 202-555-1212'
+{{< /code-toggle >}}
+
+To use a different configuration file when building your site, use the `--config` flag:
+
+```sh
+hugo --config other.toml
+```
+
+Combine two or more configuration files, with left-to-right precedence:
+
+```sh
+hugo --config a.toml,b.yaml,c.json
 ```
 
 {{% note %}}
-Multiple site configuration files can be specified as a comma-separated string to the `--config` switch.
+See the specifications for each file format: [TOML], [YAML], and [JSON].
+
+[TOML]: https://toml.io/en/latest
+[YAML]: https://yaml.org/spec/
+[JSON]: https://datatracker.ietf.org/doc/html/rfc7159
 {{% /note %}}
 
-## hugo.toml vs config.toml
+## Configuration directory
 
-In Hugo 0.110.0 we changed the default configuration base file name to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventually rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier for code editors and build tools to identify this as a Hugo configuration file and project.
+Instead of a single site configuration file, split your configuration by [environment], root configuration key, and language. For example:
 
-{{< new-in 0.110.0 >}}
+[environment]: /getting-started/glossary/#environment
 
-## Configuration directory
+```text
+my-project/
+└── config/
+    ├── _default/
+    │   ├── hugo.toml
+    │   ├── menus.en.toml
+    │   ├── menus.de.toml
+    │   └── params.toml
+    ├── production/
+    │   ├── hugo.toml
+    │   └── params.toml
+    └── staging/
+        ├── hugo.toml
+        └── params.toml
+```
 
-In addition to using a single site configuration file, one can use the `configDir` directory (default to `config/`) to maintain easier organization and environment specific settings.
+The root configuration keys are `build`, `caches`, `cascade`, `deployment`, `frontmatter`, `imaging`, `languages`, `markup`, `mediatypes`, `menus`, `minify`, `module`, `outputformats`, `outputs`, `params`, `permalinks`, `privacy`, `related`, `security`, `server`, `services`, `sitemap`, and `taxonomies`.
 
-- Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc...
-- Each file's content must be top-level, for example:
+### Omit the root key
+
+When splitting the configuration by root key, omit the root key in the given file. For example, these are equivalent:
 
 {{< code-toggle file=hugo >}}
-[Params]
-  foo = "bar"
+[params]
+foo = 'bar'
 {{< /code-toggle >}}
 
 {{< code-toggle file=params >}}
-foo = "bar"
+foo = 'bar'
 {{< /code-toggle >}}
 
-- Each directory holds a group of files containing settings unique to an environment.
-- Files can be localized to become language specific.
+### Recursive parsing
 
-```txt
-├── config
-│   ├── _default
-│   │   ├── hugo.toml
-│   │   ├── languages.toml
-│   │   ├── menus.en.toml
-│   │   ├── menus.zh.toml
-│   │   └── params.toml
-│   ├── production
-│   │   ├── hugo.toml
-│   │   └── params.toml
-│   └── staging
-│       ├── hugo.toml
-│       └── params.toml
+Hugo parses the `config` directory recursively, allowing you to organize the files into subdirectories. For example:
+
+```text
+my-project/
+└── config/
+    └── _default/
+        ├── navigation/
+        │   ├── menus.de.toml
+        │   └── menus.en.toml
+        └── hugo.toml
+```
+
+### Example
+
+```text
+my-project/
+└── config/
+    ├── _default/
+    │   ├── hugo.toml
+    │   ├── menus.en.toml
+    │   ├── menus.de.toml
+    │   └── params.toml
+    ├── production/
+    │   ├── hugo.toml
+    │   └── params.toml
+    └── staging/
+        ├── hugo.toml
+        └── params.toml
 ```
 
 Considering the structure above, when running `hugo --environment staging`, Hugo will use every setting from `config/_default` and merge `staging`'s on top of those.
@@ -144,356 +200,272 @@ Note that you don't need to be so verbose as in the default setup below; a `_mer
 
 ## All configuration settings
 
-The following is the full list of Hugo-defined variables. Users may choose to override those values in their site configuration file(s).
-
-### archetypeDir
-
-**Default value:** "archetypes"
-
-The directory where Hugo finds archetype files (content templates). {{% module-mounts-note %}}
-
-### assetDir
+###### archetypeDir
 
-**Default value:** "assets"
+(`string`) The directory where Hugo finds archetype files (content templates). Default is `archetypes`. {{% module-mounts-note %}}
 
-The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
+###### assetDir
 
-### baseURL
+(`string`) The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). Default is `assets`. {{% module-mounts-note %}}
 
-The absolute URL (protocol, host, path, and trailing slash) of your published site (e.g., `https://www.example.org/docs/`).
+###### baseURL
 
-### build
+(`string`) The absolute URL (protocol, host, path, and trailing slash) of your published site (e.g., `https://www.example.org/docs/`).
 
-See [Configure Build](#configure-build)
+###### build
 
-### buildDrafts (false)
+See [Configure Build](#configure-build).
 
-**Default value:** false
+###### buildDrafts
 
-Include drafts when building.
+(`bool`) Include drafts when building. Default is `false`.
 
-### buildExpired
+###### buildExpired
 
-**Default value:** false
+(`bool`) Include content already expired. Default is `false`.
 
-Include content already expired.
+###### buildFuture
 
-### buildFuture
+(`bool`) Include content with publishdate in the future. Default is `false`.
 
-**Default value:** false
+###### caches
 
-Include content with publishdate in the future.
+See [Configure File Caches](#configure-file-caches).
 
-### caches
-
-See [Configure File Caches](#configure-file-caches)
-
-### cascade
+###### cascade
 
 Pass down down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
 
 {{% note %}}
 For a website in a single language, define the `[[cascade]]` in [Front Matter](/content-management/front-matter#front-matter-cascade). For a multilingual website, define the `[[cascade]]` in [Site Config](../../getting-started/configuration/#cascade).
 
-To remain consistent and prevent unexpected behaviour, do not mix these strategies.
+To remain consistent and prevent unexpected behavior, do not mix these strategies.
 {{% /note %}}
 
-### canonifyURLs
-
-**Default value:** false
-
-Enable to turn relative URLs into absolute. See&nbsp;[details](/content-management/urls/#canonical-urls).
-
-### cleanDestinationDir
-
-**Default value:** false
-
-When building, removes files from destination not found in static directories.
-
-### contentDir
-
-**Default value:** "content"
-
-The directory from where Hugo reads content files. {{% module-mounts-note %}}
-
-### copyright
-
-**Default value:** ""
-
-Copyright notice for your site, typically displayed in the footer.
-
-### dataDir
-
-**Default value:** "data"
-
-The directory from where Hugo reads data files. {{% module-mounts-note %}}
-
-### defaultContentLanguage
+###### canonifyURLs
 
-**Default value:** "en"
+(`bool`) Enable to turn relative URLs into absolute.  Default is `false`. See&nbsp;[details](/content-management/urls/#canonical-urls).
 
-Content without language indicator will default to this language.
+###### cleanDestinationDir
 
-### defaultContentLanguageInSubdir
+(`bool`) When building, removes files from destination not found in static directories. Default is `false`.
 
-**Default value:** false
+###### contentDir
 
-Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`.
+(`string`) The directory from where Hugo reads content files.  Default is `content`. {{% module-mounts-note %}}
 
-### disableAliases
+###### copyright
 
-**Default value:** false
+(`string`) Copyright notice for your site, typically displayed in the footer.
 
-Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format.
+###### dataDir
 
-### disableHugoGeneratorInject
+(`string`) The directory from where Hugo reads data files. Default is `data`. {{% module-mounts-note %}}
 
-**Default value:** false
+###### defaultContentLanguage
 
-Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise.
+(`string`) Content without language indicator will default to this language. Default is `en`.
 
-### disableKinds
+###### defaultContentLanguageInSubdir
 
-**Default value:** []
+(`bool`) Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`. Default is `false`.
 
-Enable disabling of all pages of the specified *Kinds*. Allowed values in this list: `"page"`, `"home"`, `"section"`, `"taxonomy"`, `"term"`, `"RSS"`, `"sitemap"`, `"robotsTXT"`, `"404"`.
+###### disableAliases
 
-### disableLiveReload
+(`bool`) Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format. Default is `false`.
 
-**Default value:**  false
+###### disableHugoGeneratorInject
 
-Disable automatic live reloading of browser window.
+(`bool`) Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise. Default is `false`.
 
-### disablePathToLower
+###### disableKinds
 
-**Default value:** false
+(`string slice`) Disable rendering of the specified page [kinds], any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`.
 
-Do not convert the url/path to lowercase.
+[kinds]: /getting-started/glossary/#page-kind
 
-### enableEmoji
+###### disableLiveReload
 
-**Default value:** false
+(`bool`) Disable automatic live reloading of browser window. Default is `false`.
 
-Enable Emoji emoticons support for page content; see the [emoji shortcode quick reference guide](/quick-reference/emojis/).
+###### disablePathToLower
 
-### enableGitInfo
+(`bool`) Do not convert the url/path to lowercase. Default is `false`.
 
-**Default value:** false
+###### enableEmoji
 
-Enable `.GitInfo` object for each page (if the Hugo site is versioned by Git). This will then update the `Lastmod` parameter for each page using the last git commit date for that content file.
+(`bool`) Enable Emoji emoticons support for page content; see the [emoji shortcode quick reference guide](/quick-reference/emojis/). Default is `false`.
 
-### enableInlineShortcodes
+###### enableGitInfo
 
-**Default value:** false
+(`bool`) Enable `.GitInfo` object for each page (if the Hugo site is versioned by Git). This will then update the `Lastmod` parameter for each page using the last git commit date for that content file. Default is `false`.
 
-Enable inline shortcode support. See [Inline Shortcodes](/templates/shortcode-templates/#inline-shortcodes).
+###### enableMissingTranslationPlaceholders
 
-### enableMissingTranslationPlaceholders
+(`bool`) Show a placeholder instead of the default value or an empty string if a translation is missing. Default is `false`.
 
-**Default value:** false
+###### enableRobotsTXT
 
-Show a placeholder instead of the default value or an empty string if a translation is missing.
+(`bool`) Enable generation of `robots.txt` file. Default is `false`.
 
-### enableRobotsTXT
-
-**Default value:** false
-
-Enable generation of `robots.txt` file.
-
-### frontmatter
+###### frontmatter
 
 See [Front matter Configuration](#configure-front-matter).
 
-### hasCJKLanguage
+###### hasCJKLanguage
 
-**Default value:** false
+(`bool`) If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages. Default is `false`.
 
-If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
-
-### imaging
+###### imaging
 
 See [image processing configuration](/content-management/image-processing/#imaging-configuration).
 
-### languageCode
-
-**Default value:** ""
+###### languageCode
 
-A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). This value is used to populate:
+(`string`) A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). This value is used to populate:
 
 - The `<language>` element in the internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml)
 - The `lang` attribute of the `<html>` element in the internal [alias template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html)
 
-### languages
+###### languages
 
 See [Configure Languages](/content-management/multilingual/#configure-languages).
 
-### disableLanguages
+###### disableLanguages
 
 See [Disable a Language](/content-management/multilingual/#disable-a-language)
 
-### markup
+###### markup
 
 See [Configure Markup](/getting-started/configuration-markup).
 
-### mediaTypes
+###### mediaTypes
 
 See [Configure Media Types](/templates/output-formats/#media-types).
 
-### menus
+###### menus
 
 See [Menus](/content-management/menus/#define-in-site-configuration).
 
-### minify
+###### minify
 
-See [Configure Minify](#configure-minify)
+See [Configure Minify](#configure-minify).
 
-### module
+###### module
 
 Module configuration see [module configuration](/hugo-modules/configuration/).
 
-### newContentEditor
-
-**Default value:** ""
+###### newContentEditor
 
-The editor to use when creating new content.
+(`string`) The editor to use when creating new content.
 
-### noChmod
+###### noChmod
 
-**Default value:** false
+(`bool`) Don't sync permission mode of files. Default is `false`.
 
-Don't sync permission mode of files.
+###### noTimes
 
-### noTimes
+(`bool`) Don't sync modification time of files. Default is `false`.
 
-**Default value:** false
-
-Don't sync modification time of files.
-
-### outputFormats
+###### outputFormats
 
 See [Configure Output Formats](#configure-additional-output-formats).
 
-### paginate
-
-**Default value:** 10
+###### paginate
 
-Default number of elements per page in [pagination](/templates/pagination/).
+(`int`) Default number of elements per page in [pagination](/templates/pagination/). Default is `10`.
 
-### paginatePath
+###### paginatePath
 
-**Default value:** "page"
+(`string`) The path element used during pagination (`https://example.org/page/2`). Default is `page`.
 
-The path element used during pagination (`https://example.org/page/2`).
-
-### permalinks
+###### permalinks
 
 See [Content Management](/content-management/urls/#permalinks).
 
-### pluralizeListTitles
-
-**Default value:** true
-
-Pluralize titles in lists.
+###### pluralizeListTitles
 
-### publishDir
+(`bool`) Pluralize titles in lists. Default is `true`.
 
-**Default value:** "public"
+###### publishDir
 
-The directory to where Hugo will write the final static site (the HTML files etc.).
+(`string`) The directory to where Hugo will write the final static site (the HTML files etc.). Default is `public`.
 
-### related
+###### related
 
 See [Related Content](/content-management/related/#configure-related-content).
 
-### relativeURLs
+###### relativeURLs
 
-**Default value:** false
+(`bool`) Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.  Default is `false`. See&nbsp;[details](/content-management/urls/#relative-urls).
 
-Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. See&nbsp;[details](/content-management/urls/#relative-urls).
+###### refLinksErrorLevel
 
-### refLinksErrorLevel
+(`string`) When using `ref` or `relref` to resolve page links and a link cannot be resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).  Default is `ERROR`.
 
-**Default value:** "ERROR"
+###### refLinksNotFoundURL
 
-When using `ref` or `relref` to resolve page links and a link cannot be resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
+(`string`) URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
 
-### refLinksNotFoundURL
+###### removePathAccents
 
-URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
-
-### removePathAccents
-
-**Default value:** false
-
-Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths.
+(`bool`) Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths. Default is `false`.
 
 ```text
 content/post/hügó.md → https://example.org/post/hugo/
 ```
 
-### sectionPagesMenu
+###### sectionPagesMenu
 
 See [Menus](/content-management/menus/#define-automatically).
 
-### security
+###### security
 
-See [Security Policy](/about/security-model/#security-policy)
+See [Security Policy](/about/security-model/#security-policy).
 
-### sitemap
+###### sitemap
 
 Default [sitemap configuration](/templates/sitemap-template/#configuration).
 
-### summaryLength
+###### summaryLength
 
-**Default value:** 70
+(`int`) The length of text in words to show in a [`.Summary`](/content-management/summaries/#automatic-summary-splitting). Default is `70`.
 
-The length of text in words to show in a [`.Summary`](/content-management/summaries/#automatic-summary-splitting).
-
-### taxonomies
+###### taxonomies
 
 See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies).
 
-### theme
-
-: See [module configuration](/hugo-modules/configuration/#module-configuration-imports) for how to import a theme.
-
-### themesDir
+###### theme
 
-**Default value:** "themes"
+See [module configuration](/hugo-modules/configuration/#module-configuration-imports) for how to import a theme.
 
-The directory where Hugo reads the themes from.
+###### themesDir
 
-### timeout
+(`string`) The directory where Hugo reads the themes from. Default is `themes`.
 
-**Default value:** "30s"
+###### timeout
 
-Timeout for generating page contents, specified as a [duration](https://pkg.go.dev/time#Duration) or in seconds. *Note:*&nbsp;this is used to bail out of recursive content generation. You might need to raise this limit if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents).
+(`string`) Timeout for generating page contents, specified as a [duration](https://pkg.go.dev/time#Duration) or in seconds. *Note:*&nbsp;this is used to bail out of recursive content generation. You might need to raise this limit if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents). Default is `30s`.
 
-### timeZone
+###### timeZone
 
-The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time`] function. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
+(`string`) The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time`] function. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
 
-### title
+###### title
 
-Site title.
+(`string`) Site title.
 
-### titleCaseStyle
+###### titleCaseStyle
 
-**Default value:** "ap"
+(`string`) Default is `ap`. See [Configure Title Case](#configure-title-case).
 
-See [Configure Title Case](#configure-title-case)
+###### uglyURLs
 
-### uglyURLs
+(`bool`) When enabled, creates URL of the form `/filename.html` instead of `/filename/`. Default is `false`.
 
-**Default value:** false
+###### watch
 
-When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
-
-### watch
-
-**Default value:** false
-
-Watch filesystem for changes and recreate as needed.
+(`bool`) Watch filesystem for changes and recreate as needed. Default is `false`.
 
 {{% note %}}
 If you are developing your site on a \*nix machine, here is a handy shortcut for finding a configuration option from the command line:
@@ -567,7 +539,7 @@ The `build.cachebusters` configuration option was added to support development u
     target = "$1"
 {{< /code-toggle >}}
 
-Some key points in the above are `writeStats = true`, which writes a `hugo_stats.json` file on each build with HTML classes etc. that's used in the rendered output. Changes to this file will trigger a rebuild of the `styles.css` file. You also need to add `hugo_stats.json` to Hugo's server watcher. See [Hugo Starter Tailwind Basic](https://github.com/bep/hugo-starter-tailwind-basic) for a running example.
+When `buildStats` {{< new-in 0.115.1 >}} is enabled, Hugo writes a `hugo_stats.json` file on each build with HTML classes etc. that's used in the rendered output. Changes to this file will trigger a rebuild of the `styles.css` file. You also need to add `hugo_stats.json` to Hugo's server watcher. See [Hugo Starter Tailwind Basic](https://github.com/bep/hugo-starter-tailwind-basic) for a running example.
 
 source
 : A regexp matching file(s) relative to one of the virtual component directories in Hugo, typically `assets/...`.
@@ -664,35 +636,6 @@ none
 HUGO_NUMWORKERMULTIPLIER
 : Can be set to increase or reduce the number of workers used in parallel processing in Hugo. If not set, the number of logical CPUs will be used.
 
-## Configuration lookup order
-
-Similar to the template [lookup order], Hugo has a default set of rules for searching for a configuration file in the root of your website's source directory as a default behavior:
-
-1. `./hugo.toml`
-2. `./hugo.yaml`
-3. `./hugo.json`
-
-In your configuration file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
-
-## Example configuration
-
-The following is a typical example of a configuration file. The values nested under `params:` will populate the [`.Site.Params`] variable for use in [templates]:
-
-{{< code-toggle file=hugo >}}
-baseURL: "https://yoursite.example.com/"
-title: "My Hugo Site"
-permalinks:
-  posts: /:year/:month/:title/
-params:
-  Subtitle: "Hugo is Absurdly Fast!"
-  AuthorName: "Jon Doe"
-  GitHubUser: "spf13"
-  ListOfFoo:
-    - "foo1"
-    - "foo2"
-  SidebarRecentLimit: 5
-{{< /code-toggle >}}
-
 ## Configure with environment variables
 
 In addition to the 3 configuration options already mentioned, configuration key-values can be defined through operating system environment variables.
@@ -789,6 +732,10 @@ Hugo v0.20 introduced the ability to render your content to multiple output form
 
 ## Configure minify
 
+See the [tdewolff/minify] project page for details.
+
+[tdewolff/minify]: https://github.com/tdewolff/minify
+
 Default configuration:
 
 {{< code-toggle config=minify />}}
@@ -818,22 +765,6 @@ maxAge
 dir
 : (`string`) The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
 
-## Configuration format specs
-
-- [TOML Spec][toml]
-- [YAML Spec][yaml]
-- [JSON Spec][json]
-
-[`.Site.Params`]: /variables/site/
-[directory structure]: /getting-started/directory-structure
-[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
-[lookup order]: /templates/lookup-order/
-[Output Formats]: /templates/output-formats/
-[templates]: /templates/
-[toml]: https://toml.io/en/latest
-[yaml]: https://yaml.org/spec/
-[static-files]: /content-management/static-files/
-
 ## Configure cacheDir
 
 This is the directory where Hugo by default will store its file caches. See [Configure File Caches](#configure-file-caches).
@@ -849,3 +780,9 @@ If this is not set, Hugo will use, in order of preference:
 If you want to know the current value of `cacheDir`, you can run `hugo config`, e.g: `hugo config | grep cachedir`.
 
 [`time`]: /functions/time/astime
+[`.Site.Params`]: /variables/site/
+[directory structure]: /getting-started/directory-structure
+[lookup order]: /templates/lookup-order/
+[Output Formats]: /templates/output-formats/
+[templates]: /templates/
+[static-files]: /content-management/static-files/
index edf64ab8946139f7b887718002421c34f7336fb7..929feb5424e148a63ebcb481dc368bb521295250 100644 (file)
@@ -147,6 +147,16 @@ A numeric data type without a fractional component. For example, `42`.
 
 Software design and development efforts that enable [localization](#localization). See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
 
+###### interval
+
+An [interval](https://en.wikipedia.org/wiki/Interval_(mathematics)) is a range of numbers between two endpoints: closed, open, or half-open.
+
+- A _closed_ interval, denoted by brackets, includes its endpoints. For example, [0,&nbsp;1]&nbsp;is the interval where `0 <= x <= 1`.
+
+- An _open_ interval, denoted by parentheses, excludes its endpoints. For example, (0,&nbsp;1)&nbsp;is the interval where `0 < x < 1`.
+
+- A _half-open_ interval includes only one of its endpoints. For example, (0,&nbsp;1]&nbsp;is the _left-open_ interval where `0 < x <= 1`, while [0,&nbsp;1)&nbsp;is the _right-open_ interval where `0 <= x < 1`.
+
 ###### kind
 
 See [page kind](#page-kind).
@@ -206,6 +216,10 @@ Created by invoking the [`Alphabetical`] or [`ByCount`] method on a [taxonomy ob
 
 A directory that encapsulates both content and associated [resources](#resource). There are two types of page bundles: [leaf bundles](#leaf-bundle) and [branch bundles](#branch-bundle). See&nbsp;[details](/content-management/page-bundles/).
 
+###### page collection
+
+A slice of page objects.
+
 ###### page kind
 
 A classification of pages, one of `home`, `page`, `section`, `taxonomy`, or `term`. See&nbsp;[details](/templates/section-templates/#page-kinds).
index ce43124558b82f5b53888b6849fc3829cce4e4f6..a6c54b54c41c874e82453638c0c91e66eff3450e 100644 (file)
@@ -10,6 +10,7 @@ menu:
 weight: 20
 toc: true
 aliases: [/quickstart/,/overview/quickstart/]
+minVersion: v0.112.0
 ---
 
 In this tutorial you will:
@@ -23,7 +24,7 @@ In this tutorial you will:
 
 Before you begin this tutorial you must:
 
-1. [Install Hugo] (extended edition, v0.112.0 or later)
+1. [Install Hugo] (extended edition, {{% param "minVersion" %}} or later)
 1. [Install Git]
 
 You must also be comfortable working from the command line.
@@ -45,6 +46,12 @@ PowerShell and Windows PowerShell [are different applications].
 [are different applications]: https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.3
 {{% /note %}}
 
+Verify that you have installed Hugo {{% param "minVersion" %}} or later.
+
+```text
+hugo version
+```
+
 Run these commands to create a Hugo site with the [Ananke] theme. The next section provides an explanation of each command.
 
 ```text
@@ -109,11 +116,11 @@ hugo new content posts/my-first-post.md
 Hugo created the file in the `content/posts` directory. Open the file with your editor.
 
 ```text
----
-title: "My First Post"
-date: 2022-11-20T09:03:20-08:00
-draft: true
----
++++
+title = 'My First Post'
+date = 2024-01-14T07:07:07+01:00
+draft = true
++++
 ```
 
 Notice the `draft` value in the [front matter] is `true`. By default, Hugo does not publish draft content when you build the site. Learn more about [draft, future, and expired content].
@@ -123,11 +130,11 @@ Add some [markdown] to the body of the post, but do not change the `draft` value
 [markdown]: https://commonmark.org/help/
 
 ```text
----
-title: "My First Post"
-date: 2022-11-20T09:03:20-08:00
-draft: true
----
++++
+title = 'My First Post'
+date = 2024-01-14T07:07:07+01:00
+draft = true
++++
 ## Introduction
 
 This is **bold** text, and this is *emphasized* text.
index f41250279bb4bc5a3098c93ddb481b94a65c2cf3..24bd31a25771cecd4f3599b6acbf25bf7eff575c 100644 (file)
@@ -99,7 +99,7 @@ jobs:
   build:
     runs-on: ubuntu-latest
     env:
-      HUGO_VERSION: 0.120.2
+      HUGO_VERSION: 0.121.0
     steps:
       - name: Install Hugo CLI
         run: |
@@ -114,7 +114,7 @@ jobs:
           fetch-depth: 0
       - name: Setup Pages
         id: pages
-        uses: actions/configure-pages@v3
+        uses: actions/configure-pages@v4
       - name: Install Node.js dependencies
         run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
       - name: Build with Hugo
@@ -142,7 +142,7 @@ jobs:
     steps:
       - name: Deploy to GitHub Pages
         id: deployment
-        uses: actions/deploy-pages@v2
+        uses: actions/deploy-pages@v3
 {{< /code >}}
 
 Step 7
index dce306253c818a8a25cc53fbc8abd58eeaf74ba4..74b1fa1544f51e9f746732527daba4b31f1b9799 100644 (file)
@@ -27,8 +27,8 @@ Define your [CI/CD](https://docs.gitlab.com/ee/ci/quick_start/) jobs by creating
 
 {{< code file=.gitlab-ci.yml copy=true >}}
 variables:
-  DART_SASS_VERSION: 1.64.1
-  HUGO_VERSION: 0.115.4
+  DART_SASS_VERSION: 1.69.5
+  HUGO_VERSION: 0.121.0
   NODE_VERSION: 20.x
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
index 9b01f4cd87d1c50ad0335ba6d0dd35c74506adcd..ac6202700491df83bcac97a37680705a1dfebfa7 100644 (file)
@@ -57,14 +57,14 @@ For production:
 
 {{< code file=netlify.toml >}}
 [context.production.environment]
-  HUGO_VERSION = "0.115.4"
+  HUGO_VERSION = "0.121.0"
 {{< /code >}}
 
 For testing:
 
 {{< code file=netlify.toml >}}
 [context.deploy-preview.environment]
-  HUGO_VERSION = "0.115.4"
+  HUGO_VERSION = "0.121.0"
 {{< /code >}}
 
 The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`:
index d707e749829352a7a303e6cf416a21e2adce2963..ce9e97d81fd11ddb4d55e77447153726d6fa6b0e 100644 (file)
@@ -15,28 +15,29 @@ toc: true
 
 {{< code-toggle file=hugo >}}
 [module]
-noVendor = ""
-proxy = "direct"
-noProxy = "none"
-private = "*.*"
-replacements = ""
-workspace = "off"
+noProxy = 'none'
+noVendor = ''
+private = '*.*'
+proxy = 'direct'
+replacements = ''
+vendorClosest = false
+workspace = 'off'
 {{< /code-toggle >}}
 
+noProxy
+: Comma separated glob list matching paths that should not use the proxy configured above.
+
 noVendor
 : A optional Glob pattern matching module paths to skip when vendoring, e.g. "github.com/**"
 
-vendorClosest
-: When enabled, we will pick the vendored module closest to the module using it. The default behavior is to pick the first. Note that there can still be only one dependency of a given module path, so once it is in use it cannot be redefined.
+private
+: Comma separated glob list matching paths that should be treated as private.
 
 proxy
 : Defines the proxy server to use to download remote modules. Default is `direct`, which means "git clone" and similar.
 
-noProxy
-: Comma separated glob list matching paths that should not use the proxy configured above.
-
-private
-: Comma separated glob list matching paths that should be treated as private.
+vendorClosest
+: When enabled, we will pick the vendored module closest to the module using it. The default behavior is to pick the first. Note that there can still be only one dependency of a given module path, so once it is in use it cannot be redefined.
 
 workspace
 : The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+. In Hugo `v0.109.0` we changed the default to `off` and we now resolve any relative work file names relative to the working directory.
index 9e8f1d4d0daf741a34152ecdd3346c2009f1177b..295ff2061e75a5a457c1e923c3f479461b1c4049 100644 (file)
@@ -144,7 +144,7 @@ A workspace can be configured in a `*.work` file and activated with the [module.
 See the [hugo.work](https://github.com/gohugoio/hugo/blob/master/docs/hugo.work) file in the Hugo Docs repo for an example:
 
 ```text
-go 1.19
+go 1.20
 
 use .
 use ../gohugoioTheme
index 73ccf01d451753e1983338797a7f4404cd90963d..c447983a93fb0ab9debc23fd44dd42274e597a1c 100755 (executable)
@@ -24,7 +24,7 @@ Hugo Pipe's Babel requires the `@babel/cli` and `@babel/core` JavaScript package
 If you are using the Hugo Snap package, Babel and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install @babel/cli @babel/core --save-dev` without the `-g` flag.
 {{% /note %}}
 
-### configuration
+## Configuration
 
 We add the main project's `node_modules` to `NODE_PATH` when running Babel and similar tools. There are some known [issues](https://github.com/babel/babel/issues/5618) with Babel in this area, so if you have a `babel.config.js` living in a Hugo Module (and not in the project itself), we recommend using `require` to load the presets/plugins, e.g.:
 
@@ -42,7 +42,7 @@ module.exports = {
 };
 ```
 
-### Options
+## Options
 
 config
 : (`string`) Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` in your project. More information on these configuration files can be found here: [babel configuration](https://babeljs.io/docs/en/configuration).
@@ -62,7 +62,7 @@ verbose
 sourceMap
 : (`string`) Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
 
-### Examples
+## Examples
 
 ```go-html-template
 {{- $transpiled := resources.Get "scripts/main.js" | babel  -}}
index c9366ce8a658467a9169d5d9a94760726cd73764..9d2bbbd82af389b1756fc680e5c1e60e31528815 100644 (file)
@@ -25,7 +25,7 @@ targetPath
 : (`string`) If not set, the source path will be used as the base target path.
 Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript.
 
-params
+params {{< new-in "0.96.0" >}}
 : (`map` or `slice`) Params that can be imported as JSON in your JS files, e.g.:
 
 ```go-html-template
index f8cedcde55860c78fee4819a6d695f226a232fcd..a5d4724f966b8bb0595ecdc1cb5710d9d5b4a5fd 100755 (executable)
@@ -17,7 +17,7 @@ action:
 
 ## Usage
 
-Any CSS, JS, JSON, HTML, SVG or XML resource can be minified using `resources.Minify` which takes for argument the resource object.
+Any CSS, JS, JSON, HTML, SVG, or XML resource can be minified using `resources.Minify` which takes for argument the resource object.
 
 ```go-html-template
 {{ $css := resources.Get "css/main.css" }}
index f670a575263d5873bc69976da1dcb6cc7c17ca1b..63be3e4563e541e849220d9c0e3577c3069c5681 100644 (file)
@@ -7,7 +7,7 @@
 To build the extended edition of Hugo from source you must:
 
 1. Install [Git]
-1. Install [Go] version 1.19 or later
+1. Install [Go] version 1.20 or later
 1. Install a C compiler, either [GCC] or [Clang]
 1. Update your `PATH` environment variable as described in the [Go documentation]
 
index 8d6ff90fc7b6278db0830b7e97d0740f3fb70274..6cd7a524fde4d6994b517cd90beeb78029614a4e 100644 (file)
@@ -4,7 +4,7 @@
 
 ### Homebrew
 
-[Homebrew] is a free and open-source package manager for macOS and Linux. This will install the extended edition of Hugo:
+[Homebrew] is a free and open-source package manager for macOS and Linux. To install the extended edition of Hugo:
 
 ```sh
 brew install hugo
index a3b179d25561a7c355cf5b2583c850d1fbd4ae90..6d00b8b982ecb008386c510732eb76dff201a9f3 100644 (file)
@@ -24,7 +24,7 @@ Most BSD derivatives maintain a repository for commonly installed applications.
 
 ### DragonFly BSD
 
-[DragonFly BSD] includes Hugo in its package repository. This will install the extended edition of Hugo:
+[DragonFly BSD] includes Hugo in its package repository. To install the extended edition of Hugo:
 
 ```sh
 sudo pkg install gohugo
@@ -34,7 +34,7 @@ sudo pkg install gohugo
 
 ### FreeBSD
 
-[FreeBSD] includes Hugo in its package repository. This will install the extended edition of Hugo:
+[FreeBSD] includes Hugo in its package repository. To install the extended edition of Hugo:
 
 ```sh
 sudo pkg install gohugo
@@ -44,7 +44,7 @@ sudo pkg install gohugo
 
 ### NetBSD
 
-[NetBSD] includes Hugo in its package repository. This will install the extended edition of Hugo:
+[NetBSD] includes Hugo in its package repository. To install the extended edition of Hugo:
 
 ```sh
 sudo pkgin install go-hugo
index bb8f4b555c65247a07938756d1e509de230f00a4..7b75f149b3ef9d0bfc5189514b0cbe984b9cc6fc 100644 (file)
@@ -24,7 +24,7 @@ toc: true
 
 The Hugo snap package is [strictly confined]. Strictly confined snaps run in complete isolation, up to a minimal access level that’s deemed always safe. The sites you create and build must be located within your home directory, or on removable media.
 
-This will install the extended edition of Hugo:
+To install the extended edition of Hugo:
 
 ```sh
 sudo snap install hugo
@@ -55,14 +55,26 @@ sudo snap disconnect hugo:ssh-keys
 Most Linux distributions maintain a repository for commonly installed applications.
 
 {{% note %}}
-Due to Long Term Release (LTR) guidelines, most Linux package repositories will not contain the [latest release].
+The Hugo version available in package repositories varies based on Linux distribution and release, and in some cases will not be the [latest version].
 
-[latest release]: https://github.com/gohugoio/hugo/releases/latest
+Use one of the other installation methods if your package repository does not provide the desired version.
+
+[latest version]: https://github.com/gohugoio/hugo/releases/latest
 {{% /note %}}
 
+### Alpine Linux
+
+To install the extended edition of Hugo on [Alpine Linux]:
+
+```sh
+doas apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo
+```
+
+[Alpine Linux]: https://alpinelinux.org/
+
 ### Arch Linux
 
-Derivatives of the [Arch Linux] distribution of Linux include [EndeavourOS], [Garuda Linux], [Manjaro], and others. This will install the extended edition of Hugo:
+Derivatives of the [Arch Linux] distribution of Linux include [EndeavourOS], [Garuda Linux], [Manjaro], and others. To install the extended edition of Hugo:
 
 ```sh
 sudo pacman -S hugo
@@ -75,7 +87,7 @@ sudo pacman -S hugo
 
 ### Debian
 
-Derivatives of the [Debian] distribution of Linux include [elementary OS], [KDE neon], [Linux Lite], [Linux Mint], [MX Linux], [Pop!_OS], [Ubuntu], [Zorin OS], and others. This will install the extended edition of Hugo:
+Derivatives of the [Debian] distribution of Linux include [elementary OS], [KDE neon], [Linux Lite], [Linux Mint], [MX Linux], [Pop!_OS], [Ubuntu], [Zorin OS], and others. To install the extended edition of Hugo:
 
 ```sh
 sudo apt install hugo
@@ -95,7 +107,7 @@ You can also download Debian packages from the [latest release] page.
 
 ### Fedora
 
-Derivatives of the [Fedora] distribution of Linux include [CentOS], [Red Hat Enterprise Linux], and others. This will install the extended edition of Hugo:
+Derivatives of the [Fedora] distribution of Linux include [CentOS], [Red Hat Enterprise Linux], and others. To install the extended edition of Hugo:
 
 ```sh
 sudo dnf install hugo
@@ -105,9 +117,30 @@ sudo dnf install hugo
 [Fedora]: https://getfedora.org/
 [Red Hat Enterprise Linux]: https://www.redhat.com/
 
+### Gentoo
+
+Derivatives of the [Gentoo] distribution of Linux include [Calculate Linux], [Funtoo], and others. Follow the instructions below to install the extended edition of Hugo:
+
+1. Specify the `extended` [USE] flag in /etc/portage/package.use/hugo:
+
+    ```text
+    www-apps/hugo extended
+    ```
+
+2. Build using the Portage package manager:
+
+    ```sh
+    sudo emerge www-apps/hugo
+    ```
+
+[Calculate Linux]: https://www.calculate-linux.org/
+[Funtoo]: https://www.funtoo.org/
+[Gentoo]: https://www.gentoo.org/
+[USE]: https://packages.gentoo.org/packages/www-apps/hugo
+
 ### openSUSE
 
-Derivatives of the [openSUSE] distribution of Linux include [GeckoLinux], [Linux Karmada], and others. This will install the extended edition of Hugo:
+Derivatives of the [openSUSE] distribution of Linux include [GeckoLinux], [Linux Karmada], and others. To install the extended edition of Hugo:
 
 ```sh
 sudo zypper install hugo
@@ -119,7 +152,7 @@ sudo zypper install hugo
 
 ### Solus
 
-The [Solus] distribution of Linux includes Hugo in its package repository. This will install the _standard_ edition of Hugo:
+The [Solus] distribution of Linux includes Hugo in its package repository. To install the extended edition of Hugo:
 
 ```sh
 sudo eopkg install hugo
index eba977481ca2803e7cdc39e0b718c54ce2530c8c..fa6029679d736806fbbb1993c16bd582f3c6e822 100644 (file)
@@ -22,7 +22,7 @@ toc: true
 
 ### MacPorts
 
-[MacPorts] is a free and open-source package manager for macOS. This will install the extended edition of Hugo:
+[MacPorts] is a free and open-source package manager for macOS. To install the extended edition of Hugo:
 
 ```sh
 sudo port install hugo
index 97e767af814a7c2de2d7c0ef2cacd007cf477057..7192645501b3b70ab2fe2fb317ea8b1f56d7dec6 100644 (file)
@@ -10,6 +10,11 @@ menu:
 weight: 40
 toc: true
 ---
+
+{{% note %}}
+Hugo v0.121.1 and later require at least Windows 10 or Windows Server 2016.
+{{% /note %}}
+
 {{% include "installation/_common/01-editions.md" %}}
 
 {{% include "installation/_common/02-prerequisites.md" %}}
@@ -20,7 +25,7 @@ toc: true
 
 ### Chocolatey
 
-[Chocolatey] is a free and open-source package manager for Windows. This will install the extended edition of Hugo:
+[Chocolatey] is a free and open-source package manager for Windows. To install the extended edition of Hugo:
 
 ```sh
 choco install hugo-extended
@@ -30,7 +35,7 @@ choco install hugo-extended
 
 ### Scoop
 
-[Scoop] is a free and open-source package manager for Windows. This will install the extended edition of Hugo:
+[Scoop] is a free and open-source package manager for Windows. To install the extended edition of Hugo:
 
 ```sh
 scoop install hugo-extended
@@ -40,7 +45,7 @@ scoop install hugo-extended
 
 ### Winget
 
-[Winget] is Microsoft's official free and open-source package manager for Windows. This will install the extended edition of Hugo:
+[Winget] is Microsoft's official free and open-source package manager for Windows. To install the extended edition of Hugo:
 
 ```sh
 winget install Hugo.Hugo.Extended
index af2af6dce5147b448b6b6d1355d6c3c6caeb4a1f..ad671b2d03db8c16270d32bfddabd06caba2a9ca 100644 (file)
@@ -15,18 +15,18 @@ Use the `Children` method when rendering a nested menu.
 With this site configuration:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Products'
 pageRef = '/product'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Product 1'
 pageRef = '/products/product-1'
 parent = 'Products'
 weight = 1
 
-[[menu.main]]
+[[menus.main]]
 name = 'Product 2'
 pageRef = '/products/product-2'
 parent = 'Products'
index d906987e8ad03868021692a77c790d31d04e9f19..fac03b7aedb36b7017c30a7bdb1344fd4be57a21 100644 (file)
@@ -15,18 +15,18 @@ Use the `HasChildren` method when rendering a nested menu.
 With this site configuration:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Products'
 pageRef = '/product'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Product 1'
 pageRef = '/products/product-1'
 parent = 'Products'
 weight = 1
 
-[[menu.main]]
+[[menus.main]]
 name = 'Product 2'
 pageRef = '/products/product-2'
 parent = 'Products'
index a4d7e129eec28fd890c0bb3fb17f4a1c2b5e72dd..ba8b77eceb8319d90aab676a7d719e822aa5e558 100644 (file)
@@ -14,13 +14,13 @@ The `Identifier` method returns the `identifier` property of the menu entry. If
 [automatically]: /content-management/menus/#define-automatically
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 identifier = 'about'
 name = 'About'
 pageRef = '/about'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 identifier = 'contact'
 name = 'Contact'
 pageRef = '/contact'
index 8031441b961c4c58da7b75ba50e28f7c3456feac..4b43596b055a7b6be91842945e1a50decc44d2b7 100644 (file)
@@ -12,13 +12,13 @@ action:
 In this menu definition, the second entry does not contain an `identifier`, so the `Identifier` method returns its `name` property instead:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 identifier = 'about'
 name = 'About'
 pageRef = '/about'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Contact'
 pageRef = '/contact'
 weight = 20
index 9b23f7b7326a9284d49e8cbb9c225e9d115e22fe..b75e4af5522e8adc8ad0802004b681a9a8442f2d 100644 (file)
@@ -5,7 +5,7 @@ categories: []
 keywords: []
 action:
   related: []
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [MENUENTRY.Page]
 ---
 
@@ -14,15 +14,15 @@ Regardless of how you [define menu entries], an entry associated with a page has
 In this menu definition, the first two entries are associated with a page, the last entry is not:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 pageRef = '/about'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 pageRef = '/contact'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Hugo'
 url = 'https://gohugo.io'
 weight = 30
index 1486c12cb6afd20253d82dc6e115133b32c3cca1..8af3f0637b10c5e359d2ac06fb00838a17f827d1 100644 (file)
@@ -12,21 +12,21 @@ action:
 When you define menu entries [in site configuration] or [in front matter], you can include a `params` key to attach additional information to the entry. For example:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'About'
 pageRef = '/about'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Contact'
 pageRef = '/contact'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Hugo'
 url = 'https://gohugo.io'
 weight = 30
-[menu.main.params]
+[menus.main.params]
   rel = 'external'
 {{< /code-toggle >}}
 
index 897712831f9329d078fab95185fc4c9d848df7b1..af1b4afe62df45d0c8c2affe61f8dd2d5b5b99a4 100644 (file)
@@ -12,19 +12,18 @@ action:
 With this menu definition:
 
 {{< code-toggle file=hugo >}}
-[menu]
-[[menu.main]]
+[[menus.main]]
 name = 'Products'
 pageRef = '/product'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Product 1'
 pageRef = '/products/product-1'
 parent = 'Products'
 weight = 1
 
-[[menu.main]]
+[[menus.main]]
 name = 'Product 2'
 pageRef = '/products/product-2'
 parent = 'Products'
index 8cc787ea9bb67459f2e8c4bfd9153ed9d1860561..fbfce062a53cef03e780361221759de257c694a2 100644 (file)
@@ -7,14 +7,14 @@ In this site configuration we enable rendering of [emoji shortcodes], and add em
 {{< code-toggle file=hugo >}}
 enableEmoji = true
 
-[[menu.main]]
+[[menus.main]]
 name = 'About'
 pageRef = '/about'
 post = ':point_left:'
 pre = ':point_right:'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Contact'
 pageRef = '/contact'
 post = ':arrow_left:'
index 3f1c52b2ee1a29e7c94b2859674b2bab531d9a5d..04f25c22d4bfe2f312b738736d5ffc3e3c529b6b 100644 (file)
@@ -14,17 +14,17 @@ The `Sort` method returns the given menu with its entries sorted by `name`.
 Consider this menu definition:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Services'
 pageRef = '/services'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'About'
 pageRef = '/about'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Contact'
 pageRef = '/contact'
 weight = 30
index c915914db554856f66354b86e8bb0022347aed58..d5cb0444b609fa95282d2b29ab876b8431ab2e6d 100644 (file)
@@ -16,19 +16,19 @@ The `ByWeight` method returns the given menu with its entries sorted by [`weight
 Consider this menu definition:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 identifier = 'about'
 name = 'About'
 pageRef = '/about'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 identifier = 'services'
 name = 'Services'
 pageRef = '/services'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 identifier = 'contact'
 name = 'Contact'
 pageRef = '/contact'
index 12263e81137c634b76b4c8a68a35c1a054b978e0..23a523dbd96f1809d19be686676d03f60c150a3f 100644 (file)
@@ -14,17 +14,17 @@ The `Limit` method returns the given menu, limited to the first N entries.
 Consider this menu definition:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Services'
 pageRef = '/services'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'About'
 pageRef = '/about'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Contact'
 pageRef = '/contact'
 weight = 30
index 989132d60e368f8ec0027367feb61e1b0b9ae0f6..a3fe09dce3071bed439e5290125c2fd5c3f34a36 100644 (file)
@@ -14,17 +14,17 @@ The `Reverse` method returns the given menu, reversing the sort order of its ent
 Consider this menu definition:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Services'
 pageRef = '/services'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'About'
 pageRef = '/about'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Contact'
 pageRef = '/contact'
 weight = 30
index b9c156127841a390706ba488c4005789df818ef5..b8cc651792a29560ad6e7c3e64b095fcdf5bd5c5 100644 (file)
@@ -63,8 +63,9 @@ And this template:
 {{ with .AllTranslations }}
   <ul>
     {{ range . }}
-      {{ $lang := .Language.LanguageName}}
-      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }} ({{ $lang }})</a></li>
+      {{ $langName := or .Language.LanguageName .Language.Lang }}
+      {{ $langCode := or .Language.LanguageCode .Language.Lang }}
+      <li><a href="{{ .RelPermalink }}" hreflang="{{ $langCode }}">{{ .LinkTitle }} ({{ $langName }})</a></li>
     {{ end }}
   </ul>
 {{ end }}
@@ -74,9 +75,9 @@ Hugo will render this list on the "Book 1" page of each site:
 
 ```html
 <ul>
-  <li><a href="/books/book-1/">Book 1 (English)</a></li>
-  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
-  <li><a href="/fr/books/book-1/">Book 1 (Français)</a></li>
+  <li><a href="/books/book-1/" hreflang="en-US">Book 1 (English)</a></li>
+  <li><a href="/de/books/book-1/" hreflang="de-DE">Book 1 (Deutsch)</a></li>
+  <li><a href="/fr/books/book-1/" hreflang="fr-FR">Book 1 (Français)</a></li>
 </ul>
 ```
 
@@ -84,7 +85,7 @@ On the "Book 2" page of the English and German sites, Hugo will render this:
 
 ```html
 <ul>
-  <li><a href="/books/book-1/">Book 1 (English)</a></li>
-  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
+  <li><a href="/books/book-1/" hreflang="en-US">Book 1 (English)</a></li>
+  <li><a href="/de/books/book-1/" hreflang="de-DE">Book 1 (Deutsch)</a></li>
 </ul>
 ```
index ec7e5c8bf3417f58fcfcc0185d22b7036935234f..068c4591fea45b06f3b54a2041523b7b548467b0 100644 (file)
@@ -29,7 +29,7 @@ enableGitInfo = true
 Consider this project structure:
 
 ```text
-hugo-testing/
+my-project/
 ├── content/
 │   ├── books/
 │   │   └── les-miserables.md
index 03cb9eb3dc859d7d7bb67b66b77283afde88807b..7049feb47d4e01f63b2960c5fe681ef804900ad2 100644 (file)
@@ -12,7 +12,7 @@ action:
     - methods/page/IsDescendant
     - methods/page/Parent
     - methods/page/Sections
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.CurrentSection]
 ---
 
index c39d1a64d5ef3613bfeafa2bda2c2f3dde834900..44b752215efe1711aec50b57a3e2cf70849e7312 100644 (file)
@@ -30,8 +30,9 @@ Code defensively by verifying file existence as shown in each of the examples be
 The path separators (slash or backslash) in `Path`, `Dir`, and `Filename` depend on the operating system.
 {{% /note %}}
 
-BaseFileName
-: (`string`) The file name, excluding the extension.
+###### BaseFileName
+
+(`string`) The file name, excluding the extension.
 
 ```go-html-template
 {{ with .File }}
@@ -39,8 +40,9 @@ BaseFileName
 {{ end }}
 ```
 
-ContentBaseName
-: (`string`) If the page is a branch or leaf bundle, the name of the containing directory, else the `TranslationBaseName`.
+###### ContentBaseName
+
+(`string`) If the page is a branch or leaf bundle, the name of the containing directory, else the `TranslationBaseName`.
 
 ```go-html-template
 {{ with .File }}
@@ -48,8 +50,9 @@ ContentBaseName
 {{ end }}
 ```
 
-Dir
-: (`string`) The file path, excluding the file name, relative to the `content` directory.
+###### Dir
+
+(`string`) The file path, excluding the file name, relative to the `content` directory.
 
 ```go-html-template
 {{ with .File }}
@@ -57,8 +60,9 @@ Dir
 {{ end }}
 ```
 
-Ext
-: (`string`) The file extension.
+###### Ext
+
+(`string`) The file extension.
 
 ```go-html-template
 {{ with .File }}
@@ -66,8 +70,9 @@ Ext
 {{ end }}
 ```
 
-Filename
-: (`string`) The absolute file path.
+###### Filename
+
+(`string`) The absolute file path.
 
 ```go-html-template
 {{ with .File }}
@@ -75,8 +80,9 @@ Filename
 {{ end }}
 ```
 
-Lang
-: (`string`) The language associated with the given file.
+###### Lang
+
+(`string`) The language associated with the given file.
 
 ```go-html-template
 {{ with .File }}
@@ -84,8 +90,9 @@ Lang
 {{ end }}
 ```
 
-LogicalName
-: (`string`) The file name.
+###### LogicalName
+
+(`string`) The file name.
 
 ```go-html-template
 {{ with .File }}
@@ -93,8 +100,9 @@ LogicalName
 {{ end }}
 ```
 
-Path
-: (`string`) The file path, relative to the `content` directory.
+###### Path
+
+(`string`) The file path, relative to the `content` directory.
 
 ```go-html-template
 {{ with .File }}
@@ -102,8 +110,9 @@ Path
 {{ end }}
 ```
 
-TranslationBaseName
-: (`string`) The file name, excluding the extension and language identifier.
+###### TranslationBaseName
+
+(`string`) The file name, excluding the extension and language identifier.
 
 ```go-html-template
 {{ with .File }}
@@ -111,8 +120,9 @@ TranslationBaseName
 {{ end }}
 ```
 
-UniqueID
-: (`string`) The MD5 hash of `.File.Path`.
+###### UniqueID
+
+(`string`) The MD5 hash of `.File.Path`.
 
 ```go-html-template
 {{ with .File }}
index f757aa2d28ffb6a96f19c57c6f6762d4d894baaa..b3ae4c04a13f4174e1a90e1724bffc02a950c710 100644 (file)
@@ -12,7 +12,7 @@ action:
     - methods/page/IsDescendant
     - methods/page/Parent
     - methods/page/Sections
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.FirstSection]
 ---
 
index bae1c7d0392204cecdd961c7d8bb5eef308c7d44..89f82d2ce12ec9c7784d80fd4871fc0acafae6c0 100644 (file)
@@ -28,14 +28,14 @@ Use the `Fragments` method on a `Page` object to create a table of contents with
 ## Methods
 
 Headings
-: (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Title` and `Headings`. To inspect the data structure:
+: (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
 
 ```go-html-template
 <pre>{{ .Fragments.Headings | jsonify (dict "indent" "  ") }}</pre>
 ```
 
 HeadingsMap
-: (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Title` and `Headings`. To inspect the data structure:
+: (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure:
 
 ```go-html-template
 <pre>{{ .Fragments.HeadingsMap | jsonify (dict "indent" "  ") }}</pre>
index ed072932a23eb7dc5b45f893b812adf6af7abdb0..b1f192d583cd0811641332de1cdeccedc206943b 100644 (file)
@@ -6,7 +6,7 @@ keywords: []
 action:
   related:
     - methods/site/GetPage
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.GetPage PATH]
 aliases: [/functions/getpage]
 ---
index 88137614ca615e71a94b763d8d94d24e0e6c4d36..9dba2a2b20eb01216a748622809a9e5f1d78320d 100644 (file)
@@ -34,7 +34,7 @@ hugo --enableGitInfo
 ```
 
 {{% note %}}
-When you set `enableGitInto` 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`, 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.
 
 This is configurable. See&nbsp;[details].
 
@@ -43,8 +43,9 @@ This is configurable. See&nbsp;[details].
 
 ## Methods
 
-AbbreviatedHash
-: (`string`) The abbreviated commit hash.
+###### AbbreviatedHash
+
+(`string`) The abbreviated commit hash.
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -52,8 +53,9 @@ AbbreviatedHash
 {{ end }}
 ```
 
-AuthorDate
-: (`time.Time`) The author date.
+###### AuthorDate
+
+(`time.Time`) The author date.
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -61,8 +63,9 @@ AuthorDate
 {{ end }}
 ```
 
-AuthorEmail
-: (`string`) The author's email address, respecting [gitmailmap].
+###### AuthorEmail
+
+(`string`) The author's email address, respecting [gitmailmap].
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -70,8 +73,9 @@ AuthorEmail
 {{ end }}
 ```
 
-AuthorName
-: (`string`) The author's name, respecting [gitmailmap].
+###### AuthorName
+
+(`string`) The author's name, respecting [gitmailmap].
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -79,8 +83,19 @@ AuthorName
 {{ end }}
 ```
 
-Hash
-: (`string`) The commit hash.
+###### CommitDate
+
+(`time.Time`) The commit date.
+
+```go-html-template
+{{ with .GitInfo }}
+  {{ .CommitDate.Format "2006-01-02" }} → 2023-10-09
+{{ end }}
+```
+
+###### Hash
+
+(`string`) The commit hash.
 
 ```go-html-template
 {{ with .GitInfo }}
@@ -88,8 +103,9 @@ Hash
 {{ end }}
 ```
 
-Subject
-: (`string`) The commit message subject.
+###### Subject
+
+(`string`) The commit message subject.
 
 ```go-html-template
 {{ with .GitInfo }}
index 3c9e3495acc1581806633bd71de258974cf74d6f..57fc1f2f8754fe3b10a3312dead0eb6fa33fd0d7 100644 (file)
@@ -10,7 +10,7 @@ action:
     - methods/page/PrevInSection
     - methods/pages/Next
     - methods/pages/Prev
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.Next]
 toc: true
 ---
index b48ddcc624404b101da3c524714bb3a2b5cc9be0..73f82d754a1b46922d0095a9e6e406b29584221d 100644 (file)
@@ -10,7 +10,7 @@ action:
     - methods/page/Prev
     - methods/pages/Next
     - methods/pages/Prev
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.NextInSection]
 ---
 
index 2c0536bee082281a1ae99f5b80337b8a31f65469..4d81c04ef26ff0ee7bada7306a708c652d8b98fc 100644 (file)
@@ -5,7 +5,7 @@ categories: []
 keywords: []
 action:
   related: []
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.Page]
 ---
 
index ce624c3944cf959cb1bf34b117950a044fd4b719..3d79d15c5b5b52eab187c633ca99179825f9ec16 100644 (file)
@@ -18,7 +18,6 @@ With this front matter:
 title = 'Annual conference'
 date = 2023-10-17T15:11:37-07:00
 display_related = true
-event-date = '2023'
 [params.author]
   email = 'jsmith@example.org'
   name = 'John Smith'
@@ -36,8 +35,9 @@ Access the custom parameters by [chaining] the [identifiers]:
 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 "event-date" }} → 2023
+{{ index .Params "key-with-hyphens" }} → 2023
 ```
+
 [`index`]: /functions/collections/indexfunction
 [chaining]: /getting-started/glossary/#chain
 [identifiers]: /getting-started/glossary/#identifier
index dbd2cb9b3f548642eab8e6f3837926e1c4b8823b..9d9ed7ea3b4f1c3a2c334e3ad7150ca5bd2d4907 100644 (file)
@@ -12,7 +12,7 @@ action:
     - methods/page/IsAncestor
     - methods/page/IsDescendant
     - methods/page/Sections
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.Parent]
 ---
 
index be6df5aadfd7da79396805d3704ac13f333b182a..d8416df8668ff82262e61d800172a8fcde27cffb 100644 (file)
@@ -21,5 +21,5 @@ Template:
 
 ```go-html-template
 {{ $page := .Site.GetPage "/about" }}
-{{ $page.RelPermalink }} → https://example.org/docs/about/
+{{ $page.Permalink }} → https://example.org/docs/about/
 ```
index cde83b0f27554f54ab8aad6d5b9408c43e3ef69d..b1a503af53f2c88ca7299b204e52ae9d32b65a5b 100644 (file)
@@ -10,7 +10,7 @@ action:
     - methods/page/NextInSection
     - methods/pages/Prev
     - methods/pages/Next
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.Prev]
 toc: true
 ---
index 30b813350e36c7a12b1ff5e13e76c59342713de2..c09e4580f7a9d9126fd211559ca9248c63342c95 100644 (file)
@@ -10,7 +10,7 @@ action:
     - methods/pages/Next
     - methods/page/Prev
     - methods/pages/Prev
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGE.PrevInSection]
 ---
 
index 8a5972ccc22c57b161949c31be8b5be246b84dac..817e3c862ccef06a5af40ec45fca49c9a8493313 100644 (file)
@@ -21,5 +21,5 @@ Template:
 
 ```go-html-template
 {{ $page := .Site.GetPage "/about" }}
-{{ $page.Permalink }} → /docs/about/
+{{ $page.RelPermalink }} → /docs/about/
 ```
index a9fa3dab2f59834864753f20ce8bf11c4e77a4c5..140b50020ed508f6d66d9a78620cd2f0770eebb7 100644 (file)
@@ -21,8 +21,9 @@ To work with global or remote resources, see the [`resources`] functions.
 
 ## Methods
 
-ByType
-: (`resource.Resources`) Returns a collection of page resources of the given [media type], or nil if none found. The media type is typically one of `image`, `text`, `audio`, `video`, or `application`.
+###### ByType
+
+(`resource.Resources`) Returns a collection of page resources of the given [media type], or nil if none found. The media type is typically one of `image`, `text`, `audio`, `video`, or `application`.
 
 ```go-html-template
 {{ range .Resources.ByType "image" }}
@@ -32,8 +33,9 @@ ByType
 
 When working with global resources instead of page resources, use the [`resources.ByType`] function.
 
-Get
-: (`resource.Resource`) Returns a page resource from the given path, or nil if none found.
+###### Get
+
+(`resource.Resource`) Returns a page resource from the given path, or nil if none found.
 
 ```go-html-template
 {{ with .Resources.Get "images/a.jpg" }}
@@ -43,8 +45,9 @@ Get
 
 When working with global resources instead of page resources, use the [`resources.Get`] function.
 
-GetMatch
-: (`resource.Resource`) Returns the first page resource from paths matching the given [glob pattern], or nil if none found.
+###### GetMatch
+
+(`resource.Resource`) Returns the first page resource from paths matching the given [glob pattern], or nil if none found.
 
 ```go-html-template
 {{ with .Resources.GetMatch "images/*.jpg" }}
@@ -54,8 +57,9 @@ GetMatch
 
 When working with global resources instead of page resources, use the [`resources.GetMatch`] function.
 
-Match
-: (`resource.Resources`) Returns a collection of page resources from paths matching the given [glob pattern], or nil if none found.
+###### Match
+
+(`resource.Resources`) Returns a collection of page resources from paths matching the given [glob pattern], or nil if none found.
 
 ```go-html-template
 {{ range .Resources.Match "images/*.jpg" }}
index 04e1d52566344236f0bb620eb117801c73fbdbf7..8bc16034b72e83bdce91b4db275959353a046059 100644 (file)
@@ -22,25 +22,28 @@ To create a locally scoped scratch pad that is not attached to a `Page` object,
 
 ## Methods
 
-Set
-: Sets the value of a given key.
+###### Set
+
+Sets the value of a given key.
 
 ```go-html-template
 {{ .Store.Set "greeting" "Hello" }}
 ```
 
-Get
-: Gets the value of a given key.
+###### Get
+
+Gets the value of a given key.
 
 ```go-html-template
 {{ .Store.Set "greeting" "Hello" }}
 {{ .Store.Get "greeting" }} → Hello
 ```
 
-Add
-: Adds a given value to existing value(s) of the given key.
+###### Add
 
-: For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
+Adds a given value to existing value(s) of the given key.
+
+For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
 
 ```go-html-template
 {{ .Store.Set "greeting" "Hello" }}
@@ -60,8 +63,9 @@ Add
 {{ .Store.Get "greetings" }} → [Hello Welcome Cheers]
 ```
 
-SetInMap
-: Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
+###### SetInMap
+
+Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
 
 ```go-html-template
 {{ .Store.SetInMap "greetings" "english" "Hello" }}
@@ -69,8 +73,9 @@ SetInMap
 {{ .Store.Get "greetings" }} → map[english:Hello french:Bonjour]
 ```
 
-DeleteInMap
-: Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
+###### DeleteInMap
+
+Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
 
 ```go-html-template
 {{ .Store.SetInMap "greetings" "english" "Hello" }}
@@ -79,8 +84,9 @@ DeleteInMap
 {{ .Store.Get "greetings" }} → map[french:Bonjour]
 ```
 
-GetSortedMapValues
-: Returns an array of values from `key` sorted by `mapKey`.
+###### GetSortedMapValues
+
+Returns an array of values from `key` sorted by `mapKey`.
 
 ```go-html-template
 {{ .Store.SetInMap "greetings" "english" "Hello" }}
@@ -88,8 +94,9 @@ GetSortedMapValues
 {{ .Store.GetSortedMapValues "greetings" }} → [Hello Bonjour]
 ```
 
-Delete
-: Removes the given key.
+###### Delete
+
+Removes the given key.
 
 ```go-html-template
 {{ .Store.Set "greeting" "Hello" }}
index 7aaee75ab7aa62e592f78dd01139bb866da0f377..1ed256630729c0c09cb0bf6ef6f83af5d6881cbe 100644 (file)
@@ -63,8 +63,9 @@ And this template:
 {{ with .Translations }}
   <ul>
     {{ range . }}
-      {{ $lang := .Language.LanguageName}}
-      <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }} ({{ $lang }})</a></li>
+      {{ $langName := or .Language.LanguageName .Language.Lang }}
+      {{ $langCode := or .Language.LanguageCode .Language.Lang }}
+      <li><a href="{{ .RelPermalink }}" hreflang="{{ $langCode }}">{{ .LinkTitle }} ({{ $langName }})</a></li>
     {{ end }}
   </ul>
 {{ end }}
@@ -74,8 +75,8 @@ Hugo will render this list on the "Book 1" page of the English site:
 
 ```html
 <ul>
-  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
-  <li><a href="/fr/books/book-1/">Book 1 (Français)</a></li>
+  <li><a href="/de/books/book-1/" hreflang="de-DE">Book 1 (Deutsch)</a></li>
+  <li><a href="/fr/books/book-1/" hreflang="fr-FR">Book 1 (Français)</a></li>
 </ul>
 ```
 
@@ -83,6 +84,6 @@ Hugo will render this list on the "Book 2" page of the English site:
 
 ```html
 <ul>
-  <li><a href="/de/books/book-1/">Book 1 (Deutsch)</a></li>
+  <li><a href="/de/books/book-1/" hreflang="de-DE">Book 1 (Deutsch)</a></li>
 </ul>
 ```
index c09b4aadc4b5cceff934ddc825e29e0df137b916..b2650cddefe9c083a851a64b5bb84c26588cda80 100644 (file)
@@ -4,25 +4,28 @@
 
 ## Methods
 
-Set
-: Sets the value of a given key.
+###### Set
+
+Sets the value of a given key.
 
 ```go-html-template
 {{ .Scratch.Set "greeting" "Hello" }}
 ```
 
-Get
-: Gets the value of a given key.
+###### Get
+
+Gets the value of a given key.
 
 ```go-html-template
 {{ .Scratch.Set "greeting" "Hello" }}
 {{ .Scratch.Get "greeting" }} → Hello
 ```
 
-Add
-: Adds a given value to existing value(s) of the given key.
+###### Add
 
-: For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
+Adds a given value to existing value(s) of the given key.
+
+For single values, `Add` accepts values that support Go's `+` operator. If the first `Add` for a key is an array or slice, the following adds will be appended to that list.
 
 ```go-html-template
 {{ .Scratch.Set "greeting" "Hello" }}
@@ -42,8 +45,9 @@ Add
 {{ .Scratch.Get "greetings" }} → [Hello Welcome Cheers]
 ```
 
-SetInMap
-: Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
+###### SetInMap
+
+Takes a `key`, `mapKey` and `value` and adds a map of `mapKey` and `value` to the given `key`.
 
 ```go-html-template
 {{ .Scratch.SetInMap "greetings" "english" "Hello" }}
@@ -51,8 +55,9 @@ SetInMap
 {{ .Scratch.Get "greetings" }} → map[english:Hello french:Bonjour]
 ```
 
-DeleteInMap
-: Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
+###### DeleteInMap
+
+Takes a `key` and `mapKey` and removes the map of `mapKey` from the given `key`.
 
 ```go-html-template
 {{ .Scratch.SetInMap "greetings" "english" "Hello" }}
@@ -61,8 +66,9 @@ DeleteInMap
 {{ .Scratch.Get "greetings" }} → map[french:Bonjour]
 ```
 
-GetSortedMapValues
-: Returns an array of values from `key` sorted by `mapKey`.
+###### GetSortedMapValues
+
+Returns an array of values from `key` sorted by `mapKey`.
 
 ```go-html-template
 {{ .Scratch.SetInMap "greetings" "english" "Hello" }}
@@ -70,8 +76,9 @@ GetSortedMapValues
 {{ .Scratch.GetSortedMapValues "greetings" }} → [Hello Bonjour]
 ```
 
-Delete
-: Removes the given key.
+###### Delete
+
+Removes the given key.
 
 ```go-html-template
 {{ .Scratch.Set "greeting" "Hello" }}
index 638822e5de25168544a13491dcc08ad86cad4c0d..b7284609fd9c8e9b6dbff96cf190b36dc888d386 100644 (file)
@@ -10,7 +10,7 @@ action:
     - methods/page/NextInSection
     - methods/page/Prev
     - methods/page/PrevInSection
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [PAGES.Next PAGE]
 toc: true
 ---
index 3a4dcfd1d685d0f20fa7be53de09971314e3b6c2..b9ef27a4581613d41ceaf5271dc3dae765a82c49 100644 (file)
@@ -10,7 +10,7 @@ action:
     - methods/page/NextInSection
     - methods/page/Prev
     - methods/page/PrevInSection
-  returnType: hugolib.pageStates
+  returnType: page.Pages
   signatures: [PAGES.Prev PAGE]
 toc: true
 ---
index 75071153a8f86dc664a7d103a60ba7a7f942da05..765b4c92ff0bda03ec68535c3d7524e89b54a75d 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Exif
-description: Applicable to images, returns an EXIF object containing image metadata.
+description: Applicable to JPEG and TIFF images, returns an EXIF object containing image metadata.
 categories: []
 keywords: []
 action:
@@ -10,7 +10,7 @@ action:
 toc: true
 ---
 
-Applicable to images, the `Exif` method on an image `Resource` object returns an [EXIF] object containing image metadata.
+Applicable to JPEG and TIFF images, the `Exif` method on an image `Resource` object returns an [EXIF] object containing image metadata.
 
 ## Methods
 
index c9262ab485ef5e664c9a131303de32411bc11f6c..8bb58fa18e4fa70735999062fba0eae6f61243e2 100644 (file)
@@ -14,7 +14,7 @@ With this content:
 {{< code-toggle file=content/books/les-miserables.md fm=true >}}
 title = 'Les Misérables'
 author = 'Victor Hugo'
-published = 1862
+publication_year = 1862
 isbn = '978-0451419439'
 {{< /code-toggle >}}
 
index 359b836af089d701e5ed95b92a0d017e3e8a639f..2d44474850476109798a4a7d0f3040c78c2faab5 100644 (file)
@@ -7,10 +7,7 @@ action:
   related: []
   returnType: string
   signatures: [SITE.DisqusShortname]
-# deprecated 2023-10-30
-expiryDate: 2024-10-30 
-_build:
-  list: never
+expiryDate: 2024-10-30 # deprecated 2023-10-30
 ---
 
 {{% deprecated-in 0.120.0 %}}
index 1e949f37c926996dfba8825755556dd36ed80ce2..b7d4b8f32f593ed8a43949f0483536dddf3266c4 100644 (file)
@@ -6,7 +6,7 @@ keywords: []
 action:
   related:
     - methods/page/GetPage
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [SITE.GetPage PATH]
 toc: true
 ---
index 405cf0de5c7e3f5183cdfab7e2a76070006fe20e..50f479b492de98223e783bd5d15278acce2b8b31 100644 (file)
@@ -7,10 +7,7 @@ action:
   related: []
   returnType: string
   signatures: [SITE.GoogleAnalytics]
-# deprecated 2023-10-30
-expiryDate: 2024-10-30 
-_build:
-  list: never
+expiryDate: 2024-10-30 # deprecated 2023-10-30
 ---
 
 {{% deprecated-in 0.120.0 %}}
index 52612dd12ed8386a1189807ad0050303c954be30..a25491a8e8a28ac637a38ad339835c5608b5c445 100644 (file)
@@ -5,7 +5,7 @@ categories: []
 keywords: []
 action:
   related: []
-  returnType: hugolib.pageState
+  returnType: page.Page
   signatures: [SITE.Home]
 ---
 
index fdeae15fae053ea0966bded1405cf40ddcb4cbed..c009ba0de956978a0725bb6b5b9377585513e005 100644 (file)
@@ -7,10 +7,7 @@ action:
   related: []
   returnType: bool
   signatures: [SITE.IsDevelopment]
-# deprecated 2023-10-30
-expiryDate: 2024-10-30 
-_build:
-  list: never
+expiryDate: 2024-10-30 # deprecated 2023-10-30
 ---
 
 {{% deprecated-in 0.120.0 %}}
@@ -18,3 +15,7 @@ Use [`hugo.IsDevelopment`] instead.
 
 [`hugo.IsDevelopment`]: /functions/hugo/isdevelopment
 {{% /deprecated-in %}}
+
+```go-html-template
+{{ .Site.IsDevelopment }} → true/false
+```
index c19a84bc9b3672b5bdce5c6eab2772a4b87c67e0..3d5ce41b56d846b304b47e81d3d745afec3df64c 100644 (file)
@@ -7,10 +7,7 @@ action:
   related: []
   returnType: bool
   signatures: [SITE.IsServer]
-# deprecated 2023-10-30
-expiryDate: 2024-10-30 
-_build:
-  list: never
+expiryDate: 2024-10-30 # deprecated 2023-10-30
 ---
 
 {{% deprecated-in 0.120.0 %}}
@@ -18,3 +15,7 @@ Use [`hugo.IsServer`] instead.
 
 [`hugo.IsServer`]: /functions/hugo/isserver
 {{% /deprecated-in %}}
+
+```go-html-template
+{{ .Site.IsServer }} → true/false
+```
index 1967a9211260fad5da9006d68538642a691c63ce..c204fe97b2d62295bc3041be00a71821d7055969 100644 (file)
@@ -22,27 +22,27 @@ Menus can be defined and localized in several ways. Please see the [menus] secti
 A site can have multiple menus. For example, a main menu and a footer menu:
 
 {{< code-toggle file=hugo >}}
-[[menu.main]]
+[[menus.main]]
 name = 'Home'
 pageRef = '/'
 weight = 10
 
-[[menu.main]]
+[[menus.main]]
 name = 'Books'
 pageRef = '/books'
 weight = 20
 
-[[menu.main]]
+[[menus.main]]
 name = 'Films'
 pageRef = '/films'
 weight = 30
 
-[[menu.footer]]
+[[menus.footer]]
 name = 'Legal'
 pageRef = '/legal'
 weight = 10
 
-[[menu.footer]]
+[[menus.footer]]
 name = 'Privacy'
 pageRef = '/privacy'
 weight = 20
index 57c9e8e29371609a6b8d1d90dfb9a88714a40ab5..9c94729ba7e69bee1d2540bf579f1d40b7f03b4b 100644 (file)
@@ -10,7 +10,7 @@ Count
 : (`int`) Returns the number of pages to which the term is assigned.
 
 Page
-: (`hugolib.pageState`) Returns the term's `Page` object, useful for linking to the term page.
+: (`page.Page`) Returns the term's `Page` object, useful for linking to the term page.
 
 Pages
 : (`page.Pages`) Returns a `Pages` object containing the `Page` objects to which the term is assigned, sorted by [taxonomic weight]. To sort or group, use any of the [methods] available to the `Pages` object. For example, sort by the last modification date.
index 4376bbf03ce7ceb916d5027a4f1f2182fd26d807..3db2c608f146e50fb158e57d1578cbfa3dcff1f0 100644 (file)
@@ -55,7 +55,7 @@ In addition to Hugo, we are proudly using a number of other tools and services,
 - [Federalist](https://federalist.18f.gov/)
 - [Search.gov](https://www.search.gov/)  — A free, hosted search platform for federal websites.
 - [Cloud.gov](https://www.cloud.gov/)  — helps teams build, run, and authorize cloud-ready or legacy government systems quickly and cheaply.
-- [Federal CrowdSource Mobile Testing Program](https://digital.gov/services/mobile-application-testing-program/)  — Free mobile compatibility testing by feds, for feds.
+- [Federal CrowdSource Mobile Testing Program](https://digital.gov/services/service_mobile-testing-program/)  — Free mobile compatibility testing by feds, for feds.
 - [Digital Analytics Program](https://digital.gov/services/dap/)  (DAP) — A free analytics tool for measuring digital services in the federal government
 - [Section508.gov](https://www.section508.gov/)  and  [PlainLanguage.gov](https://www.plainlanguage.gov/)  resources
 - [API.data.gov](https://api.data.gov/)  — a free API management service for federal agencies
index 2e73455f063485b730ae881313d72a158d429546..cc7fe155efd2842f1d5c8c5c0907d39aa441799d 100644 (file)
@@ -25,6 +25,7 @@ Hugo ships with an internal template supporting [Google Analytics 4].
 
 Provide your tracking ID in your configuration file:
 
+**Google Analytics 4 (gtag.js)**
 {{< code-toggle file=hugo >}}
 [services.googleAnalytics]
 ID = "G-MEASUREMENT_ID"
index 2a24c03ac833d60a9159afc0f8e254eac2f0a204..406a17c38184c7aba81c59dabf34f80106491f05 100644 (file)
@@ -22,7 +22,7 @@ Layout
 : Can be set in front matter.
 
 Output Format
-: See [Custom Output Formats](/templates/output-formats). An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`, but look for less specific templates.
+: See [Custom Output Formats](/templates/output-formats). An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`), but look for less specific templates.
 
 Note that if the output format's Media Type has more than one suffix defined, only the first is considered.
 
index 4606369b6d19ec9833cb1b5c4ffc6d165fa26d6c..6e3d968cf8d1771f2b6896f8b3a3a44f9fbe2cde 100644 (file)
@@ -155,7 +155,7 @@ While you can create shortcode templates that accept both positional and named p
 
 You can also use the variable `.Page` to access all the normal [page variables][pagevars].
 
-A shortcodes can also be nested. In a nested shortcode, you can access the parent shortcode context with [`.Parent` variable][shortcodesvars]. This can be very useful for inheritance of common shortcode parameters from the root.
+Shortcodes can also be nested. In a nested shortcode, you can access the parent shortcode context with the [`.Parent`] shortcode method. This can be very useful for inheritance of common shortcode parameters from the root.
 
 ### Checking for existence
 
@@ -307,7 +307,7 @@ The rendered output of the HTML example code block will be as follows:
 
 ### Nested shortcode: image gallery
 
-Hugo's [`.Parent` shortcode variable][parent] 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 for common shortcode parameters.
+Hugo's [`.Parent`] shortcode 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 for common shortcode parameters.
 
 The following example is contrived but demonstrates the concept. Assume you have a `gallery` shortcode that expects one named `class` parameter:
 
@@ -350,7 +350,7 @@ This will output the following HTML. Note how the first two `img` shortcodes inh
 
 ## Error handling in shortcodes
 
-Use the [errorf](/functions/fmt/errorf) template func and [.Position](/variables/shortcode/) variable to get useful error messages in shortcodes:
+Use the [errorf](/functions/fmt/errorf) template function and [`.Position`] shortcode method to get useful error messages in shortcodes:
 
 ```sh
 {{ with .Get "name" }}
@@ -372,6 +372,7 @@ You can also implement your shortcodes inline -- e.g. where you use them in the
 This feature is disabled by default, but can be enabled in your site configuration:
 
 {{< code-toggle file=hugo >}}
+[security]
 enableInlineShortcodes = true
 {{< /code-toggle >}}
 
@@ -405,8 +406,8 @@ The same inline shortcode can be reused later in the same content file, with dif
 [hugosc]: /content-management/shortcodes/#using-hugo-s-built-in-shortcodes
 [lookup order]: /templates/lookup-order/
 [pagevars]: /variables/page/
-[parent]: /variables/shortcode/
-[shortcodesvars]: /variables/shortcode/
+[`.Parent`]: /methods/shortcode/parent/
+[`.Position`]: /methods/shortcode/position/
 [spfscs]: https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes
 [vimeoexample]: #single-flexible-example-vimeo
 [youtubeshortcode]: /content-management/shortcodes/#youtube
index 041174118cc92210db1bdee950962847e3e619c6..c3db0dc98f8c20e64558ea2d1ae4d44719a2e2aa 100644 (file)
@@ -29,7 +29,7 @@ A static website with a dynamic search function? Yes, Hugo provides an alternati
 : A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords.
 
 [GitHub Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae)
-: This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client-side. Although this gist uses Fuse.js for fuzzy matching, any client-side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo!
+: This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client-side. Although this gist uses Fuse.js for fuzzy matching, any client-side search tool capable of reading JSON indexes will work. Does not require npm, grunt, or other build-time tools except Hugo!
 
 [hugo-search-index](https://www.npmjs.com/package/hugo-search-index)
 : A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files.
@@ -49,7 +49,7 @@ A static website with a dynamic search function? Yes, Hugo provides an alternati
 : Algolia's Search API makes it easy to deliver a great search experience in your apps and websites. Algolia Search provides hosted full-text, numerical, faceted, and geolocalized search.
 
 [Bonsai](https://www.bonsai.io)
-: Bonsai is a fully-managed hosted Elasticsearch service that is fast, reliable, and simple to set up. Easily ingest your docs from Hugo into Elasticsearch following [this guide from the docs](https://docs.bonsai.io/hc/en-us/articles/13929190788756-Hugo).
+: Bonsai is a fully-managed hosted Elasticsearch service that is fast, reliable, and simple to set up. Easily ingest your docs from Hugo into Elasticsearch following [this guide from the docs](https://bonsai.io/docs/hugo).
 
 [ExpertRec](https://www.expertrec.com/)
 : ExpertRec is a hosted search-as-a-service solution that is fast and scalable. Set-up and integration is extremely easy and takes only a few minutes. The search settings can be modified without coding using a dashboard.
index 9aef54e8a743cb2748bd1194fd32a5128a2d0f58..aa4bb71a229cb16b4b1d155e54c5763c48275171 100644 (file)
@@ -16,13 +16,13 @@ When a project _deprecates_ something, they are telling its users:
 2. Use Thing Two instead.
 3. We're going to remove Thing One at some point in the future.
 
-[article]: https://en.wikipedia.org/wiki/Deprecation
+[reasons for deprecation]: https://en.wikipedia.org/wiki/Deprecation
 
-Think of deprecation as a statement of intent. This Wikipedia [article] describes common reasons for deprecation:
+Common [reasons for deprecation]:
 
-- The feature has been replaced by a more powerful alternative.
-- The feature contains a design flaw.
-- The feature is considered extraneous, and will be removed in the future in order to simplify the system as a whole.
+- A feature has been replaced by a more powerful alternative.
+- A feature contains a design flaw.
+- A feature is considered extraneous, and will be removed in the future in order to simplify the system as a whole.
 - A future version of the software will make major structural changes, making it impossible or impractical to support older features.
 - Standardization or increased consistency in naming.
 - A feature that once was available only independently is now combined with its co-feature.
index dc62047778cfb19f8e093f89f456a1acfad46a0a..0425ca27795f1e894ec44efd286ab64d78c8da76 100644 (file)
@@ -107,7 +107,7 @@ The most common causes are page collisions (publishing two pages to the same pat
 
 ###### Which page methods trigger content rendering?
 
-The following methods on a `Page` object triggering content rendering: `Content`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`.
+The following methods on a `Page` object trigger content rendering: `Content`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`.
 
 {{% note %}}
 For other questions please visit the [forum]. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question.
index 589d30df6b663f726c139180980bf3003ad569f3..174d6cfd9fd47b7f7eb3eb07e1824bfa56e0d945 100644 (file)
@@ -14,7 +14,7 @@ aliases: [/troubleshooting/build-performance/]
 
 ## Template metrics
 
-Hugo is fast, but inefficient templates impede performance. Enable template metrics to determine which templates take the most time, and to identify caching opportunties:
+Hugo is fast, but inefficient templates impede performance. Enable template metrics to determine which templates take the most time, and to identify caching opportunities:
 
 ```sh
 hugo --templateMetrics --templateMetricsHints
index 2cdb0dd53c0556d842f27fdf08852518c643d3ad..f599747242a1d1ecfa8d888b3e7a3fce9c4fd1cf 100644 (file)
@@ -19,9 +19,15 @@ chroma:
     - ada95
     - ada2005
     Name: Ada
+  - Aliases:
+    - agda
+    Name: Agda
   - Aliases:
     - al
     Name: AL
+  - Aliases:
+    - alloy
+    Name: Alloy
   - Aliases:
     - ng2
     Name: Angular2
@@ -198,6 +204,9 @@ chroma:
   - Aliases:
     - dart
     Name: Dart
+  - Aliases:
+    - dax
+    Name: Dax
   - Aliases:
     - diff
     - udiff
@@ -330,6 +339,9 @@ chroma:
     - handlebars
     - hbs
     Name: Handlebars
+  - Aliases:
+    - hare
+    Name: Hare
   - Aliases:
     - haskell
     - hs
@@ -501,6 +513,9 @@ chroma:
     - obj-c
     - objc
     Name: Objective-C
+  - Aliases:
+    - objectpascal
+    Name: ObjectPascal
   - Aliases:
     - ocaml
     Name: OCaml
@@ -824,6 +839,8 @@ chroma:
   - Aliases:
     - typoscripthtmldata
     Name: TypoScriptHtmlData
+  - Aliases: null
+    Name: ucode
   - Aliases:
     - v
     - vlang
@@ -1254,6 +1271,9 @@ config:
         keepEndTags: true
         keepQuotes: false
         keepWhitespace: false
+        templateDelims:
+        - ""
+        - ""
       js:
         keepVarNames: false
         precision: 0
@@ -1563,8 +1583,6 @@ config:
       getenv:
       - ^HUGO_
       - ^CI$
-    goTemplates:
-      allowActionJSTmpl: false
     http:
       mediaTypes: null
       methods:
@@ -2741,6 +2759,21 @@ tpl:
             map[string]interface {}{
               "Hugo": "Rocks!",
             }
+      TestDeprecationErr:
+        Aliases: null
+        Args: null
+        Description: ""
+        Examples: null
+      TestDeprecationInfo:
+        Aliases: null
+        Args: null
+        Description: ""
+        Examples: null
+      TestDeprecationWarn:
+        Aliases: null
+        Args: null
+        Description: ""
+        Examples: null
       Timer:
         Aliases: null
         Args: null
@@ -4364,6 +4397,16 @@ tpl:
         - - '{{ "hello = \"Hello World\"" | resources.FromString "data/greetings.toml"
             | transform.Unmarshal }}'
           - map[hello:Hello World]
+      XMLEscape:
+        Aliases: null
+        Args:
+        - s
+        Description: |-
+          XMLEscape returns the given string, removing disallowed characters then
+          escaping the result to its XML equivalent.
+        Examples:
+        - - '{{ transform.XMLEscape "<p>abc</p>" }}'
+          - '&lt;p&gt;abc&lt;/p&gt;'
     urls:
       AbsLangURL:
         Aliases:
diff --git a/go.mod b/go.mod
index b53b245e1433fe4dec9ea87738f2c34c17e15daa..ac58db6b35543d5e49765836e693246e3a2945f1 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
 
 go 1.16
 
-require github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e // indirect
+require github.com/gohugoio/gohugoioTheme v0.0.0-20240125093153-bea12fdc0b15 // indirect
diff --git a/go.sum b/go.sum
index d8cea868c90bf852090dfa70c62d897ba4608e58..3d66fb5511d903e521fefa50d9955c082ff2a11e 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -1,2 +1,4 @@
-github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e h1:X4OxWNt7weGfmRHBAQWW1gsdZBd3V/6DJMNhrYS9ALE=
-github.com/gohugoio/gohugoioTheme v0.0.0-20231111235806-77931ac4875e/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20240108005931-638ffe386bd2 h1:wa2rkKQnFxJK0czyiCiKgJZZ9fQQlzn1iFsuKryffHE=
+github.com/gohugoio/gohugoioTheme v0.0.0-20240108005931-638ffe386bd2/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
+github.com/gohugoio/gohugoioTheme v0.0.0-20240125093153-bea12fdc0b15 h1:NJvuWADEYyNmpyRScXC/1dIwy6kqLDkwB9GP3Wq4W+I=
+github.com/gohugoio/gohugoioTheme v0.0.0-20240125093153-bea12fdc0b15/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
index 02674346624c9edcb92007ce240b7e71876b18e9..209231663f5a85b754407c159fce52a0323c2db5 100644 (file)
--- a/hugo.toml
+++ b/hugo.toml
@@ -93,3 +93,8 @@ ID = 'G-MBZGKNMDWC'
 
 [taxonomies]
   category = "categories"
+
+[[cascade]]
+categories = ['commands']
+[cascade._target]
+path = '/commands/**'
diff --git a/layouts/shortcodes/new-in.html b/layouts/shortcodes/new-in.html
deleted file mode 100644 (file)
index e22a91f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-{{- /*
-Renders a "new in" button indicating the version in which a feature was added.
-
-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} version The semantic version string, with or without a leading v.
-@returns {template.HTML}
-
-@example {{< new-in 0.100.0 >}}
-*/}}
-
-{{- /* Set defaults. */}}
-{{- $majorVersionDiffThreshold := 0 }}
-{{- $minorVersionDiffThreshold := 30 }}
-{{- $displayExpirationWarning := true }}
-
-{{- /* Render. */}}
-{{- with $version := .Get 0 | strings.TrimPrefix "v" }}
-  {{- $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 }}
-    <button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 px-4 border border-gray-400 rounded shadow">
-      <a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}">New in v{{ $version }}</a>
-    </button>
-  {{- end }}
-{{- else }}
-  {{- errorf "The %q shortcode requires a positional parameter (version). See %s" .Name .Position }}
-{{- end -}}
index cc46695a58a079af76365b47434030ca039410b7..7c5633da8e75a727acc883d2b8d54decf7c26a43 100644 (file)
@@ -3,7 +3,7 @@
   command = "hugo --gc --minify"
 
   [build.environment]
-    HUGO_VERSION = "0.120.4"
+    HUGO_VERSION = "0.121.2"
 
 [context.production.environment]
   HUGO_ENV           = "production"