]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Squashed 'docs/' changes from c43daf45f..a7e1e9be8
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 7 Aug 2023 08:35:12 +0000 (10:35 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 7 Aug 2023 08:35:12 +0000 (10:35 +0200)
a7e1e9be8 Clarify front matter date fields
69df4fc22 Clarify how to determine if .Inner is populated
9046bf424 Document strings.ContainsNonSpace
8dbe5df90 Fix indentation and broken image
48ad4124e Typo: functions/after.md
d4c01b57b Link to detailed descriptions of canonfiyURLs and relativeURLs
4d9597302 Explain behaviour when appending to a slice containing other slices
69e24e44e Standardize right arrow usage
01b378726 Remove references to Google's Universal Analytics and the async template
d415bae24 Use shared file to describe regex syntax
e75dee6b8 snap: How to enable or revoke access to SSH keys
feed2d1c0 Remove hasPrefix and hasSuffix in favor of namespaced versions
3c6d2cfe5 security: Use default execution settings
461b5fcaf netlify: Hugo 0.116.1
95fac27a5 configuration: correct cacheDir description
cd9f1f929 configuration: Fix broken link
605394de4 netlify: Upgrade to Hugo 0.116.0
baf2a0f7b Merge branch 'tempv0.116.0'
ee51a9323 Update requirements for building from source
40189956d Editor tools: Remove duplicate sentence
fb0ff2621 docs: Regenerate CLI docs
e8a5665c4 Update where.md
7bc5cf15d Update hosting instructions
018a04314 docs: Update where
d33ae91cf docs: Update where function operators
9a108a664 docs: Rework the cacheDir documentation

git-subtree-dir: docs
git-subtree-split: a7e1e9be851b95e636ab5360e5151156b4f89044

56 files changed:
config/_default/security.toml
content/en/commands/hugo.md
content/en/commands/hugo_completion_bash.md
content/en/commands/hugo_config.md
content/en/commands/hugo_config_mounts.md
content/en/commands/hugo_mod_clean.md
content/en/commands/hugo_mod_graph.md
content/en/commands/hugo_mod_init.md
content/en/commands/hugo_mod_npm_pack.md
content/en/commands/hugo_mod_tidy.md
content/en/commands/hugo_mod_vendor.md
content/en/commands/hugo_mod_verify.md
content/en/commands/hugo_new_content.md
content/en/commands/hugo_server.md
content/en/content-management/multilingual.md
content/en/content-management/summaries.md
content/en/content-management/toc.md
content/en/functions/adddate.md
content/en/functions/after.md
content/en/functions/anchorize.md
content/en/functions/append.md
content/en/functions/common/index.md [new file with mode: 0644]
content/en/functions/common/regular-expressions.md [new file with mode: 0644]
content/en/functions/fileExists.md
content/en/functions/findRe.md
content/en/functions/findresubmatch.md
content/en/functions/getenv.md
content/en/functions/hasPrefix.md [deleted file]
content/en/functions/hasSuffix.md [deleted file]
content/en/functions/merge.md
content/en/functions/os.Stat.md
content/en/functions/readdir.md
content/en/functions/replacere.md
content/en/functions/scratch.md
content/en/functions/strings.ContainsNonSpace.md [new file with mode: 0644]
content/en/functions/transform.Unmarshal.md
content/en/functions/uniq.md
content/en/functions/urlize.md
content/en/functions/where.md
content/en/getting-started/configuration.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/installation/common/05-build-from-source.md
content/en/installation/linux.md
content/en/installation/windows.md
content/en/news/0.25-relnotes/index.md
content/en/templates/homepage.md
content/en/templates/internal.md
content/en/templates/lists/index.md
content/en/templates/section-templates.md
content/en/templates/shortcode-templates.md
content/en/templates/single-page-templates.md
content/en/tools/editors.md
content/en/variables/page.md
netlify.toml

index 2be3f1ba847127624cb985c1f78e3056b6cedd9b..8bd91945fefd8daba4b4abf27a8ee31355d67001 100644 (file)
@@ -1,10 +1,6 @@
 
   enableInlineShortcodes = false
 
-  [exec]
-    allow = ['^go$']
-    osEnv = ['^PATH$']
-
   [funcs]
     getenv = ['^HUGO_', '^REPOSITORY_URL$', '^BRANCH$']
 
index f521a2d1f59e17776124b6511720581ad03917b2..fa8f6d1ed54d309efe24cd219446bb61fcde6619 100644 (file)
@@ -27,7 +27,7 @@ hugo [flags]
   -D, --buildDrafts                include content marked as draft
   -E, --buildExpired               include expired content
   -F, --buildFuture                include content with publishdate in the future
-      --cacheDir string            filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string            filesystem path to cache directory
       --cleanDestinationDir        remove files from destination not found in static directories
       --clock string               set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
       --config string              config file (default is hugo.yaml|json|toml)
index 231804d09f4e672c8c42315f8ea65ca8a80f1028..875ecfc19f991a59e8199505d633dced37b65574 100644 (file)
@@ -62,3 +62,4 @@ hugo completion bash
 ### SEE ALSO
 
 * [hugo completion](/commands/hugo_completion/)         - Generate the autocompletion script for the specified shell
+
index e910a3235ac360c702fdebe71b0ebeabf44716a5..3ec3748a309e1feec4842ef38a756260fa2f3d96 100644 (file)
@@ -19,7 +19,7 @@ hugo config [command] [flags]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
       --format string       preferred file format (toml, yaml or json) (default "toml")
   -h, --help                help for config
index 59087c7714719f7f8722eda427475f7257d60809..90b171912eeb800c39cec6be82e6532d0c3925b5 100644 (file)
@@ -15,7 +15,7 @@ hugo config mounts [flags] [args]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for mounts
   -t, --theme strings       themes to use (located in /themes/THEMENAME/)
index 6ca413993f83ea235f3c3b4cb72ee8d9fa267ad3..c1c2b0c0d0a5caa16fa41cbea8902c254a22e7ea 100644 (file)
@@ -20,7 +20,7 @@ hugo mod clean [flags] [args]
 ```
       --all                 clean entire module cache
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for clean
       --pattern string      pattern matching module paths to clean (all if not set), e.g. "**hugo*"
index 55c95ca233e5463279aa22a2de2dc6d2fa869a9e..a2e2b51a311e9746b5b2a693c8dcb57fbfafa7eb 100644 (file)
@@ -21,7 +21,7 @@ hugo mod graph [flags] [args]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
       --clean               delete module cache for dependencies that fail verification
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for graph
index bef38c0501d73562fee8a3c7464da8243ed1c9fa..49b2609e13285f02d85d7fb82789bf10372afa40 100644 (file)
@@ -26,7 +26,7 @@ hugo mod init [flags] [args]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for init
   -t, --theme strings       themes to use (located in /themes/THEMENAME/)
index 4f37f40dfa4041a2b3cd989c893e5764d8ed9dab..30214d5565862c932161e70a11ee7265afbb5165 100644 (file)
@@ -29,7 +29,7 @@ hugo mod npm pack [flags] [args]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for pack
   -t, --theme strings       themes to use (located in /themes/THEMENAME/)
index b28c6a3c27de4aa120f29d188504bf9204cb7a80..803ef1c5b44bdf783a8bf8560c90ef3d1aec940f 100644 (file)
@@ -15,7 +15,7 @@ hugo mod tidy [flags] [args]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for tidy
   -t, --theme strings       themes to use (located in /themes/THEMENAME/)
index 3df56362186be31b383c8b9defb7b6da9bf68738..3a829d5fd0507dcef854c1a98fcfd05917b621e8 100644 (file)
@@ -21,7 +21,7 @@ hugo mod vendor [flags] [args]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for vendor
   -t, --theme strings       themes to use (located in /themes/THEMENAME/)
index 86f908564ab0cbcec155935fd2da1ae9d7592113..b647a2cbbd02fa7cdb22823855c5135f42918fcf 100644 (file)
@@ -19,7 +19,7 @@ hugo mod verify [flags] [args]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
       --clean               delete module cache for dependencies that fail verification
   -c, --contentDir string   filesystem path to content directory
   -h, --help                help for verify
index c7f87631cd10fec44007979e16fb77d8040a83a5..dd646766b8199677cdb173d9c0b18de8ad5852b4 100644 (file)
@@ -26,7 +26,7 @@ hugo new content [path] [flags]
 
 ```
   -b, --baseURL string      hostname (and path) to the root, e.g. https://spf13.com/
-      --cacheDir string     filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string     filesystem path to cache directory
   -c, --contentDir string   filesystem path to content directory
       --editor string       edit new content with this editor, if provided
   -f, --force               overwrite file if it already exists
index 601fd4406c0ce204a72c9db31e8874b82fe655b1..49cd1867b5bf6d79c4ef7bfdb57aaad23071ba16 100644 (file)
@@ -33,7 +33,7 @@ hugo server [command] [flags]
   -D, --buildDrafts            include content marked as draft
   -E, --buildExpired           include expired content
   -F, --buildFuture            include content with publishdate in the future
-      --cacheDir string        filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/
+      --cacheDir string        filesystem path to cache directory
       --cleanDestinationDir    remove files from destination not found in static directories
   -c, --contentDir string      filesystem path to content directory
       --disableBrowserError    do not show build errors in the browser
index 4c1f6446e0266e707d9ca342e8da06c7807f61cd..849df681f0f3ca59ed00eb906522b6a0d6408ee1 100644 (file)
@@ -506,7 +506,7 @@ See [lang.FormatNumber] and [lang.FormatNumberCustom] for details.
 With this template code:
 
 ```go-html-template
-{{ 512.5032 | lang.FormatPercent 2 }} ---> 512.50%
+{{ 512.5032 | lang.FormatPercent 2 }}  512.50%
 ```
 
 The rendered page displays:
index 4f94f95f25c64980a0a6855d110d54d87c6831a3..74c5623cbf2673c59ab73c5744ddc2dfdffe3127 100644 (file)
@@ -85,19 +85,19 @@ You can show content summaries with the following code. You could use the follow
 
 {{< code file="page-list-with-summaries.html" >}}
 {{ range first 10 .Pages }}
-    <article>
-      <!-- this <div> includes the title summary -->
-      <div>
-        <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
-        {{ .Summary }}
-      </div>
-      {{ if .Truncated }}
+  <article>
+    <!-- this <div> includes the title summary -->
+    <div>
+      <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
+      {{ .Summary }}
+    </div>
+    {{ if .Truncated }}
       <!-- This <div> includes a read more link, but only if the summary is truncated... -->
       <div>
         <a href="{{ .RelPermalink }}">Read More…</a>
       </div>
-      {{ end }}
-    </article>
+    {{ end }}
+  </article>
 {{ end }}
 {{< /code >}}
 
index e1f24378eb4fe7f32baac16684532e41196fb480..ca179c77dc178c9157a35cc3b29867f5a74a6b0d 100644 (file)
@@ -50,17 +50,17 @@ The following is an example of a very basic [single page template]:
 
 {{< code file="layout/_default/single.html" >}}
 {{ define "main" }}
-<main>
+  <main>
     <article>
-    <header>
+      <header>
         <h1>{{ .Title }}</h1>
-    </header>
-        {{ .Content }}
+      </header>
+      {{ .Content }}
     </article>
     <aside>
-        {{ .TableOfContents }}
+      {{ .TableOfContents }}
     </aside>
-</main>
+  </main>
 {{ end }}
 {{< /code >}}
 
index 96a9df833957b9f7e9c3f5ad36a4a220d8d7bf22..cae270fb88e130a27ee633b6644345bbc2281ab0 100644 (file)
@@ -13,11 +13,11 @@ relatedfuncs: [now]
 ```go-html-template
 {{ $d := "2022-01-01" | time.AsTime }}
 
-{{ $d.AddDate 0 0 1 | time.Format "2006-01-02" }} --> 2022-01-02
-{{ $d.AddDate 0 1 1 | time.Format "2006-01-02" }} --> 2022-02-02
-{{ $d.AddDate 1 1 1 | time.Format "2006-01-02" }} --> 2023-02-02
+{{ $d.AddDate 0 0 1 | time.Format "2006-01-02" }}  2022-01-02
+{{ $d.AddDate 0 1 1 | time.Format "2006-01-02" }}  2022-02-02
+{{ $d.AddDate 1 1 1 | time.Format "2006-01-02" }}  2023-02-02
 
-{{ $d.AddDate -1 -1 -1 | time.Format "2006-01-02" }} --> 2020-11-30
+{{ $d.AddDate -1 -1 -1 | time.Format "2006-01-02" }}  2020-11-30
 ```
 
 {{% note %}}
@@ -28,11 +28,11 @@ See [this explanation](https://github.com/golang/go/issues/31145#issuecomment-47
 
 ```go-html-template
 {{ $d := "2023-01-31" | time.AsTime }}
-{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} --> 2023-03-03
+{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }}  2023-03-03
 
 {{ $d := "2024-01-31" | time.AsTime }}
-{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} --> 2024-03-02
+{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }}  2024-03-02
 
 {{ $d := "2024-02-29" | time.AsTime }}
-{{ $d.AddDate 1 0 0 | time.Format "2006-01-02" }} --> 2025-03-01
+{{ $d.AddDate 1 0 0 | time.Format "2006-01-02" }}  2025-03-01
 ```
index 5318d3b0c638ffcfd09e3c171975adc8a55477f1..85aa6104dd7fa93c2255a596a7ffbaaf811dade3 100644 (file)
@@ -33,7 +33,7 @@ You can use `after` in combination with the [`first` function] and Hugo's [power
   <h2>Featured Article</h2>
   {{ range first 1 .Pages.ByPublishDate.Reverse }}
   <header>
-      <h3><a href="{{ . Permalink }}">{{ .Title }}</a></h3>
+      <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
   </header>
   <p>{{ .Description }}</p>
 {{ end }}
index bdf322a6e470f2d72343bc620b45d53a4730858c..51ef67bb2512a8dc834054bed69d869d500302e6 100644 (file)
@@ -15,10 +15,10 @@ If [Goldmark](/getting-started/configuration-markup#goldmark) is set as `default
 Since the `defaultMarkdownHandler` and this template function use the same sanitizing logic, you can use the latter to determine the ID of a header for linking with anchor tags.
 
 ```go-html-template
-{{ anchorize "This is a header" }} --> "this-is-a-header"
-{{ anchorize "This is also    a header" }} --> "this-is-also----a-header"
-{{ anchorize "main.go" }} --> "maingo"
-{{ anchorize "Article 123" }} --> "article-123"
-{{ anchorize "<- Let's try this, shall we?" }} --> "--lets-try-this-shall-we"
-{{ anchorize "Hello, 世界" }} --> "hello-世界"
+{{ anchorize "This is a header" }}  "this-is-a-header"
+{{ anchorize "This is also    a header" }}  "this-is-also----a-header"
+{{ anchorize "main.go" }}  "maingo"
+{{ anchorize "Article 123" }}  "article-123"
+{{ anchorize "<- Let's try this, shall we?" }}  "--lets-try-this-shall-we"
+{{ anchorize "Hello, 世界" }}  "hello-世界"
 ```
index 626bc124251e53c5484b32033fd328a400491640..6d7ffa24568ce5f3d024ec46278dc0ad2da4158a 100644 (file)
@@ -26,4 +26,12 @@ The same example appending a slice to a slice:
 {{ $s = $s | append (slice "d" "e") }}
 ```
 
+If a slice contains other slices, further slices will be appended as values:
+
+```go-html-template
+{{ $s := slice (slice "a" "b") (slice "c" "d") }}
+{{ $s = $s | append (slice "e" "f") (slice "g" "h") }}
+{{/* $s now contains a [][]string containing four slices:  ["a" "b"],  ["c" "d"], ["e" "f"], and ["g" "h"] */}}
+```
+
 The `append` function works for all types, including `Pages`.
diff --git a/content/en/functions/common/index.md b/content/en/functions/common/index.md
new file mode 100644 (file)
index 0000000..cbb7365
--- /dev/null
@@ -0,0 +1,3 @@
++++
+headless = true
++++
diff --git a/content/en/functions/common/regular-expressions.md b/content/en/functions/common/regular-expressions.md
new file mode 100644 (file)
index 0000000..9da3408
--- /dev/null
@@ -0,0 +1,8 @@
+When specifying the regular expression, use a raw [string literal] (backticks) instead of an interpreted string literal (double quotes) to simplify the syntax. With an interpreted string literal you must escape backslashes.
+
+Go's regular expression package implements the [RE2 syntax]. The RE2 syntax is a subset of that accepted by [PCRE], roughly speaking, and with various [caveats]. Note that the RE2 `\C` escape sequence is not supported.
+
+[caveats]: https://swtch.com/~rsc/regexp/regexp3.html#caveats
+[PCRE]: https://www.pcre.org/
+[RE2 syntax]: https://github.com/google/re2/wiki/Syntax/
+[string literal]: https://go.dev/ref/spec#String_literals
index 5a365b7c14bbf56d4a29cceeafecd30cfa9ddb80..f7b5c37e0d7ac43473da1f29554c81d64270d0f1 100644 (file)
@@ -24,11 +24,11 @@ content/
 The function returns these values:
 
 ```go-html-template
-{{ os.FileExists "content" }} --> true
-{{ os.FileExists "content/news" }} --> true
-{{ os.FileExists "content/news/article-1" }} --> false
-{{ os.FileExists "content/news/article-1.md" }} --> true
-{{ os.FileExists "news" }} --> true
-{{ os.FileExists "news/article-1" }} --> false
-{{ os.FileExists "news/article-1.md" }} --> true
+{{ os.FileExists "content" }}  true
+{{ os.FileExists "content/news" }}  true
+{{ os.FileExists "content/news/article-1" }}  false
+{{ os.FileExists "content/news/article-1.md" }}  true
+{{ os.FileExists "news" }}  true
+{{ os.FileExists "news/article-1" }}  false
+{{ os.FileExists "news/article-1.md" }}  true
 ```
index 0b8978ec6af1b640aad9146768b954db6541d46f..3c977118c8501d29929f5a57fcff1bdde63b7a1c 100644 (file)
@@ -13,21 +13,7 @@ relatedfuncs: [findRESubmatch, replaceRE]
 ---
 By default, `findRE` finds all matches. You can limit the number of matches with an optional LIMIT parameter.
 
-When specifying the regular expression, use a raw [string literal] (backticks) instead of an interpreted string literal (double quotes) to simplify the syntax. With an interpreted string literal you must escape backslashes.
-
-[string literal]: https://go.dev/ref/spec#String_literals
-
-This function uses the [RE2] regular expression library. See the [RE2 syntax documentation] for details. Note that the RE2 `\C` escape sequence is not supported.
-
-[RE2]: https://github.com/google/re2/
-[RE2 syntax documentation]: https://github.com/google/re2/wiki/Syntax/
-
-{{% note %}}
-The RE2 syntax is a subset of that accepted by [PCRE], roughly speaking, and with various [caveats].
-
-[caveats]: https://swtch.com/~rsc/regexp/regexp3.html#caveats
-[PCRE]: https://www.pcre.org/
-{{% /note %}}
+{{% readfile file="/functions/common/regular-expressions.md" %}}
 
 This example returns a slice of all second level headings (`h2` elements) within the rendered `.Content`:
 
index e1085a9c9cc886eaab94e3f2a0ca1a5e1b94e059..1f0f26b4938c787cd327e25374195bb307b6daa6 100644 (file)
@@ -14,21 +14,7 @@ relatedfuncs: [findRE, replaceRE]
 
 By default, `findRESubmatch` finds all matches. You can limit the number of matches with an optional LIMIT parameter. A return value of nil indicates no match.
 
-When specifying the regular expression, use a raw [string literal] (backticks) instead of an interpreted string literal (double quotes) to simplify the syntax. With an interpreted string literal you must escape backslashes.
-
-[string literal]: https://go.dev/ref/spec#String_literals
-
-This function uses the [RE2] regular expression library. See the [RE2 syntax documentation] for details. Note that the RE2 `\C` escape sequence is not supported.
-
-[RE2]: https://github.com/google/re2/
-[RE2 syntax documentation]: https://github.com/google/re2/wiki/Syntax/
-
-{{% note %}}
-The RE2 syntax is a subset of that accepted by [PCRE], roughly speaking, and with various [caveats].
-
-[caveats]: https://swtch.com/~rsc/regexp/regexp3.html#caveats
-[PCRE]: https://www.pcre.org/
-{{% /note %}}
+{{% readfile file="/functions/common/regular-expressions.md" %}}
 
 ## Demonstrative examples
 
index e014b7ad5c13e6beec74f75d8f462371efb944ab..daeeb653236d331ca7213895789f1352d97ca77a 100644 (file)
@@ -12,8 +12,8 @@ relatedfuncs: []
 Examples:
 
 ```go-html-template
-{{ os.Getenv "HOME" }} --> /home/victor
-{{ os.Getenv "USER" }} --> victor
+{{ os.Getenv "HOME" }}  /home/victor
+{{ os.Getenv "USER" }}  victor
 ```
 
 You can pass values when building your site:
@@ -31,8 +31,8 @@ hugo
 And then retrieve the values within a template:
 
 ```go-html-template
-{{ os.Getenv "MY_VAR1" }} --> foo
-{{ os.Getenv "MY_VAR2" }} --> bar
+{{ os.Getenv "MY_VAR1" }}  foo
+{{ os.Getenv "MY_VAR2" }}  bar
 ```
 
 With Hugo v0.91.0 and later, you must explicitly allow access to environment variables. For details, review [Hugo's Security Policy](/about/security-model/#security-policy). By default, environment variables beginning with `HUGO_` are allowed when using the `os.Getenv` function.
diff --git a/content/en/functions/hasPrefix.md b/content/en/functions/hasPrefix.md
deleted file mode 100644 (file)
index 2640445..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: hasprefix
-description: Tests whether a string begins with prefix.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
-categories: [functions]
-menu:
-  docs:
-    parent: "functions"
-keywords: [strings]
-signature: ["hasPrefix STRING PREFIX"]
-workson: []
-hugoversion:
-relatedfuncs: [hasSuffix]
-deprecated: false
-aliases: []
----
-
-* `{{ hasPrefix "Hugo" "Hu" }}` → true
diff --git a/content/en/functions/hasSuffix.md b/content/en/functions/hasSuffix.md
deleted file mode 100644 (file)
index 5ab3886..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
----
-title: hassuffix
-linkTitle: hasSuffix
-description: Tests whether a string ends with suffix.
-date: 2023-03-01
-publishdate: 2023-03-01
-lastmod: 2023-03-01
-categories: [functions]
-menu:
-docs:
-parent: "functions"
-keywords: [strings]
-signature: ["hasSuffix STRING SUFFIX"]
-workson: []
-hugoversion:
-relatedfuncs: [hasPrefix]
-deprecated: false
-aliases: []
----
-
-* `{{ hasSuffix "Hugo" "go" }}` → true
index 68e56145030c72d5ded446e4dff88f558f93f9f1..ed370549e16cf49bad1367ac585d5aa5ebbd1282 100644 (file)
@@ -27,9 +27,9 @@ Example 1
 ```go-html-template
 {{ $merged := merge $m1 $m2 $m3 }}
 
-{{ $merged.x }}   --> baz
-{{ $merged.y }}   --> wobble
-{{ $merged.z.a }} --> huey
+{{ $merged.x }}    baz
+{{ $merged.y }}    wobble
+{{ $merged.z.a }}  huey
 ```
 
 Example 2
@@ -37,9 +37,9 @@ Example 2
 ```go-html-template
 {{ $merged := merge $m3 $m2 $m1 }}
 
-{{ $merged.x }}   --> foo
-{{ $merged.y }}   --> wibble
-{{ $merged.z.a }} --> huey
+{{ $merged.x }}    foo
+{{ $merged.y }}    wibble
+{{ $merged.z.a }}  huey
 ```
 
 Example 3
@@ -47,9 +47,9 @@ Example 3
 ```go-html-template
 {{ $merged := merge $m2 $m3 $m1 }}
 
-{{ $merged.x }}   --> foo
-{{ $merged.y }}   --> wobble
-{{ $merged.z.a }} --> huey
+{{ $merged.x }}    foo
+{{ $merged.y }}    wobble
+{{ $merged.z.a }}  huey
 ```
 
 Example 4
@@ -57,9 +57,9 @@ Example 4
 ```go-html-template
 {{ $merged := merge $m1 $m3 $m2 }}
 
-{{ $merged.x }}   --> bar
-{{ $merged.y }}   --> wibble
-{{ $merged.z.a }} --> huey
+{{ $merged.x }}    bar
+{{ $merged.y }}    wibble
+{{ $merged.z.a }}  huey
 ```
 
 {{% note %}}
index 9ace3b8bfbfd574f05cfaa79627c50a4ddcf0e17..51d35ae2f50e4db9cea53700bbee9a4d583403a9 100644 (file)
@@ -13,13 +13,13 @@ The `os.Stat` function attempts to resolve the path relative to the root of your
 
 ```go-html-template
 {{ $f := os.Stat "README.md" }}
-{{ $f.IsDir }}    --> false (bool)
-{{ $f.ModTime }}  --> 2021-11-25 10:06:49.315429236 -0800 PST (time.Time)
-{{ $f.Name }}     --> README.md (string)
-{{ $f.Size }}     --> 241 (int64)
+{{ $f.IsDir }}     false (bool)
+{{ $f.ModTime }}   2021-11-25 10:06:49.315429236 -0800 PST (time.Time)
+{{ $f.Name }}      README.md (string)
+{{ $f.Size }}      241 (int64)
 
 {{ $d := os.Stat "content" }}
-{{ $d.IsDir }}    --> true (bool)
+{{ $d.IsDir }}     true (bool)
 ```
 
 Details of the `FileInfo` structure are available in the [Go documentation](https://pkg.go.dev/io/fs#FileInfo).
index 9fc4d301354fd10c9884d62a7b2087ab38e1b94f..a76e3c5f66af57368683c1b9491d3da49126cb35 100644 (file)
@@ -26,7 +26,7 @@ This template code:
 
 ```go-html-template
 {{ range os.ReadDir "content" }}
-  {{ .Name }} --> {{ .IsDir }}
+  {{ .Name }}  {{ .IsDir }}
 {{ end }}
 ```
 
index 22f81a2f58a2732771b964d3acd98151f28bca04..8c3cc13c215b8fa6e56f8bf830439066fdf6363b 100644 (file)
@@ -13,21 +13,7 @@ relatedfuncs: [findRE, FindRESubmatch, replace]
 ---
 By default, `replaceRE` replaces all matches. You can limit the number of matches with an optional LIMIT parameter.
 
-When specifying the regular expression, use a raw [string literal] (backticks) instead of an interpreted string literal (double quotes) to simplify the syntax. With an interpreted string literal you must escape backslashes.
-
-[string literal]: https://go.dev/ref/spec#String_literals
-
-This function uses the [RE2] regular expression library. See the [RE2 syntax documentation] for details. Note that the RE2 `\C` escape sequence is not supported.
-
-[RE2]: https://github.com/google/re2/
-[RE2 syntax documentation]: https://github.com/google/re2/wiki/Syntax/
-
-{{% note %}}
-The RE2 syntax is a subset of that accepted by [PCRE], roughly speaking, and with various [caveats].
-
-[caveats]: https://swtch.com/~rsc/regexp/regexp3.html#caveats
-[PCRE]: https://www.pcre.org/
-{{% /note %}}
+{{% readfile file="/functions/common/regular-expressions.md" %}}
 
 This example replaces two or more consecutive hyphens with a single hyphen:
 
index 2e00f41bde8389155510aa359919e1250d64e6dc..16e502b84d780b7ce5bbceca11a407dfa495632e 100644 (file)
@@ -72,7 +72,7 @@ Get the value of a given key.
 
 Add 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.
+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](/functions/append/) to that list.
 
 ```go-html-template
 {{ $scratch.Add "greetings" "Hello" }}
diff --git a/content/en/functions/strings.ContainsNonSpace.md b/content/en/functions/strings.ContainsNonSpace.md
new file mode 100644 (file)
index 0000000..eafe292
--- /dev/null
@@ -0,0 +1,27 @@
+---
+title: strings.ContainsNonSpace
+description: Reports whether a string contains any non-space characters as defined by Unicode’s White Space property.
+categories: [functions]
+menu:
+  docs:
+    parent: functions
+keywords: [whitespace space]
+signature: ["strings.ContainsNonSpace STRING"]
+relatedfuncs: ["strings.Contains","strings.ContainsAny"]
+---
+
+```go-html-template
+{{ strings.ContainsNonSpace "\n" }}     → false
+{{ strings.ContainsNonSpace " " }}      → false
+{{ strings.ContainsNonSpace "\n abc" }} → true
+```
+
+Common white space characters include:
+
+```text
+'\t', '\n', '\v', '\f', '\r', ' '
+```
+
+See the [Unicode Character Database] for a complete list.
+
+[Unicode Character Database]: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
index ca54337619c5a57ca9a26f346a908ccaf2ead6ad..7d0920da8fbad417aa5eecd4373e26307cff37fa 100644 (file)
@@ -62,12 +62,12 @@ The following example lists the items of an RSS feed:
 
 ```go-html-template
 {{ with resources.GetRemote "https://example.com/rss.xml" | transform.Unmarshal }}
-    {{ range .channel.item }}
-        <strong>{{ .title | plainify | htmlUnescape }}</strong><br />
-        <p>{{ .description | plainify | htmlUnescape }}</p>
-        {{ $link := .link | plainify | htmlUnescape }}
-        <a href="{{ $link }}">{{ $link }}</a><br />
-        <hr>
-    {{ end }}
+  {{ range .channel.item }}
+    <strong>{{ .title | plainify | htmlUnescape }}</strong><br>
+    <p>{{ .description | plainify | htmlUnescape }}</p>
+    {{ $link := .link | plainify | htmlUnescape }}
+    <a href="{{ $link }}">{{ $link }}</a><br>
+    <hr>
+  {{ end }}
 {{ end }}
 ```
index 4584ec5ad774136cad3c8015ef583e9fdfbc8854..aecdccf95421c2ec637e2b5a47d230e7059c03fc 100644 (file)
@@ -11,5 +11,5 @@ signature: [uniq SET]
 
 
 ```go-html-template
-{{ slice 1 3 2 1 | uniq }} --> [1 3 2]
+{{ slice 1 3 2 1 | uniq }}  [1 3 2]
 ```
index 8c9aeb1c37083e75e7b22df6dea72d6e7830b995..7a9cf25e8db6d45e3116f3f77747634f12d9b30e 100644 (file)
@@ -22,20 +22,20 @@ The following might be used as a partial within a [single page template][singlet
 
 {{< code file="layouts/partials/content-header.html" >}}
 <header>
-    <h1>{{ .Title }}</h1>
-    {{ with .Params.location }}
-        <div><a href="/locations/{{ . | urlize }}">{{ . }}</a></div>
-    {{ end }}
-    <!-- Creates a list of tags for the content and links to each of their pages -->
-    {{ with .Params.tags }}
+  <h1>{{ .Title }}</h1>
+  {{ with .Params.location }}
+    <div><a href="/locations/{{ . | urlize }}">{{ . }}</a></div>
+  {{ end }}
+  <!-- Creates a list of tags for the content and links to each of their pages -->
+  {{ with .Params.tags }}
     <ul>
-        {{ range .}}
-            <li>
-                <a href="/tags/{{ . | urlize }}">{{ . }}</a>
-            </li>
-        {{ end }}
+      {{ range .}}
+        <li>
+          <a href="/tags/{{ . | urlize }}">{{ . }}</a>
+        </li>
+      {{ end }}
     </ul>
-    {{ end }}
+  {{ end }}
 </header>
 {{< /code >}}
 
index af92619dc197971068670dd44cb78401dae91fcb..9618ea4c6391b5f0c7032c290747d3f87ace5c0f 100644 (file)
@@ -73,6 +73,9 @@ The following logical operators are available with `where`:
 `intersect`
 : `true` if a given field value that is a slice/array of strings or integers contains elements in common with the matching value; it follows the same rules as the [`intersect` function][intersect].
 
+`like`
+: `true` if a given field value matches a regular expression. Use the `like` operator to compare `string` values. Returns `false` when comparing other data types to the regular expression.
+
 ## Use `where` with boolean values
 When using booleans you should not put quotation marks.
 ```go-html-template
@@ -80,7 +83,6 @@ When using booleans you should not put quotation marks.
         <p>{{ .Title }}</p>
 {{ end }}
 ```
-  
 
 ## Use `where` with `intersect`
 
@@ -102,6 +104,18 @@ You can also put the returned value of the `where` clauses into a variable:
 {{ end }}
 {{< /code >}}
 
+## Use `where` with `like`
+
+This example matches pages where the "foo" parameter begins with "ab":
+
+```go-html-template
+{{ range where site.RegularPages "Params.foo" "like" `^ab` }}
+  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+{{ end }}
+```
+
+{{% readfile file="/functions/common/regular-expressions.md" %}}
+
 ## Use `where` with `first`
 
 Using `first` and `where` together can be very
index 91cdebd5b30a377c99e1e43aec70a70c391538c1..ea82f1b53be51cfb86c19bb56ea84b4f07f308ee 100644 (file)
@@ -168,7 +168,7 @@ Pass down default configuration values (front matter) to pages in the content tr
 
 **Default value:** false
 
-Enable to turn relative URLs into absolute.
+Enable to turn relative URLs into absolute. See [details](/content-management/urls/#canonical-urls).
 
 ### cleanDestinationDir
 
@@ -381,7 +381,7 @@ See [Related Content](/content-management/related/#configure-related-content).
 
 **Default value:** false
 
-Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
+Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. See [details](/content-management/urls/#relative-urls).
 
 ### refLinksErrorLevel
 
@@ -517,7 +517,7 @@ The `build` configuration section contains global build-related configuration op
 buildStats {{< new-in "0.115.1" >}}
 : When enabled, creates a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking.
 
-[removing unused CSS]: http://localhost:1313/hugo-pipes/postprocess/#css-purging-with-postcss
+[removing unused CSS]: /hugo-pipes/postprocess/#css-purging-with-postcss
 
 Exclude `class` attributes, `id` attributes, or tags from `hugo_stats.json` with the `disableClasses`, `disableIDs`, and `disableTags` keys.
 
@@ -824,7 +824,7 @@ You can override any of these cache settings in your own `hugo.toml`.
 ### The keywords explained
 
 `:cacheDir`
-: This is the value of the `cacheDir` configuration option if set (can also be set via OS env variable `HUGO_CACHEDIR`). It will fall back to `/opt/build/cache/hugo_cache/` on Netlify, or a `hugo_cache_$USER` directory below the OS temp dir for the others. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml).
+: See [Configure cacheDir](#configure-cachedir).
 
 `:project`
 : The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
@@ -853,3 +853,18 @@ dir
 [toml]: https://github.com/toml-lang/toml
 [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).
+
+This can be set using the `cacheDir` config option or via the OS env variable `HUGO_CACHEDIR`.
+
+If this is not set, Hugo will use, in order of preference:
+
+1. If running on Netlify: `/opt/build/cache/hugo_cache/`. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml).
+1. In a `hugo_cache` directory below the OS user cache directory as defined by Go's [os.UserCacheDir](https://pkg.go.dev/os#UserCacheDir). On Unix systems, this is `$XDG_CACHE_HOME` as specified by [basedir-spec-latest](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) if non-empty, else `$HOME/.cache`. On MacOS, this is `$HOME/Library/Caches`. On Windows, this is`%LocalAppData%`. On Plan 9, this is `$home/lib/cache`. {{< new-in "0.116.0" >}}
+1. In a  `hugo_cache_$USER` directory below the OS temp dir.
+
+If you want to know the current value of `cacheDir`, you can run `hugo config`, e.g: `hugo config | grep cachedir`.
index 47a7074b70f215a0e07814e65a73bb2c16fad244..dd8bf5583e254fb96b591e40912ee755afb21751 100644 (file)
@@ -100,7 +100,7 @@ jobs:
   build:
     runs-on: ubuntu-latest
     env:
-      HUGO_VERSION: 0.115.1
+      HUGO_VERSION: 0.115.4
     steps:
       - name: Install Hugo CLI
         run: |
index b48a392b7be9e284d0429919a5466eb2107a7647..964e656ed069d343afe265ffa192a889975e49cd 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" >}}
 variables:
-  DART_SASS_VERSION: 1.63.6
-  HUGO_VERSION: 0.115.3
+  DART_SASS_VERSION: 1.64.1
+  HUGO_VERSION: 0.115.4
   NODE_VERSION: 20.x
   GIT_DEPTH: 0
   GIT_STRATEGY: clone
@@ -46,8 +46,9 @@ pages:
     # Install Dart Sass
     - curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
     - tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz
-    - cp -r dart-sass/* /usr/local/bin
+    - cp -r dart-sass/ /usr/local/bin
     - rm -rf dart-sass*
+    - export PATH=/usr/local/bin/dart-sass:$PATH
     # Install Hugo
     - curl -LJO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
     - apt-get install -y ./hugo_extended_${HUGO_VERSION}_linux-amd64.deb
index 00cc030429b92b0e7855c987f39e36acf41e5314..91d0447558631761df9c3a5202ec3fafe243411b 100644 (file)
@@ -57,14 +57,14 @@ For production:
 
 {{< code file="netlify.toml" >}}
 [context.production.environment]
-  HUGO_VERSION = "0.99.1"
+  HUGO_VERSION = "0.115.4"
 {{< /code >}}
 
 For testing:
 
 {{< code file="netlify.toml" >}}
 [context.deploy-preview.environment]
-  HUGO_VERSION = "0.99.1"
+  HUGO_VERSION = "0.115.4"
 {{< /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 c0bd85515b56012a647e66e3ef5752646738dea8..7537882fda0fa2f5860b1636c0068bf5d29074f7 100644 (file)
@@ -1,20 +1,23 @@
 ## Build from source
 
-To build Hugo from source you must:
+To build the extended edition of Hugo from source you must:
 
 1. Install [Git]
 1. Install [Go] version 1.19 or later
-1. Update your PATH environment variable as described in the [Go documentation]
+1. Install a C compiler, either [GCC] or [Clang]
+1. Update your `PATH` environment variable as described in the [Go documentation]
 
-> The install directory is controlled by the GOPATH and GOBIN environment variables. If GOBIN is set, binaries are installed to that directory. If GOPATH is set, binaries are installed to the bin subdirectory of the first directory in the GOPATH list. Otherwise, binaries are installed to the bin subdirectory of the default GOPATH ($HOME/go or %USERPROFILE%\go).
+> The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`).
 
 Then build and test:
 
 ```sh
-go install -tags extended github.com/gohugoio/hugo@latest
+CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
 hugo version
 ```
 
+[Clang]: https://clang.llvm.org/
+[GCC]: https://gcc.gnu.org/
 [Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
-[Go]: https://go.dev/doc/install
 [Go documentation]: https://go.dev/doc/code#Command
+[Go]: https://go.dev/doc/install
index 11c6795f15f03e45fc9a93563a8d68abe3437fdf..4056b987a63ed6e87ebc13110c66790eb5bb8632 100644 (file)
@@ -29,16 +29,18 @@ This will install the extended edition of Hugo:
 sudo snap install hugo
 ```
 
-To enable access to removable media:
+To enable or revoke access to removable media:
 
 ```sh
 sudo snap connect hugo:removable-media
+sudo snap disconnect hugo:removable-media
 ```
 
-To revoke access to removable media:
+To enable or revoke access to SSH keys:
 
 ```sh
-sudo snap disconnect hugo:removable-media
+sudo snap connect hugo:ssh-keys
+sudo snap disconnect hugo:ssh-keys
 ```
 
 [most distributions]: https://snapcraft.io/docs/installing-snapd
index 9959f590a56e5a312eb4caecb5393ee0786d278e..92979d9f2501b5c5403e51aec3498a294011bbc2 100644 (file)
@@ -52,10 +52,7 @@ winget install Hugo.Hugo.Extended
 {{% readfile file="/installation/common/05-build-from-source.md" %}}
 
 {{% note %}}
-When building the extended edition of Hugo from source on Windows, you will also need to install the [GCC compiler]. See these [detailed instructions].
-
-[detailed instructions]: https://discourse.gohugo.io/t/41370
-[GCC compiler]: https://gcc.gnu.org/
+See these [detailed instructions](https://discourse.gohugo.io/t/41370) to install GCC on Windows.
 {{% /note %}}
 
 ## Comparison
index 6ceef445d31e174c65e274d269ec8f11283f941c..5ed0a2bc150c824b0aef1dc9e7e298d706b0e30d 100644 (file)
@@ -9,8 +9,6 @@ aliases: [/0-25/]
 
 Hugo `0.25` is the **Kinder Surprise**: It automatically opens the page you&#39;re working on in the browser, it adds full `AND` and `OR` support in page queries, and you can now have templates per language.
 
-![Hugo Open on Save](https://cdn-standard5.discourse.org/uploads/gohugo/optimized/2X/6/622088d4a8eacaf62bbbaa27dab19d789e10fe09_1_690x345.gif "Hugo Open on Save")
-
 If you start with `hugo server --navigateToChanged`, Hugo will navigate to the relevant page on save (see animated GIF). This is extremely useful for site-wide edits. Another very useful feature in this version is the added support for `AND` (`intersect`)  and `OR` (`union`)  filters when combined with `where`.
 
 Example:
index 5fe6902d39c632ecd95dc6c32da9f40593964c53..a176a51f2ab9de7fbf88c6bcc51c606957b13be2 100644 (file)
@@ -40,7 +40,7 @@ The following is an example of a homepage template that uses [partial][partials]
     <header class="homepage-header">
       <h1>{{ .Title }}</h1>
       {{ with .Params.subtitle }}
-      <span class="subtitle">{{ . }}</span>
+        <span class="subtitle">{{ . }}</span>
       {{ end }}
     </header>
     <div class="homepage-content">
@@ -49,7 +49,7 @@ The following is an example of a homepage template that uses [partial][partials]
     </div>
     <div>
       {{ range first 10 .Site.RegularPages }}
-          {{ .Render "summary" }}
+        {{ .Render "summary" }}
       {{ end }}
     </div>
   </main>
index 828244fa01cf92c116d2c64d32902b7dbdaae25a..ee0d7258db0a2ede049e3dd9bc765cccb8edf8b6 100644 (file)
@@ -19,12 +19,12 @@ While the following internal templates are called similar to partials, they do *
 
 ## Google Analytics
 
-Hugo ships with internal templates supporting Google Analytics, both [Google Analytics 4][GA4] (GA4) and Universal Analytics.
+Hugo ships with an internal template supporting [Google Analytics 4][GA4] (GA4).
 
-**Note:** Universal Analytics are deprecated. For details, see [Universal Analytics will be going away].
+**Note:** Universal Analytics are [deprecated].
 
 [GA4]: https://support.google.com/analytics/answer/10089681
-[Universal Analytics will be going away]: https://support.google.com/analytics/answer/11583528
+[deprecated]: https://support.google.com/analytics/answer/11583528
 
 ### Configure Google Analytics
 
@@ -35,40 +35,29 @@ Provide your tracking ID in your configuration file:
 googleAnalytics = "G-MEASUREMENT_ID"
 {{</ code-toggle >}}
 
-**Google Universal Analytics (analytics.js)**
-{{< code-toggle file="hugo" >}}
-googleAnalytics = "UA-PROPERTY_ID"
-{{</ code-toggle >}}
-
 ### Use the Google Analytics template
 
-You can then include the Google Analytics internal template:
-
-```go-html-template
-{{ template "_internal/google_analytics_async.html" . }}
-```
-
-**Note:** The async template is _not_ suitable for Google Analytics 4.
+Include the Google Analytics internal template in your templates where you want the code to appear:
 
 ```go-html-template
 {{ template "_internal/google_analytics.html" . }}
 ```
 
-If you want to create your own template, you can access the configured ID with `{{ site.Config.Services.GoogleAnalytics.ID }}`.
+To create your own template, access the configured ID with `{{ site.Config.Services.GoogleAnalytics.ID }}`.
 
 ## Disqus
 
-Hugo also ships with an internal template for [Disqus comments][disqus], a popular commenting system for both static and dynamic websites. In order to effectively use Disqus, you will need to secure a Disqus "shortname" by [signing up for the free service][disqussignup].
+Hugo also ships with an internal template for [Disqus comments][disqus], a popular commenting system for both static and dynamic websites. To effectively use Disqus, secure a Disqus "shortname" by [signing up for the free service][disqussignup].
 
 ### Configure Disqus
 
-To use Hugo's Disqus template, you first need to set a single configuration value:
+To use Hugo's Disqus template, first set up a single configuration value:
 
 {{< code-toggle file="hugo" >}}
 disqusShortname = "your-disqus-shortname"
 {{</ code-toggle >}}
 
-You also have the option to set the following in the front matter for a given piece of content:
+You can also set the following in the front matter for a given piece of content:
 
 * `disqus_identifier`
 * `disqus_title`
@@ -76,7 +65,7 @@ You also have the option to set the following in the front matter for a given pi
 
 ### Use the Disqus template
 
-To add Disqus, include the following line in templates where you want your comments to appear:
+To add Disqus, include the following line in the templates where you want your comments to appear:
 
 ```go-html-template
 {{ template "_internal/disqus.html" . }}
@@ -222,7 +211,6 @@ The code for these templates is located [here](https://github.com/gohugoio/hugo/
 
 * `_internal/disqus.html`
 * `_internal/google_analytics.html`
-* `_internal/google_analytics_async.html`
 * `_internal/opengraph.html`
 * `_internal/pagination.html`
 * `_internal/schema.html`
index 204cbcbcc07db4584dab9e439397ec2e679c4523..ec397c32becf680babf25f395c9dcb755584b77c 100644 (file)
@@ -166,13 +166,13 @@ This list template has been modified slightly from a template originally used in
 {{ partial "subheader.html" . }}
 <main>
   <div>
-   <h1>{{ .Title }}</h1>
-        <ul>
-        <!-- Renders the li.html content view for each content/posts/*.md -->
-            {{ range .Pages }}
-                {{ .Render "li" }}
-            {{ end }}
-        </ul>
+    <h1>{{ .Title }}</h1>
+    <ul>
+      <!-- Renders the li.html content view for each content/posts/*.md -->
+      {{ range .Pages }}
+        {{ .Render "li" }}
+      {{ end }}
+    </ul>
   </div>
 </main>
 {{ partial "footer.html" . }}
@@ -184,10 +184,10 @@ This list template has been modified slightly from a template originally used in
 {{ define "main" }}
 <main>
   <div>
-   <h1>{{ .Title }}</h1>
-   <!-- ranges through each of the content files associated with a particular taxonomy term and renders the summary.html content view -->
+    <h1>{{ .Title }}</h1>
+    <!-- ranges through each of the content files associated with a particular taxonomy term and renders the summary.html content view -->
     {{ range .Pages }}
-        {{ .Render "summary" }}
+      {{ .Render "summary" }}
     {{ end }}
   </div>
 </main>
index db8ffd6677f084ae319865c7a4373dac516ae947..55a6c3004a99cf749d14542a8111ce4fa38035d8 100644 (file)
@@ -46,17 +46,17 @@ Examples:
 {{< code file="layouts/_default/section.html" >}}
 {{ define "main" }}
   <main>
-      {{ .Content }}
-          <ul class="contents">
-          {{ range .Paginator.Pages }}
-              <li>{{ .Title }}
-                  <div>
-                    {{ partial "summary.html" . }}
-                  </div>
-              </li>
-          {{ end }}
-          </ul>
-      {{ partial "pagination.html" . }}
+    {{ .Content }}
+      <ul class="contents">
+        {{ range .Paginator.Pages }}
+          <li>{{ .Title }}
+            <div>
+              {{ partial "summary.html" . }}
+            </div>
+          </li>
+        {{ end }}
+      </ul>
+    {{ partial "pagination.html" . }}
   </main>
 {{ end }}
 {{< /code >}}
index f293b6d5277d8d7d4f9612bdcecf55a18caa122f..6a6700380d83477ceb4ca7c9d45e9a2fbbeffec8 100644 (file)
@@ -94,7 +94,13 @@ most helpful when the condition depends on either of the values, or both:
 
 #### `.Inner`
 
-If a closing shortcode is used, the `.Inner` variable will be populated with the content between the opening and closing shortcodes. If a closing shortcode is required, you can check the length of `.Inner` as an indicator of its existence.
+If a closing shortcode is used, the `.Inner` variable will be populated with the content between the opening and closing shortcodes. To check if `.Inner` contains anything other than white space:
+
+```go-html-template
+{{ if strings.ContainsNonSpace .Inner }}
+  Inner is not empty
+{{ end }}
+```
 
 A shortcode with content declared via the `.Inner` variable can also be declared without the content and without the closing tag by using the self-closing syntax:
 
index 861ced99d36fed05a05b3b9677389aa9970c1ee9..12e04db96a0ea1fd123c0bdefdfb8f406ef9db95 100644 (file)
@@ -36,10 +36,10 @@ This single page template makes use of Hugo [base templates], the [`.Format` fun
   </section>
   <aside id="meta">
     <div>
-    <section>
-      <h4 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
-      <h5 id="wordcount"> {{ .WordCount }} Words </h5>
-    </section>
+      <section>
+        <h4 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
+        <h5 id="wordcount"> {{ .WordCount }} Words </h5>
+      </section>
       {{ with .GetTerms "topics" }}
         <ul id="topics">
           {{ range . }}
index 92720ab42994cecef243e21ec2a298dfdb222d18..085febced28d2a69958c86b7f83622ca4e03f4ea 100644 (file)
@@ -11,8 +11,6 @@ menu:
 weight: 20
 ---
 
-The Hugo community uses a wide range of preferred tools and has developed plug-ins for some of the most popular text editors to help automate parts of your workflow.
-
 ## Sublime Text
 
 * [Hugofy](https://github.com/akmittal/Hugofy). Hugofy is a plugin for Sublime Text 3 to make life easier to use Hugo static site generator.
@@ -25,7 +23,7 @@ The Hugo community uses a wide range of preferred tools and has developed plug-i
 * [Hugo Language and Syntax Support](https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode). Hugo Language and Syntax Support is a Visual Studio Code plugin for Hugo syntax highlighting and snippets. The source code can be found [here](https://github.com/budparr/language-hugo-vscode).
 * [Hugo Themer](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-hugo-themer). Hugo Themer is an extension to help you while developing themes. It allows you to easily navigate through your theme files.
 * [Front Matter](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter). Once you go for a static site, you need to think about how you are going to manage your articles. Front matter is a tool that helps you maintain the metadata/front matter of your articles like: creation date, modified date, slug, tile, SEO check, and many more...
-* [Syntax Highlighting for Hugo Shortcodes](https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax). This extension add some syntax highlighting for Shortcodes, making visual identification of individual pieces easier.
+* [Syntax Highlighting for Hugo Shortcodes](https://marketplace.visualstudio.com/items?itemName=kaellarkin.hugo-shortcode-syntax). This extension adds some syntax highlighting for Shortcodes, making visual identification of individual pieces easier.
 
 ## Emacs
 
@@ -34,7 +32,7 @@ The Hugo community uses a wide range of preferred tools and has developed plug-i
 
 ## Vim
 
-* [Vim Hugo Helper](https://github.com/robertbasic/vim-hugo-helper). A small Vim plugin to help me with writing posts with Hugo.
+* [Vim Hugo Helper](https://github.com/robertbasic/vim-hugo-helper). A small Vim plugin that facilitates authoring pages and blog posts with Hugo.
 * [vim-hugo](https://github.com/phelipetls/vim-hugo). A Vim plugin with syntax highlighting for templates and a few other features.
 
 [formats]: /content-management/formats/
index fc6e2f567e69b415f3f32461f400f9761ab52c09..51b0b2fc1b4e6d33e74ab688dcdd8f8e933aea4f 100644 (file)
@@ -16,52 +16,52 @@ The following is a list of page-level variables. Many of these will be defined i
 ## Page variables
 
 .AlternativeOutputFormats
-: contains all alternative formats for a given page; this variable is especially useful `link rel` list in your site's `<head>`. (See [Output Formats](/templates/output-formats/).)
+: Contains all alternative formats for a given page; this variable is especially useful `link rel` list in your site's `<head>`. (See [Output Formats](/templates/output-formats/).)
 
 .Aliases
-: aliases of this page
+: Aliases of this page
 
 .Ancestors
-: get the ancestors of each page, simplify [breadcrumb navigation](/content-management/sections#example-breadcrumb-navigation) implementation complexity  
+: Get the ancestors of each page, simplify [breadcrumb navigation](/content-management/sections#example-breadcrumb-navigation) implementation complexity  
 
 .BundleType
-: the [bundle] type: `leaf`, `branch`, or an empty string if the page is not a bundle.
+: The [bundle] type: `leaf`, `branch`, or an empty string if the page is not a bundle.
 
 .Content
-: the content itself, defined below the front matter.
+: The content itself, defined below the front matter.
 
 .Data
-: the data specific to this type of page.
+: The data specific to this type of page.
 
 .Date
-: the date associated with the page; `.Date` pulls from the `date` field in a content's front matter. See also `.ExpiryDate`, `.PublishDate`, and `.Lastmod`.
+: The date associated with the page. By default, this is the front matter `date` value. See [configuring dates] for a description of fallback values and precedence. See also `.ExpiryDate`, `.Lastmod`, and `.PublishDate`.
 
 .Description
-: the description for the page.
+: The description for the page.
 
 .Draft
-: a boolean, `true` if the content is marked as a draft in the front matter.
+: A boolean, `true` if the content is marked as a draft in the front matter.
 
 .ExpiryDate
-: the date on which the content is scheduled to expire; `.ExpiryDate` pulls from the `expirydate` field in a content's front matter. See also `.PublishDate`, `.Date`, and `.Lastmod`.
+: The date on which the content is scheduled to expire. By default, this is the front matter `expiryDate` value. See [configuring dates] for a description of fallback values and precedence. See also `.Date`, `.Lastmod`, and `.PublishDate`.
 
 .File
-: filesystem-related data for this content file. See also [File Variables].
+: Filesystem-related data for this content file. See also [File Variables].
 
 .Fragments
 : Fragments returns the fragments for this page. See [Page Fragments](#page-fragments).
 
 .FuzzyWordCount
-: the approximate number of words in the content.
+: The approximate number of words in the content.
 
 .IsHome
 : `true` in the context of the [homepage](/templates/homepage/).
 
 .IsNode
-: always `false` for regular content pages.
+: Always `false` for regular content pages.
 
 .IsPage
-: always `true` for regular content pages.
+: Always `true` for regular content pages.
 
 .IsSection
 : `true` if [`.Kind`](/templates/section-templates/#page-kinds) is `section`.
@@ -70,24 +70,19 @@ The following is a list of page-level variables. Many of these will be defined i
 : `true` if there are translations to display.
 
 .Keywords
-: the meta keywords for the content.
+: The meta keywords for the content.
 
 .Kind
-: the page's *kind*. Possible return values are `page`, `home`, `section`, `taxonomy`, or `term`. Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
+: The page's *kind*. Possible return values are `page`, `home`, `section`, `taxonomy`, or `term`. Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
 
 .Language
-: a language object that points to the language's definition in the site configuration. `.Language.Lang` gives you the language code.
+: A language object that points to the language's definition in the site configuration. `.Language.Lang` gives you the language code.
 
 .Lastmod
-: the date the content was last modified. `.Lastmod` pulls from the `lastmod` field in a content's front matter.
-
- - If `lastmod` is not set, and `.GitInfo` feature is disabled, the front matter `date` field will be used.
- - If `lastmod` is not set, and `.GitInfo` feature is enabled, `.GitInfo.AuthorDate` will be used instead.
-
-See also `.ExpiryDate`, `.Date`, `.PublishDate`, and [`.GitInfo`][gitinfo].
+: The date on which the content was last modified. By default, if `enableGitInfo` is `true` in your site configuration, this is the Git author date, otherwise the front matter `lastmod` value. See [configuring dates] for a description of fallback values and precedence. See also `.Date`,`ExpiryDate`, `.PublishDate`, and [`.GitInfo`][gitinfo].
 
 .LinkTitle
-: access when creating links to the content. If set, Hugo will use the `linktitle` from the front matter before `title`.
+: Access when creating links to the content. If set, Hugo will use the `linktitle` from the front matter before `title`.
 
 .Next
 : Points up to the next [regular page](/variables/site/#site-pages) (sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath)). Example: `{{ with .Next }}{{ .Permalink }}{{ end }}`. Calling `.Next` from the first page returns `nil`.
@@ -96,20 +91,19 @@ See also `.ExpiryDate`, `.Date`, `.PublishDate`, and [`.GitInfo`][gitinfo].
 : Points up to the next [regular page](/variables/site/#site-pages) below the same top level section (e.g. in `/blog`)). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath). Example: `{{ with .NextInSection }}{{ .Permalink }}{{ end }}`. Calling `.NextInSection` from the first page returns `nil`.
 
 .OutputFormats
-: contains all formats, including the current format, for a given page. Can be combined the with [`.Get` function](/functions/get/) to grab a specific format. (See [Output Formats](/templates/output-formats/).)
+: Contains all formats, including the current format, for a given page. Can be combined the with [`.Get` function](/functions/get/) to grab a specific format. (See [Output Formats](/templates/output-formats/).)
 
 .Pages
-: a collection of associated pages. This value will be `nil` within
-  the context of regular content pages. See [`.Pages`](#pages).
+: A collection of associated pages. This value will be `nil` within the context of regular content pages. See [`.Pages`](#pages).
 
 .Permalink
-: the Permanent link for this page; see [Permalinks](/content-management/urls/)
+: The Permanent link for this page; see [Permalinks](/content-management/urls/)
 
 .Plain
-: the Page content stripped of HTML tags and presented as a string. You may need to pipe the result through the [`htmlUnescape`](/functions/htmlunescape/) function when rendering this value with the HTML [output format](/templates/output-formats#output-format-definitions).
+: The Page content stripped of HTML tags and presented as a string. You may need to pipe the result through the [`htmlUnescape`](/functions/htmlunescape/) function when rendering this value with the HTML [output format](/templates/output-formats#output-format-definitions).
 
 .PlainWords
-: the slice of strings that results from splitting .Plain into words, as defined in Go's [strings.Fields](https://pkg.go.dev/strings#Fields).
+: The slice of strings that results from splitting .Plain into words, as defined in Go's [strings.Fields](https://pkg.go.dev/strings#Fields).
 
 .Prev
 : Points down to the previous [regular page](/variables/site/#site-pages) (sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath)). Example: `{{ if .Prev }}{{ .Prev.Permalink }}{{ end }}`.  Calling `.Prev` from the last page returns `nil`.
@@ -118,71 +112,71 @@ See also `.ExpiryDate`, `.Date`, `.PublishDate`, and [`.GitInfo`][gitinfo].
 : Points down to the previous [regular page](/variables/site/#site-pages) below the same top level section (e.g. `/blog`). Pages are sorted by Hugo's [default sort](/templates/lists#default-weight--date--linktitle--filepath). Example: `{{ if .PrevInSection }}{{ .PrevInSection.Permalink }}{{ end }}`.  Calling `.PrevInSection` from the last page returns `nil`.
 
 .PublishDate
-: the date on which the content was or will be published; `.Publishdate` pulls from the `publishdate` field in a content's front matter. See also `.ExpiryDate`, `.Date`, and `.Lastmod`.
+: The date on which the content was or will be published. By default, this is the front matter `publishDate` value. See [configuring dates] for a description of fallback values and precedence. See also `.Date`, `.ExpiryDate`, and `.Lastmod`.
 
 .RawContent
-: raw markdown content without the front matter. Useful with [remarkjs.com](
+: Raw markdown content without the front matter. Useful with [remarkjs.com](
 https://remarkjs.com)
 
 .ReadingTime
-: the estimated time, in minutes, it takes to read the content.
+: The estimated time, in minutes, it takes to read the content.
 
 .Resources
-: resources such as images and CSS that are associated with this page
+: Resources such as images and CSS that are associated with this page
 
 .Ref
-: returns the permalink for a given reference (e.g., `.Ref "sample.md"`).  `.Ref` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
+: Returns the permalink for a given reference (e.g., `.Ref "sample.md"`).  `.Ref` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
 
 .RelPermalink
-: the relative permanent link for this page.
+: The relative permanent link for this page.
 
 .RelRef
-: returns the relative permalink for a given reference (e.g., `RelRef
+: Returns the relative permalink for a given reference (e.g., `RelRef
 "sample.md"`). `.RelRef` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
 
 .Site
-: see [Site Variables](/variables/site/).
+: See [Site Variables](/variables/site/).
 
 .Sites
-: returns all sites (languages). A typical use case would be to link back to the main language: `<a href="{{ .Sites.First.Home.RelPermalink }}">...</a>`.
+: Returns all sites (languages). A typical use case would be to link back to the main language: `<a href="{{ .Sites.First.Home.RelPermalink }}">...</a>`.
 
 .Sites.First
-: returns the site for the first language. If this is not a multilingual setup, it will return itself.
+: Returns the site for the first language. If this is not a multilingual setup, it will return itself.
 
 .Summary
-: a generated summary of the content for easily showing a snippet in a summary view. The breakpoint can be set manually by inserting <code>&lt;!&#x2d;&#x2d;more&#x2d;&#x2d;&gt;</code> at the appropriate place in the content page, or the summary can be written independent of the page text.  See [Content Summaries](/content-management/summaries/) for more details.
+: A generated summary of the content for easily showing a snippet in a summary view. The breakpoint can be set manually by inserting <code>&lt;!&#x2d;&#x2d;more&#x2d;&#x2d;&gt;</code> at the appropriate place in the content page, or the summary can be written independent of the page text.  See [Content Summaries](/content-management/summaries/) for more details.
 
 .TableOfContents
-: the rendered [table of contents](/content-management/toc/) for the page.
+: The rendered [table of contents](/content-management/toc/) for the page.
 
 .Title
-: the title for this page.
+: The title for this page.
 
 .Translations
-: a list of translated versions of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
+: A list of translated versions of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
 
 .TranslationKey
-: the key used to map language translations of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
+: The key used to map language translations of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
 
 .Truncated
-: a boolean, `true` if the `.Summary` is truncated. Useful for showing a "Read more..." link only when necessary.  See [Summaries](/content-management/summaries/) for more information.
+: A boolean, `true` if the `.Summary` is truncated. Useful for showing a "Read more..." link only when necessary.  See [Summaries](/content-management/summaries/) for more information.
 
 .Type
-: the [content type](/content-management/types/) of the content (e.g., `posts`).
+: The [content type](/content-management/types/) of the content (e.g., `posts`).
 
 .Weight
-: assigned weight (in the front matter) to this content, used in sorting.
+: Assigned weight (in the front matter) to this content, used in sorting.
 
 .WordCount
-: the number of words in the content.
+: The number of words in the content.
 
 ## Writable page-scoped variables
 
 [.Scratch][scratch]
-: returns a Scratch to store and manipulate data. In contrast to the [`.Store`][store] method, this scratch is reset on server rebuilds.
+: Returns a Scratch to store and manipulate data. In contrast to the [`.Store`][store] method, this scratch is reset on server rebuilds.
 
 [.Store][store]
-: returns a Scratch to store and manipulate data. In contrast to the [`.Scratch`][scratch] method, this scratch is not reset on server rebuilds.
+: Returns a Scratch to store and manipulate data. In contrast to the [`.Scratch`][scratch] method, this scratch is not reset on server rebuilds.
 
 ## Section variables and methods
 
@@ -247,7 +241,7 @@ For this reason, Hugo provides a global `page` function that you can use to acce
 {{ page.Title }}
 ```
 
-There are one caveat with this, and this isn't new, but it's worth mentioning here: There are situations in Hugo where you may see a cached value, e.g. when using `partialCached` or in a shortcode. 
+There are one caveat with this, and this isn't new, but it's worth mentioning here: There are situations in Hugo where you may see a cached value, e.g. when using `partialCached` or in a shortcode.
 
 ## Page-level params
 
@@ -318,6 +312,7 @@ author:
 {{ $.Param "author.display_name" }}
 ```
 
+[configuring dates]: /getting-started/configuration/#configure-dates
 [gitinfo]: /variables/git/
 [File Variables]: /variables/files/
 [bundle]: /content-management/page-bundles
index 3df9a72c918eda288bbae40fce9b9c294e105235..366e4f81390f3b095474452b45f106752a974b18 100644 (file)
@@ -3,7 +3,7 @@ publish = "public"
 command = "hugo --gc --minify"
 
 [context.production.environment]
-HUGO_VERSION = "0.115.4"
+HUGO_VERSION = "0.116.1"
 HUGO_ENV = "production"
 HUGO_ENABLEGITINFO = "true"
 
@@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
 command = "hugo --gc --minify --enableGitInfo"
 
 [context.split1.environment]
-HUGO_VERSION = "0.115.4"
+HUGO_VERSION = "0.116.1"
 HUGO_ENV = "production"
 
 [context.deploy-preview]
 command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
 
 [context.deploy-preview.environment]
-HUGO_VERSION = "0.115.4"
+HUGO_VERSION = "0.116.1"
 
 [context.branch-deploy]
 command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
 
 [context.branch-deploy.environment]
-HUGO_VERSION = "0.115.4"
+HUGO_VERSION = "0.116.1"
 
 [context.next.environment]
 HUGO_ENABLEGITINFO = "true"