diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_code.css b/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_code.css
index 2fb402fcf..66a2fc246 100644
--- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_code.css
+++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_code.css
@@ -9,12 +9,6 @@
margin: 0;
}
-pre, .pre {
- overflow-x: auto;
- overflow-y: hidden;
- overflow: scroll;
-}
-
code {
padding: 0.2em;
margin: 0;
@@ -23,8 +17,7 @@ code {
border-radius: 3px;
}
-
-pre code {
+pre code {
display: block;
padding: 1.5em 1.5em;
font-size: .875rem;
@@ -32,7 +25,6 @@ pre code {
overflow-x: auto;
}
-
pre {
background-color: #fff;
color: #333;
diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css
index c08fbc9dc..b5e5faa84 100644
--- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css
+++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css
@@ -4083,7 +4083,7 @@ img { max-width: 100%; }
max-width: 30em;
}
.measure-wide-l {
- max-width: 34em;
+ max-width: 40em;
}
.measure-narrow-l {
max-width: 20em;
diff --git a/_vendor/modules.txt b/_vendor/modules.txt
index d3402db0b..ecff0980d 100644
--- a/_vendor/modules.txt
+++ b/_vendor/modules.txt
@@ -1 +1 @@
-# github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3
+# github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7
diff --git a/content/en/about/hugo-and-gdpr.md b/content/en/about/hugo-and-gdpr.md
index df0234a3b..269c5d432 100644
--- a/content/en/about/hugo-and-gdpr.md
+++ b/content/en/about/hugo-and-gdpr.md
@@ -92,6 +92,9 @@ respectDoNotTrack
useSessionStorage
: Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID.
+{{% warning %}}
+`useSessionStorage` is not supported when using Google Analytics v4 (gtag.js).
+{{% /warning %}}
### Instagram
simple
diff --git a/content/en/commands/hugo.md b/content/en/commands/hugo.md
index 42744b708..b503fe40a 100644
--- a/content/en/commands/hugo.md
+++ b/content/en/commands/hugo.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo"
slug: hugo
url: /commands/hugo/
@@ -81,4 +81,4 @@ hugo [flags]
* [hugo server](/commands/hugo_server/) - A high performance webserver
* [hugo version](/commands/hugo_version/) - Print the version number of Hugo
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_check.md b/content/en/commands/hugo_check.md
index 384507179..afec5dbb3 100644
--- a/content/en/commands/hugo_check.md
+++ b/content/en/commands/hugo_check.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo check"
slug: hugo_check
url: /commands/hugo_check/
@@ -37,4 +37,4 @@ Contains some verification checks
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_check_ulimit.md b/content/en/commands/hugo_check_ulimit.md
index bfd98bde3..676560913 100644
--- a/content/en/commands/hugo_check_ulimit.md
+++ b/content/en/commands/hugo_check_ulimit.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo check ulimit"
slug: hugo_check_ulimit
url: /commands/hugo_check_ulimit/
@@ -45,4 +45,4 @@ hugo check ulimit [flags]
* [hugo check](/commands/hugo_check/) - Contains some verification checks
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_config.md b/content/en/commands/hugo_config.md
index d7f0d17b9..ad1c699dc 100644
--- a/content/en/commands/hugo_config.md
+++ b/content/en/commands/hugo_config.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo config"
slug: hugo_config
url: /commands/hugo_config/
@@ -45,4 +45,4 @@ hugo config [flags]
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo config mounts](/commands/hugo_config_mounts/) - Print the configured file mounts
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_config_mounts.md b/content/en/commands/hugo_config_mounts.md
index a8e6b4499..34755e8df 100644
--- a/content/en/commands/hugo_config_mounts.md
+++ b/content/en/commands/hugo_config_mounts.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo config mounts"
slug: hugo_config_mounts
url: /commands/hugo_config_mounts/
@@ -40,4 +40,4 @@ hugo config mounts [flags]
* [hugo config](/commands/hugo_config/) - Print the site configuration
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_convert.md b/content/en/commands/hugo_convert.md
index 1ea65ad63..f88bb3e49 100644
--- a/content/en/commands/hugo_convert.md
+++ b/content/en/commands/hugo_convert.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo convert"
slug: hugo_convert
url: /commands/hugo_convert/
@@ -47,4 +47,4 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
* [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML
* [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_convert_toJSON.md b/content/en/commands/hugo_convert_toJSON.md
index b02cf472c..b8e255087 100644
--- a/content/en/commands/hugo_convert_toJSON.md
+++ b/content/en/commands/hugo_convert_toJSON.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo convert toJSON"
slug: hugo_convert_toJSON
url: /commands/hugo_convert_tojson/
@@ -47,4 +47,4 @@ hugo convert toJSON [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_convert_toTOML.md b/content/en/commands/hugo_convert_toTOML.md
index 28ff53359..aaf935dc3 100644
--- a/content/en/commands/hugo_convert_toTOML.md
+++ b/content/en/commands/hugo_convert_toTOML.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo convert toTOML"
slug: hugo_convert_toTOML
url: /commands/hugo_convert_totoml/
@@ -47,4 +47,4 @@ hugo convert toTOML [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_convert_toYAML.md b/content/en/commands/hugo_convert_toYAML.md
index 48aef268e..d9d3c92f7 100644
--- a/content/en/commands/hugo_convert_toYAML.md
+++ b/content/en/commands/hugo_convert_toYAML.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo convert toYAML"
slug: hugo_convert_toYAML
url: /commands/hugo_convert_toyaml/
@@ -47,4 +47,4 @@ hugo convert toYAML [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_deploy.md b/content/en/commands/hugo_deploy.md
index b3b51426f..d20dddeee 100644
--- a/content/en/commands/hugo_deploy.md
+++ b/content/en/commands/hugo_deploy.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo deploy"
slug: hugo_deploy
url: /commands/hugo_deploy/
@@ -54,4 +54,4 @@ hugo deploy [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_env.md b/content/en/commands/hugo_env.md
index 39b840342..a62315ab1 100644
--- a/content/en/commands/hugo_env.md
+++ b/content/en/commands/hugo_env.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo env"
slug: hugo_env
url: /commands/hugo_env/
@@ -44,4 +44,4 @@ hugo env [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_gen.md b/content/en/commands/hugo_gen.md
index 4146e43c3..05c3bcb52 100644
--- a/content/en/commands/hugo_gen.md
+++ b/content/en/commands/hugo_gen.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo gen"
slug: hugo_gen
url: /commands/hugo_gen/
@@ -40,4 +40,4 @@ A collection of several useful generators.
* [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI.
* [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_gen_autocomplete.md b/content/en/commands/hugo_gen_autocomplete.md
index 414b5905b..3b9561366 100644
--- a/content/en/commands/hugo_gen_autocomplete.md
+++ b/content/en/commands/hugo_gen_autocomplete.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo gen autocomplete"
slug: hugo_gen_autocomplete
url: /commands/hugo_gen_autocomplete/
@@ -58,4 +58,4 @@ hugo gen autocomplete [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_gen_chromastyles.md b/content/en/commands/hugo_gen_chromastyles.md
index d09d046d7..cd9dffad3 100644
--- a/content/en/commands/hugo_gen_chromastyles.md
+++ b/content/en/commands/hugo_gen_chromastyles.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo gen chromastyles"
slug: hugo_gen_chromastyles
url: /commands/hugo_gen_chromastyles/
@@ -49,4 +49,4 @@ hugo gen chromastyles [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_gen_doc.md b/content/en/commands/hugo_gen_doc.md
index f2f5dbde3..9b7279e26 100644
--- a/content/en/commands/hugo_gen_doc.md
+++ b/content/en/commands/hugo_gen_doc.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo gen doc"
slug: hugo_gen_doc
url: /commands/hugo_gen_doc/
@@ -51,4 +51,4 @@ hugo gen doc [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_gen_man.md b/content/en/commands/hugo_gen_man.md
index 7710ea1c2..7bb21c3ae 100644
--- a/content/en/commands/hugo_gen_man.md
+++ b/content/en/commands/hugo_gen_man.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo gen man"
slug: hugo_gen_man
url: /commands/hugo_gen_man/
@@ -47,4 +47,4 @@ hugo gen man [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_import.md b/content/en/commands/hugo_import.md
index ec791678f..01520a4c2 100644
--- a/content/en/commands/hugo_import.md
+++ b/content/en/commands/hugo_import.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo import"
slug: hugo_import
url: /commands/hugo_import/
@@ -43,4 +43,4 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
* [hugo](/commands/hugo/) - hugo builds your site
* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_import_jekyll.md b/content/en/commands/hugo_import_jekyll.md
index 23721f846..d9a9487b9 100644
--- a/content/en/commands/hugo_import_jekyll.md
+++ b/content/en/commands/hugo_import_jekyll.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo import jekyll"
slug: hugo_import_jekyll
url: /commands/hugo_import_jekyll/
@@ -47,4 +47,4 @@ hugo import jekyll [flags]
* [hugo import](/commands/hugo_import/) - Import your site from others.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_list.md b/content/en/commands/hugo_list.md
index d5075ea6b..60f57a109 100644
--- a/content/en/commands/hugo_list.md
+++ b/content/en/commands/hugo_list.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo list"
slug: hugo_list
url: /commands/hugo_list/
@@ -46,4 +46,4 @@ List requires a subcommand, e.g. `hugo list drafts`.
* [hugo list expired](/commands/hugo_list_expired/) - List all posts already expired
* [hugo list future](/commands/hugo_list_future/) - List all posts dated in the future
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_list_all.md b/content/en/commands/hugo_list_all.md
index 7e17c758c..a6325b125 100644
--- a/content/en/commands/hugo_list_all.md
+++ b/content/en/commands/hugo_list_all.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo list all"
slug: hugo_list_all
url: /commands/hugo_list_all/
@@ -44,4 +44,4 @@ hugo list all [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_list_drafts.md b/content/en/commands/hugo_list_drafts.md
index 6a842bd8b..c29d52cb3 100644
--- a/content/en/commands/hugo_list_drafts.md
+++ b/content/en/commands/hugo_list_drafts.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo list drafts"
slug: hugo_list_drafts
url: /commands/hugo_list_drafts/
@@ -44,4 +44,4 @@ hugo list drafts [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_list_expired.md b/content/en/commands/hugo_list_expired.md
index 178f2b569..320eaf0d1 100644
--- a/content/en/commands/hugo_list_expired.md
+++ b/content/en/commands/hugo_list_expired.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo list expired"
slug: hugo_list_expired
url: /commands/hugo_list_expired/
@@ -44,4 +44,4 @@ hugo list expired [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_list_future.md b/content/en/commands/hugo_list_future.md
index 4b6f6df45..acc594dc7 100644
--- a/content/en/commands/hugo_list_future.md
+++ b/content/en/commands/hugo_list_future.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo list future"
slug: hugo_list_future
url: /commands/hugo_list_future/
@@ -44,4 +44,4 @@ hugo list future [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod.md b/content/en/commands/hugo_mod.md
index 993ac8efd..b726f8d8f 100644
--- a/content/en/commands/hugo_mod.md
+++ b/content/en/commands/hugo_mod.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod"
slug: hugo_mod
url: /commands/hugo_mod/
@@ -84,4 +84,4 @@ See https://gohugo.io/hugo-modules/ for more information.
* [hugo mod vendor](/commands/hugo_mod_vendor/) - Vendor all module dependencies into the _vendor directory.
* [hugo mod verify](/commands/hugo_mod_verify/) - Verify dependencies.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_clean.md b/content/en/commands/hugo_mod_clean.md
index 1d35ad0fb..0095db3fa 100644
--- a/content/en/commands/hugo_mod_clean.md
+++ b/content/en/commands/hugo_mod_clean.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod clean"
slug: hugo_mod_clean
url: /commands/hugo_mod_clean/
@@ -52,4 +52,4 @@ hugo mod clean [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_get.md b/content/en/commands/hugo_mod_get.md
index 98bd795ce..3549459fe 100644
--- a/content/en/commands/hugo_mod_get.md
+++ b/content/en/commands/hugo_mod_get.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod get"
slug: hugo_mod_get
url: /commands/hugo_mod_get/
@@ -70,4 +70,4 @@ hugo mod get [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_graph.md b/content/en/commands/hugo_mod_graph.md
index a7dc00e1f..72405b036 100644
--- a/content/en/commands/hugo_mod_graph.md
+++ b/content/en/commands/hugo_mod_graph.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod graph"
slug: hugo_mod_graph
url: /commands/hugo_mod_graph/
@@ -46,4 +46,4 @@ hugo mod graph [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_init.md b/content/en/commands/hugo_mod_init.md
index e25ffb76d..680a085cc 100644
--- a/content/en/commands/hugo_mod_init.md
+++ b/content/en/commands/hugo_mod_init.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod init"
slug: hugo_mod_init
url: /commands/hugo_mod_init/
@@ -51,4 +51,4 @@ hugo mod init [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_npm.md b/content/en/commands/hugo_mod_npm.md
index 87435cc44..02932fe04 100644
--- a/content/en/commands/hugo_mod_npm.md
+++ b/content/en/commands/hugo_mod_npm.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod npm"
slug: hugo_mod_npm
url: /commands/hugo_mod_npm/
@@ -45,4 +45,4 @@ hugo mod npm [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
* [hugo mod npm pack](/commands/hugo_mod_npm_pack/) - Experimental: Prepares and writes a composite package.json file for your project.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_npm_pack.md b/content/en/commands/hugo_mod_npm_pack.md
index 6018247f4..cefd7d2c8 100644
--- a/content/en/commands/hugo_mod_npm_pack.md
+++ b/content/en/commands/hugo_mod_npm_pack.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod npm pack"
slug: hugo_mod_npm_pack
url: /commands/hugo_mod_npm_pack/
@@ -54,4 +54,4 @@ hugo mod npm pack [flags]
* [hugo mod npm](/commands/hugo_mod_npm/) - Various npm helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_tidy.md b/content/en/commands/hugo_mod_tidy.md
index 8be23060c..436cdaf41 100644
--- a/content/en/commands/hugo_mod_tidy.md
+++ b/content/en/commands/hugo_mod_tidy.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod tidy"
slug: hugo_mod_tidy
url: /commands/hugo_mod_tidy/
@@ -40,4 +40,4 @@ hugo mod tidy [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_vendor.md b/content/en/commands/hugo_mod_vendor.md
index 8e8c3ea9d..5d1fd96cc 100644
--- a/content/en/commands/hugo_mod_vendor.md
+++ b/content/en/commands/hugo_mod_vendor.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod vendor"
slug: hugo_mod_vendor
url: /commands/hugo_mod_vendor/
@@ -47,4 +47,4 @@ hugo mod vendor [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_mod_verify.md b/content/en/commands/hugo_mod_verify.md
index 79ab88afe..753030ced 100644
--- a/content/en/commands/hugo_mod_verify.md
+++ b/content/en/commands/hugo_mod_verify.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo mod verify"
slug: hugo_mod_verify
url: /commands/hugo_mod_verify/
@@ -46,4 +46,4 @@ hugo mod verify [flags]
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_new.md b/content/en/commands/hugo_new.md
index 3d7483e9e..35816e5b6 100644
--- a/content/en/commands/hugo_new.md
+++ b/content/en/commands/hugo_new.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo new"
slug: hugo_new
url: /commands/hugo_new/
@@ -79,4 +79,4 @@ hugo new [path] [flags]
* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton)
* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_new_site.md b/content/en/commands/hugo_new_site.md
index 75427809f..f7b330e7c 100644
--- a/content/en/commands/hugo_new_site.md
+++ b/content/en/commands/hugo_new_site.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo new site"
slug: hugo_new_site
url: /commands/hugo_new_site/
@@ -48,4 +48,4 @@ hugo new site [path] [flags]
* [hugo new](/commands/hugo_new/) - Create new content for your site
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_new_theme.md b/content/en/commands/hugo_new_theme.md
index 1a91112d3..d040a252f 100644
--- a/content/en/commands/hugo_new_theme.md
+++ b/content/en/commands/hugo_new_theme.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo new theme"
slug: hugo_new_theme
url: /commands/hugo_new_theme/
@@ -10,7 +10,7 @@ Create a new theme
### Synopsis
-Create a new theme (skeleton) called [name] in the current directory.
+Create a new theme (skeleton) called [name] in ./themes.
New theme is a skeleton. Please add content to the touched files. Add your
name to the copyright line in the license and adjust the theme.toml file
as you see fit.
@@ -47,4 +47,4 @@ hugo new theme [name] [flags]
* [hugo new](/commands/hugo_new/) - Create new content for your site
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_server.md b/content/en/commands/hugo_server.md
index 9f928d4e8..fc984c742 100644
--- a/content/en/commands/hugo_server.md
+++ b/content/en/commands/hugo_server.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo server"
slug: hugo_server
url: /commands/hugo_server/
@@ -92,4 +92,4 @@ hugo server [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/commands/hugo_version.md b/content/en/commands/hugo_version.md
index 06bfa39c0..f73acc82a 100644
--- a/content/en/commands/hugo_version.md
+++ b/content/en/commands/hugo_version.md
@@ -1,5 +1,5 @@
---
-date: 2021-02-20
+date: 2021-03-21
title: "hugo version"
slug: hugo_version
url: /commands/hugo_version/
@@ -44,4 +44,4 @@ hugo version [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 20-Feb-2021
+###### Auto generated by spf13/cobra on 21-Mar-2021
diff --git a/content/en/content-management/authors.md b/content/en/content-management/authors.md
deleted file mode 100644
index a39897dd8..000000000
--- a/content/en/content-management/authors.md
+++ /dev/null
@@ -1,182 +0,0 @@
----
-title: Authors
-linktitle: Authors
-description:
-date: 2016-08-22
-publishdate: 2017-03-12
-lastmod: 2017-03-12
-keywords: [authors]
-categories: ["content management"]
-menu:
- docs:
- parent: "content-management"
- weight: 55
-weight: 55 #rem
-draft: true
-aliases: [/content/archetypes/]
-toc: true
-comments: Before this page is published, need to also update both site- and page-level variables documentation.
----
-
-Larger sites often have multiple content authors. Hugo provides standardized author profiles to organize relationships between content and content creators for sites operating under a distributed authorship model.
-
-## Author Profiles
-
-You can create a profile containing metadata for each author on your website. These profiles have to be saved under `data/_authors/`. The filename of the profile will later be used as an identifier. This way Hugo can associate content with one or multiple authors. An author's profile can be defined in the JSON, YAML, or TOML format.
-
-### Example: Author Profile
-
-Let's suppose Alice Allison is a blogger. A simple unique identifier would be `alice`. Now, we have to create a file called `alice.toml` in the `data/_authors/` directory. The following example is the standardized template written in TOML:
-
-{{< code file="data/_authors/alice.toml" >}}
-givenName = "Alice" # or firstName as alias
-familyName = "Allison" # or lastName as alias
-displayName = "Alice Allison"
-thumbnail = "static/authors/alice-thumb.jpg"
-image = "static/authors/alice-full.jpg"
-shortBio = "My name is Alice and I'm a blogger."
-bio = "My name is Alice and I'm a blogger... some other stuff"
-email = "alice.allison@email.com"
-weight = 10
-
-[social]
- facebook = "alice.allison"
- twitter = "alice"
- website = "www.example.com"
-
-[params]
- random = "whatever you want"
-{{< /code >}}
-
-All variables are optional but it's advised to fill all important ones (e.g. names and biography) because themes can vary in their usage.
-
-You can store files for the `thumbnail` and `image` attributes in the `static` folder. Then add the path to the photos relative to `static`; e.g., `/static/path/to/thumbnail.jpg`.
-
-`weight` allows you to define the order of an author in an `.Authors` list and can be accessed on list or via the `.Site.Authors` variable.
-
-The `social` section contains all the links to the social network accounts of an author. Hugo is able to generate the account links for the most popular social networks automatically. This way, you only have to enter your username. You can find a list of all supported social networks [here](#linking-social-network-accounts-automatically). All other variables, like `website` in the example above remain untouched.
-
-The `params` section can contain arbitrary data much like the same-named section in the config file. What it contains is up to you.
-
-## Associate Content Through Identifiers
-
-Earlier it was mentioned that content can be associated with an author through their corresponding identifier. In our case, blogger Alice has the identifier `alice`. In the front matter of a content file, you can create a list of identifiers and assign it to the `authors` variable. Here are examples for `alice` using YAML and TOML, respectively.
-
-```
----
-title: Why Hugo is so Awesome
-date: 2016-08-22T14:27:502:00
-authors: ["alice"]
----
-
-Nothing to read here. Move along...
-```
-
-```
-+++
-title = Why Hugo is so Awesome
-date = "2016-08-22T14:27:502:00"
-authors: ["alice"]
-+++
-
-Nothing to read here. Move along...
-```
-
-Future authors who might work on this blog post can append their identifiers to the `authors` array in the front matter as well.
-
-## Work with Templates
-
-After a successful setup it's time to give some credit to the authors by showing them on the website. Within the templates Hugo provides a list of the author's profiles if they are listed in the `authors` variable within the front matter.
-
-The list is accessible via the `.Authors` template variable. Printing all authors of a the blog post is straight forward:
-
-```
-{{ range .Authors }}
- {{ .DisplayName }}
-{{ end }}
-=> Alice Allison
-```
-
-Even if there are co-authors you may only want to show the main author. For this case you can use the `.Author` template variable **(note the singular form)**. The template variable contains the profile of the author that is first listed with his identifier in the front matter.
-
-{{% note %}}
-You can find a list of all template variables to access the profile information in [Author Variables](/variables/authors/).
-{{% /note %}}
-
-### Link Social Network Accounts
-
-As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corresponding identifiers are supported: `github`, `facebook`, `twitter`, `pinterest`, `instagram`, `youtube` and `linkedin`.
-
-This is can be done with the `.Social.URL` function. Its only parameter is the name of the social network as they are defined in the profile (e.g. `facebook`, `twitter`). Custom variables like `website` remain as they are.
-
-Most articles feature a small section with information about the author at the end. Let's create one containing the author's name, a thumbnail, a (summarized) biography and links to all social networks:
-
-{{< code file="layouts/partials/author-info.html" download="author-info.html" >}}
-{{ with .Author }}
-
{{ .DisplayName }}
-
- {{ .ShortBio }}
-
- {{ range $network, $username := .Social }}
- - {{ $network }}
- {{ end }}
-
-{{ end }}
-{{< /code >}}
-
-## Who Published What?
-
-That question can be answered with a list of all authors and another list containing all articles that they each have written. Now we have to translate this idea into templates. The [taxonomy][] feature allows us to logically group content based on information that they have in common; e.g. a tag or a category. Well, many articles share the same author, so this should sound familiar, right?
-
-In order to let Hugo know that we want to group content based on their author, we have to create a new taxonomy called `author` (the name corresponds to the variable in the front matter). Here is the snippet in a `config.yaml` and `config.toml`, respectively:
-
-```
-taxonomies:
- author: authors
-```
-
-```
-[taxonomies]
- author = "authors"
-```
-
-
-### List All Authors
-
-In the next step we can create a template to list all authors of your website. Later, the list can be accessed at `www.example.com/authors/`. Create a new template in the `layouts/taxonomy/` directory called `authors.term.html`. This template will be exclusively used for this taxonomy.
-
-{{< code file="layouts/taxonomy/author.term.html" download="author.term.html" >}}
-
-{{< /code >}}
-
-`.Data.Terms` contains the identifiers of all authors and we can range over it to create a list with all author names. The `$profile` variable gives us access to the profile of the current author. This allows you to generate a nice info box with a thumbnail, a biography and social media links, like at the [end of a blog post](#linking-social-network-accounts-automatically).
-
-### List Each Author's Publications
-
-Last but not least, we have to create the second list that contains all publications of an author. Each list will be shown in its own page and can be accessed at `www.example.com/authors/`. Replace `` with a valid author identifier like `alice`.
-
-The layout for this page can be defined in the template `layouts/taxonomy/author.html`.
-
-{{< code file="layouts/taxonomy/author.html" download="author.html" >}}
-{{ range .Pages }}
-
- written by {{ .Author.DisplayName }}
- {{ .Summary }}
-{{ end }}
-{{< /code >}}
-
-The example above generates a simple list of all posts written by a single author. Inside the loop you've access to the complete set of [page variables][pagevars]. Therefore, you can add additional information about the current posts like the publishing date or the tags.
-
-With a lot of content this list can quickly become very long. Consider to use the [pagination][] feature. It splits the list into smaller chunks and spreads them over multiple pages.
-
-[pagevars]: /variables/page/
-[pagination]: /templates/pagination/
diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md
index 576ce2fa3..5654be7f0 100644
--- a/content/en/content-management/formats.md
+++ b/content/en/content-management/formats.md
@@ -100,6 +100,8 @@ Below are all the AsciiDoc related settings in Hugo with their default values:
{{< code-toggle config="markup.asciidocExt" />}}
+Notice that for security concerns only extensions that do not have path separators (either `\`, `/` or `.`) are allowed. That means that extensions can only be invoked if they are in one's ruby's `$LOAD_PATH` (ie. most likely, the extension has been installed by the user). Any extension declared relative to the website's path will not be accepted.
+
Example of how to set extensions and attributes:
```
diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md
index a432b9851..8cd00210f 100644
--- a/content/en/content-management/image-processing/index.md
+++ b/content/en/content-management/image-processing/index.md
@@ -167,14 +167,28 @@ For color codes, see https://www.google.com/search?q=color+picker
**Note** that you also set a default background color to use, see [Image Processing Config](#image-processing-config).
-### JPEG Quality
+### JPEG and Webp Quality
-Only relevant for JPEG images, values 1 to 100 inclusive, higher is better. Default is 75.
+Only relevant for JPEG and Webp images, values 1 to 100 inclusive, higher is better. Default is 75.
```go
{{ $image.Resize "600x q50" }}
```
+{{< new-in "0.83.0" >}} Webp support was added in Hugo 0.83.0.
+
+### Hint {{< new-in "0.83.0" >}}
+
+Hint about what type of image this is. Currently only used when encoding to Webp.
+
+Default value is `photo`.
+
+Valid values are `picture`, `photo`, `drawing`, `icon`, or `text`.
+
+```go
+{{ $image.Resize "600x webp drawing" }}
+```
+
### Rotate
Rotates an image by the given angle counter-clockwise. The rotation will be performed first to get the dimensions correct. The main use of this is to be able to manually correct for [EXIF orientation](https://github.com/golang/go/issues/4341) of JPEG images.
@@ -258,9 +272,14 @@ You can configure an `imaging` section in `config.toml` with default image proce
# See https://github.com/disintegration/imaging
resampleFilter = "box"
-# Default JPEG quality setting. Default is 75.
+# Default JPEG or WEBP quality setting. Default is 75.
quality = 75
+# Default hint about what type of image. Currently only used for Webp encoding.
+# Default is "photo".
+# Valid values are "picture", "photo", "drawing", "icon", or "text".
+hint = "photo"
+
# Anchor used when cropping pictures.
# Default is "smart" which does Smart Cropping, using https://github.com/muesli/smartcrop
# Smart Cropping is content aware and tries to find the best crop for each image.
diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md
index 28bf6ab06..5e7bed87c 100644
--- a/content/en/content-management/multilingual.md
+++ b/content/en/content-management/multilingual.md
@@ -77,9 +77,9 @@ Only the obvious non-global options can be overridden per language. Examples of
You can disable one or more languages. This can be useful when working on a new translation.
-```toml
+{{< code-toggle file="config" >}}
disableLanguages = ["fr", "ja"]
-```
+{{< /code-toggle >}}
Note that you cannot disable the default content language.
@@ -330,12 +330,12 @@ From within your templates, use the `i18n` function like this:
{{ i18n "home" }}
```
-The function will search for the `"home"` id from `i18n/en-US.toml` file:
+The function will search for the `"home"` id:
-```
+{{< code-toggle file="i18n/en-US" >}}
[home]
other = "Home"
-```
+{{< /code-toggle >}}
The result will be
@@ -345,18 +345,18 @@ Home
### Query a flexible translation with variables
-Often you will want to use to the page variables in the translations strings. To do that, pass on the `.` context when calling `i18n`:
+Often you will want to use the page variables in the translation strings. To do so, pass the `.` context when calling `i18n`:
```
{{ i18n "wordCount" . }}
```
-The function will pass the `.` context to the `"wordCount"` id in `i18n/en-US.toml` file:
+The function will pass the `.` context to the `"wordCount"` id:
-```
+{{< code-toggle file="i18n/en-US" >}}
[wordCount]
other = "This article has {{ .WordCount }} words."
-```
+{{< /code-toggle >}}
Assume `.WordCount` in the context has value is 101. The result will be:
@@ -372,13 +372,13 @@ In order to meet singular/plural requirement, you must pass a dictionary (map) w
{{ i18n "readingTime" .ReadingTime }}
```
-The function will read `.Count` from `.ReadingTime` and evaluate where the number is singular (`one`) or plural (`other`). After that, it will pass to `readingTime` id in `i18n/en-US.toml` file:
+The function will read `.Count` from `.ReadingTime` and evaluate where the number is singular (`one`) or plural (`other`). After that, it will pass to `readingTime` id:
-```
+{{< code-toggle file="i18n/en-US" >}}
[readingTime]
one = "One minute to read"
other = "{{.Count}} minutes to read"
-```
+{{< /code-toggle >}}
Assume `.ReadingTime.Count` in the context has value of 525600. The result will be:
@@ -389,7 +389,7 @@ Assume `.ReadingTime.Count` in the context has value of 525600. The result will
If `.ReadingTime.Count` in the context has value is 1. The result is:
```
-One minutes to read
+One minute to read
```
In case you need to pass custom data: (`(dict "Count" 25)` is minimum requirement)
@@ -433,7 +433,7 @@ This technique extracts the day, month and year by specifying ``.Date.Day``, ``.
You can define your menus for each language independently. Creating multilingual menus works just like [creating regular menus][menus], except they're defined in language-specific blocks in the configuration file:
-```
+{{< code-toggle file="config" >}}
defaultContentLanguage = "en"
[languages.en]
@@ -454,7 +454,7 @@ languageName = "Deutsch"
url = "/"
name = "Startseite"
weight = 0
-```
+{{< /code-toggle >}}
The rendering of the main navigation works as usual. `.Site.Menus` will just contain the menu in the current language. Note that `absLangURL` below will link to the correct locale of your website. Without it, menu entries in all languages would link to the English version, since it's the default content language that resides in the root directory.
diff --git a/content/en/content-management/organization/index.md b/content/en/content-management/organization/index.md
index fa4c02520..c33a25b3a 100644
--- a/content/en/content-management/organization/index.md
+++ b/content/en/content-management/organization/index.md
@@ -33,7 +33,7 @@ The bundle documentation is **work in progress**. We will publish more comprehen
{{% /note %}}
-# Organization of Content Source
+## Organization of Content Source
In Hugo, your content should be organized in a manner that reflects the rendered website.
diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md
index bdc73a7c3..8bf8a37c8 100644
--- a/content/en/content-management/page-resources.md
+++ b/content/en/content-management/page-resources.md
@@ -1,6 +1,6 @@
---
title : "Page Resources"
-description : "Page Resources -- images, other pages, documents etc. -- have page-relative URLs and their own metadata."
+description : "Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata."
date: 2018-01-24
categories: ["content management"]
keywords: [bundle,content,resources]
@@ -13,10 +13,32 @@ menu:
parent: "content-management"
weight: 31
---
+Page resources are only accessible from [page bundles]({{< relref
+"/content-management/page-bundles" >}}), those directories with `index.md` or
+`_index.md` files at their root. Page resources are only available to the
+page with which they are bundled.
-Page resources are available for [page bundles]({{< relref "/content-management/page-bundles" >}}) only,
-i.e. a directory with either a `index.md`, or `_index.md` file at its root. Resources are only attached to
-the lowest page they are bundled with, and simple which names does not contain `index.md` are not attached any resource.
+In this example, `first-post` is a page bundle with access to 10 page resources including audio, data, documents, images, and video. Although `second-post` is also a page bundle, it has no page resources and is unable to directly access the page resources associated with `first-post`.
+
+```text
+content
+└── post
+ ├── first-post
+ │ ├── images
+ │ │ ├── a.jpg
+ │ │ ├── b.jpg
+ │ │ └── c.jpg
+ │ ├── index.md (root of page bundle)
+ │ ├── latest.html
+ │ ├── manual.json
+ │ ├── notice.md
+ │ ├── office.mp3
+ │ ├── pocket.mp4
+ │ ├── rating.pdf
+ │ └── safety.txt
+ └── second-post
+ └── index.md (root of page bundle)
+```
## Properties
diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md
index 2b4d0d632..ce3bcd1f5 100644
--- a/content/en/content-management/shortcodes.md
+++ b/content/en/content-management/shortcodes.md
@@ -64,7 +64,7 @@ and a new line with a "quoted string".` */>}}
### Shortcodes with Markdown
-In Hugo `0.55` we changed how the `%` delimiter works. Shortcodes using the `%` as the outer-most delimiter will now be fully rendered when sent to the content renderer (e.g. Blackfriday for Markdown), meaning they can be part of the generated table of contents, footnotes, etc.
+In Hugo `0.55` we changed how the `%` delimiter works. Shortcodes using the `%` as the outer-most delimiter will now be fully rendered when sent to the content renderer. They can be part of the generated table of contents, footnotes, etc.
If you want the old behavior, you can put the following line in the start of your shortcode template:
@@ -302,8 +302,8 @@ Read a more extensive description of `ref` and `relref` in the [cross references
Assuming that standard Hugo pretty URLs are turned on.
```
-Neat
-Who
+Neat
+Who
```
### `tweet`
diff --git a/content/en/content-management/syntax-highlighting.md b/content/en/content-management/syntax-highlighting.md
index a518935b1..c0c43cfac 100644
--- a/content/en/content-management/syntax-highlighting.md
+++ b/content/en/content-management/syntax-highlighting.md
@@ -36,7 +36,7 @@ Run `hugo gen chromastyles -h` for more options. See https://xyproto.github.io/s
## Highlight Shortcode
-Highlighting is carried out via the [built-in shortcode](/content-management/shortcodes/) `highlight`. `highlight` takes exactly one required parameter for the programming language to be highlighted and requires a closing shortcode. Note that `highlight` is *not* used for client-side javascript highlighting.
+Highlighting is carried out via the built-in [`highlight` shortcode](https://gohugo.io/content-management/shortcodes/#highlight). It takes exactly one required parameter for the programming language to be highlighted and requires a closing shortcode. Note that `highlight` is *not* used for client-side javascript highlighting.
Options:
diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md
index 4389b1dca..c0eb59d6d 100644
--- a/content/en/content-management/urls.md
+++ b/content/en/content-management/urls.md
@@ -83,7 +83,7 @@ The following is a list of values that can be used in a `permalink` definition i
: the content's section
`:sections`
-: the content's sections hierarchy
+: the content's sections hierarchy. {{< new-in "0.83.0" >}} Since Hugo 0.83 you can use a selection of the sections using _slice syntax_: `:sections[1:]` includes all but the first, `:sections[:last]` includes all but the last, `:sections[last]` includes only the last, `:sections[1:2]` includes section 2 and 3. Note that this slice access will not throw any out-of-bounds errors, so you don't have to be exact.
`:title`
: the content's title
@@ -202,7 +202,7 @@ The following demonstrates the concept:
```
content/posts/_index.md
-=> example.com/posts/index.html
+=> example.com/posts/
content/posts/post-1.md
=> example.com/posts/post-1/
```
diff --git a/content/en/functions/NumFmt.md b/content/en/functions/NumFmt.md
index 1bc07abd5..9b51f597f 100644
--- a/content/en/functions/NumFmt.md
+++ b/content/en/functions/NumFmt.md
@@ -2,7 +2,6 @@
title: lang.NumFmt
description: "Formats a number with a given precision using the requested `negative`, `decimal`, and `grouping` options. The `options` parameter is a string consisting of ` `."
godocref: ""
-workson: []
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-08-21
diff --git a/content/en/functions/adddate.md b/content/en/functions/adddate.md
index 19eabff7f..4c5807f71 100644
--- a/content/en/functions/adddate.md
+++ b/content/en/functions/adddate.md
@@ -25,14 +25,14 @@ The `AddDate` function takes three arguments in logical order of `years`, `month
Let's assume you have a file at `data/tweets.toml` that contains a list of Tweets to display on your site's homepage. The file is filled with `[[tweet]]` blocks; e.g.---
-```
+{{< code-toggle file="data/tweets" >}}
[[tweet]]
name = "Steve Francia"
twitter_handle = "@spf13"
quote = "I'm creator of Hugo. #metadocreference"
link = "https://twitter.com/spf13"
date = "2017-01-07T00:00:00Z"
-```
+{{< /code-toggle >}}
Let's assume you want to grab Tweets from the last two years and present them in a random order. In conjunction with the [`where`](/functions/where/) and [`now`](/functions/now/) functions, you can limit our range to the last two years via `now.AddDate -2 0 0`, which represents a point in time 2 years, 0 days, and 0 hours before the time of your last site build.
diff --git a/content/en/functions/anchorize.md b/content/en/functions/anchorize.md
index a0745edaf..87aea2354 100644
--- a/content/en/functions/anchorize.md
+++ b/content/en/functions/anchorize.md
@@ -1,6 +1,6 @@
---
title: anchorize
-description: Takes a string and sanitizes it the same way as Blackfriday does for markdown headers.
+description: Takes a string and sanitizes it the same way as the [`defaultMarkdownHandler`](https://gohugo.io/getting-started/configuration-markup#configure-markup) does for markdown headers.
date: 2018-10-13
categories: [functions]
menu:
@@ -13,8 +13,9 @@ workson: []
relatedfuncs: [humanize]
---
-The template function uses the [`SanitizedAnchorName` logic from Blackfriday](https://github.com/russross/blackfriday#sanitized-anchor-names).
-Since the same sanitizing logic is used as the markdown parser, you can determine the ID of a header for linking with anchor tags.
+If [Goldmark](https://gohugo.io/getting-started/configuration-markup#goldmark) is set as `defaultMarkdownHandler`, the sanitizing logic adheres to the setting [`markup.goldmark.parser.autoHeadingIDType`](https://gohugo.io/getting-started/configuration-markup#goldmark). If [Blackfriday](https://gohugo.io/getting-started/configuration-markup#blackfriday) is set as `defaultMarkdownHandler`, this template function uses the [`SanitizedAnchorName` logic from Blackfriday](https://github.com/russross/blackfriday#sanitized-anchor-names) (the same applies when `markup.goldmark.parser.autoHeadingIDType` is set to `blackfriday`).
+
+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.
```
{{anchorize "This is a header"}} → "this-is-a-header"
diff --git a/content/en/functions/dateformat.md b/content/en/functions/dateformat.md
index 5a7afed97..e5fb3608d 100644
--- a/content/en/functions/dateformat.md
+++ b/content/en/functions/dateformat.md
@@ -17,7 +17,7 @@ relatedfuncs: [Format,now,Unix,time]
deprecated: false
---
-`dateFormat` converts the textual representation of the `datetime` into the specified format or returns it as a Go `time.Time` type value. These are formatted with the layout string.
+`dateFormat` converts a timestamp string `INPUT` into the format specified by the `LAYOUT` string.
```
{{ dateFormat "Monday, Jan 2, 2006" "2015-01-21" }} → "Wednesday, Jan 21, 2015"
@@ -27,5 +27,6 @@ deprecated: false
As of v0.19 of Hugo, the `dateFormat` function is *not* supported as part of Hugo's [multilingual feature](/content-management/multilingual/).
{{% /warning %}}
-See the [`Format` function](/functions/format/) for a more complete list of date formatting options in your templates.
+See [Go’s Layout String](/functions/format/#gos-layout-string) to learn about how the `LAYOUT` string has to be formatted. There are also some useful examples.
+See the [`time` function](/functions/time/) to convert a timestamp string to a Go `time.Time` type value.
diff --git a/content/en/functions/delimit.md b/content/en/functions/delimit.md
index 083e8baf8..2d13570f6 100644
--- a/content/en/functions/delimit.md
+++ b/content/en/functions/delimit.md
@@ -2,7 +2,6 @@
title: delimit
description: Loops through any array, slice, or map and returns a string of all the values separated by a delimiter.
godocref:
-workson: []
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
diff --git a/content/en/functions/dict.md b/content/en/functions/dict.md
index 76fdde284..68088bae4 100644
--- a/content/en/functions/dict.md
+++ b/content/en/functions/dict.md
@@ -2,7 +2,6 @@
title: dict
description: Creates a dictionary from a list of key and value pairs.
godocref:
-workson: []
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-26
diff --git a/content/en/functions/hugo.md b/content/en/functions/hugo.md
index 099a5fa96..78f5018c4 100644
--- a/content/en/functions/hugo.md
+++ b/content/en/functions/hugo.md
@@ -41,6 +41,9 @@ hugo.CommitHash
hugo.BuildDate
: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`
+hugo.IsExtended {{< new-in "0.83.0" >}}
+: whether this is the extended Hugo binary.
+
hugo.IsProduction
: returns true if `hugo.Environment` is set to the production environment
diff --git a/content/en/functions/index-function.md b/content/en/functions/index-function.md
index 88dec29dc..eb3d6fd2c 100644
--- a/content/en/functions/index-function.md
+++ b/content/en/functions/index-function.md
@@ -52,13 +52,13 @@ Assume you want to add a `location = ""` field to your front matter for every ar
└── provo.toml
```
-Here is an example of the data inside `data/locations/oslo.toml`:
+Here is an example:
-```
+{{< code-toggle file="data/locations/oslo" >}}
website = "https://www.oslo.kommune.no"
pop_city = 658390
pop_metro = 1717900
-```
+{{< /code-toggle >}}
The example we will use will be an article on Oslo, whose front matter should be set to exactly the same name as the corresponding file name in `data/locations/`:
diff --git a/content/en/functions/lang.Merge.md b/content/en/functions/lang.Merge.md
index d2fadea12..a80362877 100644
--- a/content/en/functions/lang.Merge.md
+++ b/content/en/functions/lang.Merge.md
@@ -2,7 +2,6 @@
title: lang.Merge
description: "Merge missing translations from other languages."
godocref: ""
-workson: []
date: 2018-03-16
categories: [functions]
keywords: [multilingual]
diff --git a/content/en/functions/markdownify.md b/content/en/functions/markdownify.md
index 50cf3e120..5baf1db57 100644
--- a/content/en/functions/markdownify.md
+++ b/content/en/functions/markdownify.md
@@ -23,3 +23,8 @@ aliases: []
```
{{ .Title | markdownify }}
```
+
+*Note*: if you need [Render Hooks][], which `markdownify` doesn't currently
+support, use [.RenderString](/functions/renderstring/) instead.
+
+[Render Hooks]: /getting-started/configuration-markup/#markdown-render-hooks
\ No newline at end of file
diff --git a/content/en/functions/merge.md b/content/en/functions/merge.md
index cae806d4c..a2c4cb87c 100644
--- a/content/en/functions/merge.md
+++ b/content/en/functions/merge.md
@@ -14,14 +14,14 @@ relatedfuncs: [dict, append, reflect.IsMap, reflect.IsSlice]
aliases: []
---
-Merge creates a copy of the final `MAP` and merges any preceeding `MAP` into it in reverse order.
+Merge creates a copy of the final `MAP` and merges any preceding `MAP` into it in reverse order.
Key handling is case-insensitive.
An example merging two maps.
```go-html-template
-{{ $default_params := dict "color" "blue" "width" "50%" "height" "25%" }}
-{{ $user_params := dict "color" "red" "extra" (dict "duration" 2) }}
+{{ $default_params := dict "color" "blue" "width" "50%" "height" "25%" "icon" "star" }}
+{{ $user_params := dict "color" "red" "icon" "mail" "extra" (dict "duration" 2) }}
{{ $params := merge $default_params $user_params }}
```
@@ -39,5 +39,3 @@ Resulting __$params__:
{{% note %}}
Regardless of depth, merging only applies to maps. For slices, use [append]({{< ref "functions/append" >}})
{{% /note %}}
-
-
diff --git a/content/en/functions/path.Split.md b/content/en/functions/path.Split.md
index 2d6aff6bb..c9c32ac56 100644
--- a/content/en/functions/path.Split.md
+++ b/content/en/functions/path.Split.md
@@ -25,7 +25,7 @@ If there is no slash in `PATH`, it returns an empty directory and the base is se
**Note:** On Windows, `PATH` is converted to slash (`/`) separators.
```
-{{ $dirFile := path.Split "a/news.html" }} → $dirDile.Dir → "a/", $dirFile.File → "news.html"
-{{ $dirFile := path.Split "news.html" }} → $dirDile.Dir → "", $dirDile.File → "news.html"
-{{ $dirFile := path.Split "a/b/c" }} → $dirDile.Dir → "a/b/", $dirDile.File → "c"
+{{ $dirFile := path.Split "a/news.html" }} → $dirFile.Dir → "a/", $dirFile.File → "news.html"
+{{ $dirFile := path.Split "news.html" }} → $dirFile.Dir → "", $dirFile.File → "news.html"
+{{ $dirFile := path.Split "a/b/c" }} → $dirFile.Dir → "a/b/", $dirFile.File → "c"
```
diff --git a/content/en/functions/safeHTML.md b/content/en/functions/safeHTML.md
index 240125d05..956926219 100644
--- a/content/en/functions/safeHTML.md
+++ b/content/en/functions/safeHTML.md
@@ -22,9 +22,9 @@ It should not be used for HTML from a third-party, or HTML with unclosed tags or
Given a site-wide [`config.toml`][config] with the following `copyright` value:
-```
+{{< code-toggle file="config" >}}
copyright = "© 2015 Jane Doe. Some rights reserved."
-```
+{{< /code-toggle >}}
`{{ .Site.Copyright | safeHTML }}` in a template would then output:
diff --git a/content/en/functions/safeHTMLAttr.md b/content/en/functions/safeHTMLAttr.md
index a5ecaa68b..1e1aa620f 100644
--- a/content/en/functions/safeHTMLAttr.md
+++ b/content/en/functions/safeHTMLAttr.md
@@ -21,11 +21,11 @@ aliases: []
Example: Given a site-wide `config.toml` that contains this menu entry:
-```
+{{< code-toggle file="config" >}}
[[menu.main]]
name = "IRC: #golang at freenode"
url = "irc://irc.freenode.net/#golang"
-```
+{{< /code-toggle >}}
* `` → ``
* `` → ``
diff --git a/content/en/functions/site.md b/content/en/functions/site.md
index a6fab6dca..5a112930f 100644
--- a/content/en/functions/site.md
+++ b/content/en/functions/site.md
@@ -1,7 +1,7 @@
---
title: site
linktitle: site
-description: The `site` function provides global access the same data as `.Site` page method
+description: The `site` function provides global access to the same data as the `.Site` page method.
godocref:
date: 2021-02-11
publishdate: 2021-02-11
diff --git a/content/en/functions/where.md b/content/en/functions/where.md
index 405d4ccfd..a41ec8e9a 100644
--- a/content/en/functions/where.md
+++ b/content/en/functions/where.md
@@ -86,7 +86,7 @@ The following logical operators are available with `where`:
## Use `where` with `Booleans`
When using booleans you should not put quotation marks.
```go-html-template
-{{range where .Pages ".Draft" true}}
+{{range where .Pages "Draft" true}}
{{.Title}}
{{end}}
```
@@ -95,7 +95,7 @@ When using booleans you should not put quotation marks.
## Use `where` with `intersect`
```go-html-template
-{{ range where .Site.Pages ".Params.tags" "intersect" .Params.tags }}
+{{ range where .Site.Pages "Params.tags" "intersect" .Params.tags }}
{{ if ne .Permalink $.Permalink }}
{{ .Render "summary" }}
{{ end }}
@@ -131,7 +131,7 @@ then ranges through only the first 5 posts in that list:
You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured:
```go-html-template
-{{ range where (where .Pages "Section" "blog" ) ".Params.featured" "!=" true }}
+{{ range where (where .Pages "Section" "blog" ) "Params.featured" "!=" true }}
```
## Unset Fields
@@ -146,7 +146,7 @@ Only the following operators are available for `nil`
* `!=`, `<>`, `ne`: True if the given field is set.
```go-html-template
-{{ range where .Pages ".Params.specialpost" "!=" nil }}
+{{ range where .Pages "Params.specialpost" "!=" nil }}
{{ .Content }}
{{ end }}
```
@@ -166,12 +166,12 @@ section names to hard-coded values like `"posts"` or `"post"`.
If the user has not set this config parameter in their site config, it
will default to the _section with the most pages_.
-The user can override the default in `config.toml`:
+The user can override the default:
-```toml
+{{< code-toggle file="config" >}}
[params]
mainSections = ["blog", "docs"]
-```
+{{< /code-toggle >}}
[intersect]: /functions/intersect/
[wherekeyword]: https://www.techonthenet.com/sql/where.php
diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md
index 4c4d270a6..14a23b734 100644
--- a/content/en/getting-started/configuration-markup.md
+++ b/content/en/getting-started/configuration-markup.md
@@ -68,6 +68,14 @@ There are some current limitations: For tables you can currently only apply it t
{.list}
```
+Note that attributes in [code fences](/content-management/syntax-highlighting/#highlighting-in-code-fences) must come after the opening tag, with any other highlighting processing instruction, e.g.:
+
+````
+```go {.myclass linenos=table,hl_lines=[8,"15-17"],linenostart=199}
+// ... code
+```
+````
+
autoHeadingIDType ("github") {{< new-in "0.62.2" >}}
: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs work as with [Blackfriday](#blackfriday), the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func.
@@ -179,6 +187,9 @@ Text
PlainText
: The plain variant of the above.
+Attributes (map) {{< new-in "0.82.0" >}}
+: A map of attributes (e.g. `id`, `class`)
+
#### Link with title Markdown example:
```md
diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md
index 1f8ad40c5..48a4af0c9 100644
--- a/content/en/getting-started/configuration.md
+++ b/content/en/getting-started/configuration.md
@@ -47,15 +47,15 @@ In addition to using a single site config file, one can use the `configDir` dire
- 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:
- In `config.toml` is:
- ```toml
- [Params]
- foo = "bar"
- ```
- In `params.toml` is:
- ```
+{{< code-toggle file="config" >}}
+[Params]
foo = "bar"
- ```
+{{< /code-toggle >}}
+
+{{< code-toggle file="params" >}}
+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.
@@ -325,6 +325,8 @@ useResourceCacheWhen
writeStats {{< new-in "0.69.0" >}}
: When enabled, a file named `hugo_stats.json` will be written to your project root with some aggregated data about the build, e.g. list of HTML entities published to be used to do [CSS pruning](/hugo-pipes/postprocess/#css-purging-with-postcss). If you're only using this for the production build, you should consider placing it below [config/production](/getting-started/configuration/#configuration-directory). It's also worth mentioning that, due to the nature of the partial server builds, new HTML entities will be added when you add or change them while the server is running, but the old values will not be removed until you restart the server or run a regular `hugo` build.
+**Note** that the prime use case for this is purging of unused CSS; it is build for speed and there may be false positives (e.g. elements that isn't really a HTML element).
+
noJSConfigInAssets {{< new-in "0.78.0" >}}
: Turn off writing a `jsconfig.json` into your `/assets` folder with mapping of imports from running [js.Build](https://gohugo.io/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written.
@@ -444,15 +446,15 @@ To set config params, prefix the name with `HUGO_PARAMS_`
Test and document setting params via JSON env var.
{{< /todo >}}
-## Ignore Content Files When Rendering
+## Ignore Content and Data Files when Rendering
-The following statement inside `./config.toml` will cause Hugo to ignore content files ending with `.foo` and `.boo` when rendering:
+To exclude specific files from the content and data directories when rendering your site, set `ignoreFiles` to one or more regular expressions.
-```
-ignoreFiles = [ "\\.foo$", "\\.boo$" ]
-```
+For example, to ignore content and data files ending with `.foo` and `.boo`:
-The above is a list of regular expressions. Note that the backslash (`\`) character is escaped in this example to keep TOML happy.
+{{< code-toggle >}}
+ignoreFiles = [ "\\.foo$","\\.boo$"]
+{{< /code-toggle >}}
## Configure Front Matter
@@ -463,20 +465,20 @@ Dates are important in Hugo, and you can configure how Hugo assigns dates to you
The default configuration is:
-```toml
+{{< code-toggle file="config" >}}
[frontmatter]
date = ["date", "publishDate", "lastmod"]
lastmod = [":git", "lastmod", "date", "publishDate"]
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]
-```
+{{< /code-toggle >}}
If you, as an example, have a non-standard date parameter in some of your content, you can override the setting for `date`:
- ```toml
+{{< code-toggle file="config" >}}
[frontmatter]
date = ["myDate", ":default"]
-```
+{{< /code-toggle >}}
The `:default` is a shortcut to the default settings. The above will set `.Date` to the date value in `myDate` if present, if not we will look in `date`,`publishDate`, `lastmod` and pick the first valid date.
@@ -490,10 +492,10 @@ The special date handlers are:
An example:
- ```toml
+{{< code-toggle file="config" >}}
[frontmatter]
lastmod = ["lastmod", ":fileModTime", ":default"]
-```
+{{< /code-toggle >}}
The above will try first to extract the value for `.Lastmod` starting with the `lastmod` front matter parameter, then the content file's modification timestamp. The last, `:default` should not be needed here, but Hugo will finally look for a valid date in `:git`, `date` and then `publishDate`.
@@ -504,10 +506,10 @@ The above will try first to extract the value for `.Lastmod` starting with the `
An example:
-```toml
+{{< code-toggle file="config" >}}
[frontmatter]
date = [":filename", ":default"]
-```
+{{< /code-toggle >}}
The above will try first to extract the value for `.Date` from the filename, then it will look in front matter parameters `date`, `publishDate` and lastly `lastmod`.
diff --git a/content/en/getting-started/quick-start.md b/content/en/getting-started/quick-start.md
index f2378f4a7..6d8f2b1fc 100644
--- a/content/en/getting-started/quick-start.md
+++ b/content/en/getting-started/quick-start.md
@@ -65,13 +65,13 @@ First, download the theme from GitHub and add it to your site's `themes` directo
```bash
cd quickstart
git init
-git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
+git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
```
*Note for non-git users:*
- If you do not have git installed, you can download the archive of the latest
version of this theme from:
- https://github.com/budparr/gohugo-theme-ananke/archive/master.zip
+ https://github.com/theNewDynamic/gohugo-theme-ananke/archive/master.zip
- Extract that .zip file to get a "gohugo-theme-ananke-master" directory.
- Rename that directory to "ananke", and move it into the "themes/" directory.
@@ -163,7 +163,7 @@ Replace the `title` above with something more personal. Also, if you already hav
**Tip:** Make the changes to the site configuration or any other file in your site while the Hugo server is running, and you will see the changes in the browser right away, though you may need to [clear your cache](https://kb.iu.edu/d/ahic).
{{% /note %}}
-For theme specific configuration options, see the [theme site](https://github.com/budparr/gohugo-theme-ananke).
+For theme specific configuration options, see the [theme site](https://github.com/theNewDynamic/gohugo-theme-ananke).
**For further theme customization, see [Customize a Theme](/themes/customizing/).**
diff --git a/content/en/getting-started/usage.md b/content/en/getting-started/usage.md
index e35126fd0..2b41ecb45 100644
--- a/content/en/getting-started/usage.md
+++ b/content/en/getting-started/usage.md
@@ -183,15 +183,11 @@ Or...
hugo server --disableLiveReload
```
-The latter flag can be omitted by adding the following key-value to your `config.toml` or `config.yml` file, respectively:
+The latter flag can be omitted by adding the following:
-```
+{{< code-toggle file="config" >}}
disableLiveReload = true
-```
-
-```
-disableLiveReload: true
-```
+{{< /code-toggle >}}
## Deploy Your Website
diff --git a/content/en/hosting-and-deployment/hosting-on-gitlab.md b/content/en/hosting-and-deployment/hosting-on-gitlab.md
index 0a40eb824..6634dbbe7 100644
--- a/content/en/hosting-and-deployment/hosting-on-gitlab.md
+++ b/content/en/hosting-and-deployment/hosting-on-gitlab.md
@@ -38,7 +38,7 @@ cd your-hugo-site
In the root directory of your Hugo site, create a `.gitlab-ci.yml` file. The `.gitlab-ci.yml` configures the GitLab CI on how to build your page. Simply add the content below.
{{< code file=".gitlab-ci.yml" >}}
-image: monachus/hugo
+image: registry.gitlab.com/pages/hugo:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
@@ -53,6 +53,10 @@ pages:
- master
{{< /code >}}
+{{% note %}}
+All available Hugo versions are listed [here](https://gitlab.com/pages/hugo/container_registry)
+{{% /note %}}
+
## Push Your Hugo Website to GitLab
Next, create a new repository on GitLab. It is *not* necessary to make the repository public. In addition, you might want to add `/public` to your .gitignore file, as there is no need to push compiled assets to GitLab or keep your output website in version control.
diff --git a/content/en/hosting-and-deployment/hosting-on-netlify.md b/content/en/hosting-and-deployment/hosting-on-netlify.md
index a04333d89..74c54b047 100644
--- a/content/en/hosting-and-deployment/hosting-on-netlify.md
+++ b/content/en/hosting-and-deployment/hosting-on-netlify.md
@@ -65,10 +65,10 @@ You can [set Hugo version](https://www.netlify.com/blog/2017/04/11/netlify-plus-
For production:
-```
+{{< code-toggle file="netlify" >}}
[context.production.environment]
HUGO_VERSION = "0.53"
-```
+{{< /code-toggle >}}
For testing:
diff --git a/content/en/hugo-modules/use-modules.md b/content/en/hugo-modules/use-modules.md
index db12964b4..e0d73957a 100644
--- a/content/en/hugo-modules/use-modules.md
+++ b/content/en/hugo-modules/use-modules.md
@@ -36,13 +36,13 @@ Also see the [CLI Doc](/commands/hugo_mod_init/).
The easiest way to use a Module for a theme is to import it in the config.
1. Initialize the hugo module system: `hugo mod init github.com//`
-2. Import the theme in your `config.toml`:
+2. Import the theme:
-```toml
+{{< code-toggle file="config" >}}
[module]
[[module.imports]]
path = "github.com/spf13/hyde"
-```
+{{< /code-toggle >}}
## Update Modules
diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md
index a9befa220..63bd8bdd9 100644
--- a/content/en/hugo-pipes/js.md
+++ b/content/en/hugo-pipes/js.md
@@ -40,9 +40,6 @@ Note that this is meant for small data sets, e.g. config settings. For larger da
minify [bool]
: Let `js.Build` handle the minification.
-avoidTDZ {{< new-in "0.78.0" >}}
-: There is/was a bug in WebKit with severe performance issue with the tracking of TDZ checks in JavaScriptCore. Enabling this flag removes the TDZ and `const` assignment checks and may improve performance of larger JS codebases until the WebKit fix is in widespread use. See https://bugs.webkit.org/show_bug.cgi?id=199866
-
inject [slice] {{< new-in "0.81.0" >}}
: This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject
diff --git a/content/en/hugo-pipes/postprocess.md b/content/en/hugo-pipes/postprocess.md
index 6fb593950..aafb786a4 100755
--- a/content/en/hugo-pipes/postprocess.md
+++ b/content/en/hugo-pipes/postprocess.md
@@ -35,10 +35,12 @@ There are several ways to set up CSS purging with PostCSS in Hugo. If you have a
The below configuration will write a `hugo_stats.json` file to the project root as part of the build. If you're only using this for the production build, you should consider placing it below [config/production](/getting-started/configuration/#configuration-directory).
-```toml
+{{< code-toggle file="config" >}}
[build]
writeStats = true
-```
+{{< /code-toggle >}}
+
+`postcss.config.js`
```js
const purgecss = require('@fullhuman/postcss-purgecss')({
@@ -50,12 +52,10 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
});
module.exports = {
- plugins: [
- require('tailwindcss'),
- require('autoprefixer'),
- ...(process.env.HUGO_ENVIRONMENT === 'production' ? [ purgecss ] : [])
- ]
-};
+ plugins: [
+ ...(process.env.HUGO_ENVIRONMENT === 'production' ? [ purgecss ] : [])
+ ]
+ };
```
Note that in the example above, the "CSS purge step" will only be applied to the production build. This means that you need to do something like this in your head template to build and include your CSS:
diff --git a/content/en/hugo-pipes/resource-from-template.md b/content/en/hugo-pipes/resource-from-template.md
index 317630b40..9bc8c7e9d 100755
--- a/content/en/hugo-pipes/resource-from-template.md
+++ b/content/en/hugo-pipes/resource-from-template.md
@@ -18,7 +18,7 @@ draft: false
In order to use Hugo Pipes function on an asset file containing Go Template magic the function `resources.ExecuteAsTemplate` must be used.
-The function takes three arguments, the resource object, the resource target path and the template context.
+The function takes three arguments: the resource target path, the template context, and the resource object.
```go-html-template
// assets/sass/template.scss
@@ -35,4 +35,4 @@ body{
```go-html-template
{{ $sassTemplate := resources.Get "sass/template.scss" }}
{{ $style := $sassTemplate | resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS }}
-```
\ No newline at end of file
+```
diff --git a/content/en/news/0.19-relnotes/index.md b/content/en/news/0.19-relnotes/index.md
index 5c53b057d..073b47495 100644
--- a/content/en/news/0.19-relnotes/index.md
+++ b/content/en/news/0.19-relnotes/index.md
@@ -33,9 +33,9 @@ Hugo `0.18` was bringing full-parallel page rendering, so workarounds depending
With Hugo `0.19`, you can control this behaviour by turning off page types you do not want ({{}}). In its most extreme case, if you put the below setting in your [`config.toml`](/getting-started/configuration/), you will get **nothing!**:
-```
+{{< code-toggle file="config" >}}
disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404"]
-```
+{{< /code-toggle >}}
### Other New Features
diff --git a/content/en/news/0.20.2-relnotes/index.md b/content/en/news/0.20.2-relnotes/index.md
index 3ee08411d..2e67d20ea 100644
--- a/content/en/news/0.20.2-relnotes/index.md
+++ b/content/en/news/0.20.2-relnotes/index.md
@@ -23,10 +23,12 @@ In `layouts/partials/mystyles.css`:
Then in `config.toml` (note that by using the `.Param` lookup func, we can override the color in a page’s front matter if we want):
- [params]
- [params.colors]
- main = "green"
- text = "blue"
+{{< code-toggle file="config" >}}
+[params]
+[params.colors]
+main = "green"
+text = "blue"
+{{< /code-toggle >}}
And then in `layouts/partials/head.html` (or the partial used to include the head section into your layout):
diff --git a/content/en/news/0.26-relnotes/index.md b/content/en/news/0.26-relnotes/index.md
index 92f90de99..7ebbf8185 100644
--- a/content/en/news/0.26-relnotes/index.md
+++ b/content/en/news/0.26-relnotes/index.md
@@ -8,14 +8,14 @@ images:
- images/blog/hugo-26-poster.png
---
-This release brings a choice of **AP Style or Chicago Style Title Case** ([8fb594bf](https://github.com/gohugoio/hugo/commit/8fb594bfb090c017d4e5cbb2905780221e202c41) [#989](https://github.com/gohugoio/hugo/issues/989)). You can also now configure Blackfriday to render **« French Guillemets »** ([cb9dfc26](https://github.com/gohugoio/hugo/commit/cb9dfc2613ae5125cafa450097fb0f62dd3770e7) [#3725](https://github.com/gohugoio/hugo/issues/3725)). To enable French Guillemets, put this in your site `config.toml`:
+This release brings a choice of **AP Style or Chicago Style Title Case** ([8fb594bf](https://github.com/gohugoio/hugo/commit/8fb594bfb090c017d4e5cbb2905780221e202c41) [#989](https://github.com/gohugoio/hugo/issues/989)). You can also now configure Blackfriday to render **« French Guillemets »** ([cb9dfc26](https://github.com/gohugoio/hugo/commit/cb9dfc2613ae5125cafa450097fb0f62dd3770e7) [#3725](https://github.com/gohugoio/hugo/issues/3725)). To enable French Guillemets:
-```bash
+{{< code-toggle file="config" >}}
[blackfriday]
angledQuotes = true
smartypantsQuotesNBSP = true
-```
+{{< /code-toggle >}}
Oh, and this release also fixes it so you should see no ugly long crashes no more when you step wrong in your templates ([794ea21e](https://github.com/gohugoio/hugo/commit/794ea21e9449b876c5514f1ce8fe61449bbe4980)).
diff --git a/content/en/news/0.36-relnotes/index.md b/content/en/news/0.36-relnotes/index.md
index 4e6323287..a81892458 100644
--- a/content/en/news/0.36-relnotes/index.md
+++ b/content/en/news/0.36-relnotes/index.md
@@ -25,12 +25,13 @@ Hugo now has:
## Notes
Hugo now defaults to **smart crop** when cropping images, if you don't specify it when calling `.Fill`.
-You can get the old default by adding this to your `config.toml`:
+You can get the old default by adding this:
-```toml
+{{< code-toggle file="config" >}}
[imaging]
anchor = "center"
-```
+{{< /code-toggle >}}
+
Also, we have removed the superflous anchor name from the processed filenames that does not use this anchor, so it can be wise to run `hugo --gc` once to remove unused images.
## Enhancements
diff --git a/content/en/news/0.56.3-relnotes/index.md b/content/en/news/0.56.3-relnotes/index.md
index bc1266335..c505e520d 100644
--- a/content/en/news/0.56.3-relnotes/index.md
+++ b/content/en/news/0.56.3-relnotes/index.md
@@ -13,7 +13,7 @@ This is a bug-fix release with a couple of important fixes. After getting feedba
It adds support for overlapping file mounts, even for the filesystems where we walk down the directory structure. One relevant example that is fixed by this release:
-```toml
+{{< code-toggle file="config" >}}
[module]
[[module.mounts]]
source="content1"
@@ -21,7 +21,7 @@ target="content"
[[module.mounts]]
source="content2"
target="content/docs"
-```
+{{< /code-toggle >}}
The above is obviously both common and very useful. This was never an issue with the situations where you load a specific file/directory (e.g. `resources.Get "a/b/c/d/sunset.jpg"`).
diff --git a/content/en/news/0.66.0-relnotes/index.md b/content/en/news/0.66.0-relnotes/index.md
index 6fdeec948..850a8fa71 100644
--- a/content/en/news/0.66.0-relnotes/index.md
+++ b/content/en/news/0.66.0-relnotes/index.md
@@ -6,12 +6,12 @@ description: "Native inline, recursive import support in PostCSS/Tailwind, \"dep
categories: ["Releases"]
---
-This release adds [inline `@import`](/hugo-pipes/postcss/#options) support to `resources.PostCSS`, with imports relative to Hugo's virtual, composable file system. Another useful addition is the new `build` [configuration section](/getting-started/configuration/#configure-build). As an example in `config.toml`:
+This release adds [inline `@import`](/hugo-pipes/postcss/#options) support to `resources.PostCSS`, with imports relative to Hugo's virtual, composable file system. Another useful addition is the new `build` [configuration section](/getting-started/configuration/#configure-build). As an example:
-```toml
+{{< code-toggle file="config" >}}
[build]
useResourceCacheWhen = "always"
-```
+{{< /code-toggle >}}
The above will tell Hugo to _always_ use the cached build resources inside `resources/_gen` for the build steps requiring a non-standard dependency (PostCSS and SCSS/SASS). Valid values are `never`, `always` and `fallback` (default).
diff --git a/content/en/news/0.67.0-relnotes/index.md b/content/en/news/0.67.0-relnotes/index.md
index a970ab777..881fe0367 100644
--- a/content/en/news/0.67.0-relnotes/index.md
+++ b/content/en/news/0.67.0-relnotes/index.md
@@ -10,7 +10,7 @@ The two main items in Hugo 0.67.0 is custom HTTP header support in `hugo server`
Being able to [configure HTTP headers](https://gohugo.io/getting-started/configuration/#configure-server) in your development server means that you can now verify how your site behaves with the intended Content Security Policy settings etc., e.g.:
-```toml
+{{< code-toggle file="config" >}}
[server]
[[server.headers]]
for = "/**.html"
@@ -21,7 +21,7 @@ X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Content-Security-Policy = "script-src localhost:1313"
-```
+{{< /code-toggle >}}
**Note:** This release also changes how raw HTML files inside /content is processed to be in line with the documentation. See [#7030](https://github.com/gohugoio/hugo/issues/7030).
diff --git a/content/en/news/0.76.0-relnotes/index.md b/content/en/news/0.76.0-relnotes/index.md
index ec4549575..65f3ebb9d 100644
--- a/content/en/news/0.76.0-relnotes/index.md
+++ b/content/en/news/0.76.0-relnotes/index.md
@@ -46,13 +46,13 @@ We have added a `force` flag to the [server redirects](https://gohugo.io/getting
This is set to default `false`. If you want the old behaviour you need to add this flag to your configuration:
-```toml
+{{< code-toggle file="config" >}}
[[redirects]]
from = "/myspa/**"
to = "/myspa/"
status = 200
force = true
-```
+{{< /code-toggle >}}
## Enhancements
diff --git a/content/en/news/0.81.0-relnotes/index.md b/content/en/news/0.81.0-relnotes/index.md
index 70ecab17d..ebcbb5ac7 100644
--- a/content/en/news/0.81.0-relnotes/index.md
+++ b/content/en/news/0.81.0-relnotes/index.md
@@ -128,12 +128,12 @@ There are several [Hugo Modules](https://gohugo.io/hugo-modules/)-related improv
## Minify - Keep Comments
-Keep comments when running `hugo --minify` with a new setting in config.toml.
+Keep comments when running `hugo --minify` with a new setting:
-```toml
+{{< code-toggle file="config" >}}
[minify.tdewolff.html]
keepComments = true
-```
+{{< /code-toggle >}}
The default value for this setting is `false`.
diff --git a/content/en/news/0.82.0-relnotes/featured.png b/content/en/news/0.82.0-relnotes/featured.png
new file mode 100644
index 000000000..d09243f61
Binary files /dev/null and b/content/en/news/0.82.0-relnotes/featured.png differ
diff --git a/content/en/news/0.82.0-relnotes/index.md b/content/en/news/0.82.0-relnotes/index.md
new file mode 100644
index 000000000..0297ea041
--- /dev/null
+++ b/content/en/news/0.82.0-relnotes/index.md
@@ -0,0 +1,78 @@
+
+---
+date: 2021-03-21
+title: "Hugo 0.82: Mostly bugfixes"
+description: "Mostly bug fixes, but some useful improvements with Markdown attributes."
+categories: ["Releases"]
+---
+
+This is a small release, mostly a maintainance/bugfix release. But also notable is that you can now add custom Markdown attributes (e.g. CSS classes) to code fences ([aed7df62](https://github.com/gohugoio/hugo/commit/aed7df62a811b07b73ec5cbbf03e69e4bbf00919) [@bep](https://github.com/bep) [#8278](https://github.com/gohugoio/hugo/issues/8278)) and that you can use the attribute lists in title render hooks (`.Attributes`; see [cd0c5d7e](https://github.com/gohugoio/hugo/commit/cd0c5d7ef32cbd570af00c50ce760452381df64e) [@bep](https://github.com/bep) [#8270](https://github.com/gohugoio/hugo/issues/8270)).
+
+This release represents **28 contributions by 8 contributors** to the main Hugo code base.[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), and [@gzagatti](https://github.com/gzagatti) for their ongoing contributions.
+And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour), [@coliff](https://github.com/coliff) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.
+
+Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
+which has received **20 contributions by 12 contributors**. A special thanks to [@bep](https://github.com/bep), [@jmooring](https://github.com/jmooring), [@rootkea](https://github.com/rootkea), and [@PaulPineda](https://github.com/PaulPineda) for their work on the documentation site.
+
+
+Hugo now has:
+
+* 50763+ [stars](https://github.com/gohugoio/hugo/stargazers)
+* 435+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
+* 370+ [themes](http://themes.gohugo.io/)
+
+## Notes
+
+* We have made `.MediaType` comparable [ba1d0051](https://github.com/gohugoio/hugo/commit/ba1d0051b44fdd242b20899e195e37ab26501516) [@bep](https://github.com/bep) [#8317](https://github.com/gohugoio/hugo/issues/8317)[#8324](https://github.com/gohugoio/hugo/issues/8324). This also means that the old `MediaType.Suffix` and `MediaType.FullSuffix` is moved to `MediaType.FirstSuffix.Suffix` and `MediaType.FirstSuffix.FullSuffix`, which also better describes what they represent.
+
+## Enhancements
+
+### Templates
+
+* Add method mappings for strings.Contains, strings.ContainsAny [7f853003](https://github.com/gohugoio/hugo/commit/7f8530039aa018f23bad9d58e97777705a6d19ac) [@bep](https://github.com/bep)
+
+### Output
+
+* Make Type comparable [ba1d0051](https://github.com/gohugoio/hugo/commit/ba1d0051b44fdd242b20899e195e37ab26501516) [@bep](https://github.com/bep) [#8317](https://github.com/gohugoio/hugo/issues/8317)[#8324](https://github.com/gohugoio/hugo/issues/8324)
+* Add a basic benchmark [4d24e2a3](https://github.com/gohugoio/hugo/commit/4d24e2a3261d8c7dc0395db3ac4de89ebb0974a5) [@bep](https://github.com/bep)
+
+### Other
+
+* Regenerate docs helper [86b4fd35](https://github.com/gohugoio/hugo/commit/86b4fd35e78f545510f19b49246a3ccf5487831b) [@bep](https://github.com/bep)
+* Regen CLI docs [195d108d](https://github.com/gohugoio/hugo/commit/195d108da75c9e5b9ef790bc4a5879c1e913964b) [@bep](https://github.com/bep)
+* Simplify some config loading code [df8bb881](https://github.com/gohugoio/hugo/commit/df8bb8812f466bce563cdba297db3cd3f954a799) [@bep](https://github.com/bep)
+* Update github.com/evanw/esbuild v0.9.0 => v0.9.6 [57d8d208](https://github.com/gohugoio/hugo/commit/57d8d208ed2245858c6439f19803bf2749f9377f) [@bep](https://github.com/bep)
+* Apply OS env overrides twice [fc06e850](https://github.com/gohugoio/hugo/commit/fc06e85082b63a54d9403e57c8d01a7d5a62fc04) [@bep](https://github.com/bep)
+* Attributes for code fences should be placed after the lang indicator only [b725253f](https://github.com/gohugoio/hugo/commit/b725253f9e3033e18bd45096c0622e6fb7b1ff79) [@bep](https://github.com/bep) [#8313](https://github.com/gohugoio/hugo/issues/8313)
+* Bump github.com/tdewolff/minify/v2 v2.9.15 [35dedf15](https://github.com/gohugoio/hugo/commit/35dedf15c04a605df4d4a09263b0b299e5161f86) [@bep](https://github.com/bep) [#8332](https://github.com/gohugoio/hugo/issues/8332)
+* More explicit support link to discourse [137d2dab](https://github.com/gohugoio/hugo/commit/137d2dab3285e9b0f8fe4dcc65ab6ecf8bb09002) [@davidsneighbour](https://github.com/davidsneighbour)
+* Update to esbuild v0.9.0 [1b1dcf58](https://github.com/gohugoio/hugo/commit/1b1dcf586e220c3a8ad5ecfa8e4c3dac97f0ab44) [@bep](https://github.com/bep)
+* Allow more spacing characters in strings [0a2ab3f8](https://github.com/gohugoio/hugo/commit/0a2ab3f8feb961f8394b1f9964fab36bfa468027) [@moorereason](https://github.com/moorereason) [#8079](https://github.com/gohugoio/hugo/issues/8079)[#8079](https://github.com/gohugoio/hugo/issues/8079)
+* Rename a test [35bfb662](https://github.com/gohugoio/hugo/commit/35bfb662229226d5f3cc3077ca74323f0aa88b7d) [@bep](https://github.com/bep)
+* Add a debug helper [6d21559f](https://github.com/gohugoio/hugo/commit/6d21559fb55cda39c7b92bb61fd8e65a84465fe5) [@bep](https://github.com/bep)
+* Add support for Google Analytics v4 [ba16a14c](https://github.com/gohugoio/hugo/commit/ba16a14c6e884e309380610331aff78213f84751) [@djatwood](https://github.com/djatwood)
+* Bump go.mod to Go 1.16 [782c79ae](https://github.com/gohugoio/hugo/commit/782c79ae61a5ec30746ce3729933d6b4d31e0540) [@bep](https://github.com/bep) [#8294](https://github.com/gohugoio/hugo/issues/8294)
+* #8210 Upgrade golang version for Dockerfile [5afcae7e](https://github.com/gohugoio/hugo/commit/5afcae7e0b4c08bc37db6e34ab4cf960558f4b6e) [@systemkern](https://github.com/systemkern)
+* Update CONTRIBUTING.md [60469f42](https://github.com/gohugoio/hugo/commit/60469f429e227631d76d951f2ed92986f0bd92e9) [@bep](https://github.com/bep)
+* Handle attribute lists in code fences [aed7df62](https://github.com/gohugoio/hugo/commit/aed7df62a811b07b73ec5cbbf03e69e4bbf00919) [@bep](https://github.com/bep) [#8278](https://github.com/gohugoio/hugo/issues/8278)
+* Allow markdown attribute lists to be used in title render hooks [cd0c5d7e](https://github.com/gohugoio/hugo/commit/cd0c5d7ef32cbd570af00c50ce760452381df64e) [@bep](https://github.com/bep) [#8270](https://github.com/gohugoio/hugo/issues/8270)
+* bump github.com/kyokomi/emoji/v2 from 2.2.7 to 2.2.8 [88a85dce](https://github.com/gohugoio/hugo/commit/88a85dcea951b0b5622cf02b167ec9299d93118b) [@dependabot[bot]](https://github.com/apps/dependabot)
+
+## Fixes
+
+### Output
+
+* Fix output format handling for render hooks [18074d0c](https://github.com/gohugoio/hugo/commit/18074d0c2375cc4bf4d7933dd4206cb878a23d1c) [@bep](https://github.com/bep) [#8176](https://github.com/gohugoio/hugo/issues/8176)
+
+### Other
+
+* Fix OS env override for nested config param only available in theme [7ed56c69](https://github.com/gohugoio/hugo/commit/7ed56c6941edfdfa42eef2b779020b5d46ca194a) [@bep](https://github.com/bep) [#8346](https://github.com/gohugoio/hugo/issues/8346)
+* Fix `new theme` command description [24c716ca](https://github.com/gohugoio/hugo/commit/24c716cac35b0c5476944108e545058749c43e61) [@rootkea](https://github.com/rootkea)
+* Fix handling of utf8 runes in nullString() [f6612d8b](https://github.com/gohugoio/hugo/commit/f6612d8bd8c4c3bb498178d14f45d3acdf86aa7c) [@moorereason](https://github.com/moorereason)
+* Fixes #7698. [01dd7c16](https://github.com/gohugoio/hugo/commit/01dd7c16af6204d18d530f9d3018689215482170) [@gzagatti](https://github.com/gzagatti)
+* Fix autocomplete docs [c8f45d1d](https://github.com/gohugoio/hugo/commit/c8f45d1d861f596821afc068bd12eb1213aba5ce) [@bep](https://github.com/bep)
+
+
+
+
+
diff --git a/content/en/news/0.82.1-relnotes/index.md b/content/en/news/0.82.1-relnotes/index.md
new file mode 100644
index 000000000..54462b8ad
--- /dev/null
+++ b/content/en/news/0.82.1-relnotes/index.md
@@ -0,0 +1,19 @@
+
+---
+date: 2021-04-20
+title: "Hugo 0.82.1: One Bug Fix"
+description: "This version fixes a bug introduced in 0.82.0."
+categories: ["Releases"]
+images:
+- images/blog/hugo-bug-poster.png
+
+---
+
+
+
+This is a bug-fix release with one important fix.
+
+* Regression in media type suffix lookup [6e9d2bf0](https://github.com/gohugoio/hugo/commit/6e9d2bf0c936900f8f676d485098755b3f463373) [@bep](https://github.com/bep) [#8406](https://github.com/gohugoio/hugo/issues/8406)
+
+
+
diff --git a/content/en/news/http2-server-push-in-hugo.md b/content/en/news/http2-server-push-in-hugo.md
index 72d0acd53..28b1f47d6 100644
--- a/content/en/news/http2-server-push-in-hugo.md
+++ b/content/en/news/http2-server-push-in-hugo.md
@@ -23,7 +23,8 @@ If you navigate to https://gohugo.io and look in the Chrome developer network co
## 1. Configure Netlify Output Formats
Add a new custom media type and two new output formats to `config.toml`. For more on output formats in Hugo, see [Custom Output Formats](/templates/output-formats/).
-```bash
+
+```toml
[outputs]
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
diff --git a/content/en/templates/data-templates.md b/content/en/templates/data-templates.md
index 89f648c0f..661c0bdfa 100644
--- a/content/en/templates/data-templates.md
+++ b/content/en/templates/data-templates.md
@@ -51,7 +51,7 @@ The example below is a bit contrived, but it illustrates the flexibility of data
`jacopastorius.toml` contains the content below. `johnpatitucci.toml` contains a similar list:
-```
+{{< code-toggle file="jacopastorius" >}}
discography = [
"1974 – Modern American Music … Period! The Criteria Sessions",
"1974 – Jaco",
@@ -69,7 +69,7 @@ discography = [
"2003 - Punk Jazz: The Jaco Pastorius Anthology (compilation)",
"2007 - The Essential Jaco Pastorius (compilation)"
]
-```
+{{< /code-toggle >}}
The list of bass players can be accessed via `.Site.Data.jazz.bass`, a single bass player by adding the filename without the suffix, e.g. `.Site.Data.jazz.bass.jacopastorius`.
diff --git a/content/en/templates/internal.md b/content/en/templates/internal.md
index e3d7e09c3..6f0aa9a0a 100644
--- a/content/en/templates/internal.md
+++ b/content/en/templates/internal.md
@@ -27,14 +27,20 @@ While the following internal templates are called similar to partials, they do *
## Google Analytics
-Hugo ships with internal templates for Google Analytics tracking, including both synchronous and asynchronous tracking codes.
+Hugo ships with internal templates for Google Analytics tracking, including both synchronous and asynchronous tracking codes. As well as support for both v3 and v4 of Google Analytics.
### Configure Google Analytics
Provide your tracking id in your configuration file:
+**Google Analytics v3 (analytics.js)**
{{< code-toggle file="config" >}}
-googleAnalytics = "UA-123-45"
+googleAnalytics = "UA-PROPERTY_ID"
+{{ code-toggle >}}
+
+**Google Analytics v4 (gtag.js)**
+{{< code-toggle file="config" >}}
+googleAnalytics = "G-MEASUREMENT_ID"
{{ code-toggle >}}
### Use the Google Analytics Template
@@ -50,6 +56,8 @@ You can then include the Google Analytics internal template:
{{ template "_internal/google_analytics_async.html" . }}
```
+When using Google Analytics v4 use `_internal/google_analytics.html`.
+
A `.Site.GoogleAnalytics` variable is also exposed from the config.
## Disqus
@@ -58,7 +66,7 @@ Hugo also ships with an internal template for [Disqus comments][disqus], a popul
### Configure Disqus
-To use Hugo's Disqus template, you first need to set a single value in your site's `config.toml` or `config.yml`:
+To use Hugo's Disqus template, you first need to set a single configuration value:
{{< code-toggle file="config" >}}
disqusShortname = "yourdiscussshortname"
@@ -144,6 +152,7 @@ tags = []
Hugo uses the page title and description for the title and description metadata.
The first 6 URLs from the `images` array are used for image metadata.
+If [page bundles](/content-management/page-bundles/) are used and the `images` array is empty or undefined, images with filenames matching `*feature*` or `*cover*,*thumbnail*` are used for image metadata.
Various optional metadata can also be set:
diff --git a/content/en/templates/pagination.md b/content/en/templates/pagination.md
index 5c20f8ad0..d89735f7c 100644
--- a/content/en/templates/pagination.md
+++ b/content/en/templates/pagination.md
@@ -24,15 +24,15 @@ The real power of Hugo pagination shines when combined with the [`where` functio
Pagination can be configured in your [site configuration][configuration]:
-`Paginate`
+`paginate`
: default = `10`. This setting can be overridden within the template.
-`PaginatePath`
+`paginatePath`
: default = `page`. Allows you to set a different path for your pagination pages.
-Setting `Paginate` to a positive value will split the list pages for the homepage, sections and taxonomies into chunks of that size. But note that the generation of the pagination pages for sections, taxonomies and homepage is *lazy* --- the pages will not be created if not referenced by a `.Paginator` (see below).
+Setting `paginate` to a positive value will split the list pages for the homepage, sections and taxonomies into chunks of that size. But note that the generation of the pagination pages for sections, taxonomies and homepage is *lazy* --- the pages will not be created if not referenced by a `.Paginator` (see below).
-`PaginatePath` is used to adapt the `URL` to the pages in the paginator (the default setting will produce URLs on the form `/page/1/`.
+`paginatePath` is used to adapt the `URL` to the pages in the paginator (the default setting will produce URLs on the form `/page/1/`.
## List Paginator Pages
diff --git a/content/en/templates/partials.md b/content/en/templates/partials.md
index d23622ded..a1030f6aa 100644
--- a/content/en/templates/partials.md
+++ b/content/en/templates/partials.md
@@ -99,7 +99,7 @@ Value: {{ partial "my-inline-partial" . }}
### Example GetFeatured
```go-html-template
{{/* layouts/partials/GetFeatured.html */}}
-{{ return first . (where site.RegularPages ".Params.featured" true) }}
+{{ return first . (where site.RegularPages "Params.featured" true) }}
```
```go-html-template
@@ -175,7 +175,6 @@ The following `header.html` partial template is used for [spf13.com](https://spf
{{ partial "head_includes.html" . }}
-
{{< /code >}}
{{% note %}}
diff --git a/content/en/templates/robots.md b/content/en/templates/robots.md
index b06a15dd0..52a77314b 100644
--- a/content/en/templates/robots.md
+++ b/content/en/templates/robots.md
@@ -18,37 +18,49 @@ aliases: [/extras/robots-txt/]
toc: false
---
-To create your robots.txt as a template, first set the `enableRobotsTXT` value to `true` in your [configuration file][config]. By default, this option generates a robots.txt with the following content, which tells search engines that they are allowed to crawl everything:
+To generate a robots.txt file from a template, change the [site configuration][config]:
-```
+{{< code-toggle file="config">}}
+enableRobotsTXT = true
+{{< /code-toggle >}}
+
+By default, Hugo generates robots.txt using an [internal template][internal].
+
+```text
User-agent: *
```
+Search engines that honor the Robots Exclusion Protocol will interpret this as permission to crawl everything on the site.
+
## Robots.txt Template Lookup Order
-The [lookup order][lookup] for the `robots.txt` template is as follows:
+You may overwrite the internal template with a custom template. Hugo selects the template using this lookup order:
-* `/layouts/robots.txt`
-* `/themes//layouts/robots.txt`
-
-{{% note %}}
-If you do not want Hugo to create a default `robots.txt` or leverage the `robots.txt` template, you can hand code your own and place the file in `static`. Remember that everything in the [static directory](/getting-started/directory-structure/) is copied over as-is when Hugo builds your site.
-{{% /note %}}
+1. `/layouts/robots.txt`
+2. `/themes//layouts/robots.txt`
## Robots.txt Template Example
-The following is an example `robots.txt` layout:
-
{{< code file="layouts/robots.txt" download="robots.txt" >}}
User-agent: *
-
-{{range .Pages}}
-Disallow: {{.RelPermalink}}
-{{end}}
+{{ range .Pages }}
+Disallow: {{ .RelPermalink }}
+{{ end }}
{{< /code >}}
-This template disallows all the pages of the site by creating one `Disallow` entry for each page.
+This template creates a robots.txt file with a `Disallow` directive for each page on the site. Search engines that honor the Robots Exclusion Protocol will not crawl any page on the site.
+
+{{% note %}}
+To create a robots.txt file without using a template:
+
+1. Set `enableRobotsTXT` to `false` in the [site configuration][config].
+2. Create a robots.txt file in the `static` directory.
+
+Remember that Hugo copies everything in the [static directory][static] to the root of `publishDir` (typically `public`) when you build your site.
[config]: /getting-started/configuration/
-[lookup]: /templates/lookup-order/
-[robots]: https://www.robotstxt.org/
+[static]: /getting-started/directory-structure/
+{{% /note %}}
+
+[config]: /getting-started/configuration/
+[internal]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/robots.txt
diff --git a/content/en/templates/rss.md b/content/en/templates/rss.md
index 0eba97470..009ba241a 100644
--- a/content/en/templates/rss.md
+++ b/content/en/templates/rss.md
@@ -43,15 +43,15 @@ The table below shows the RSS template lookup order for the different page kinds
By default, Hugo will create an unlimited number of RSS entries. You can limit the number of articles included in the built-in RSS templates by assigning a numeric value to `rssLimit:` field in your project's [`config` file][config].
-The following values will also be included in the RSS output if specified in your site’s configuration:
+The following values will also be included in the RSS output if specified:
-```toml
+{{< code-toggle file="config" >}}
languageCode = "en-us"
copyright = "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License."
[author]
name = "My Name Here"
-```
+{{< /code-toggle >}}
## The Embedded rss.xml
diff --git a/content/en/templates/taxonomy-templates.md b/content/en/templates/taxonomy-templates.md
index b04a2e43f..a265b68d0 100644
--- a/content/en/templates/taxonomy-templates.md
+++ b/content/en/templates/taxonomy-templates.md
@@ -206,7 +206,7 @@ Because we are leveraging the front matter system to define taxonomies for conte
```
diff --git a/content/en/tools/editors.md b/content/en/tools/editors.md
index 4db907489..8da5fc2d7 100644
--- a/content/en/tools/editors.md
+++ b/content/en/tools/editors.md
@@ -23,6 +23,7 @@ The Hugo community uses a wide range of preferred tools and has developed plug-i
## 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.
+* [Hugo Snippets](https://packagecontrol.io/packages/Hugo%20Snippets). Hugo Snippets is a useful plugin for adding automatic snippets to Sublime Text 3.
## Visual Studio Code
diff --git a/content/en/tools/migrations.md b/content/en/tools/migrations.md
index 481ef1bac..d87bd4013 100644
--- a/content/en/tools/migrations.md
+++ b/content/en/tools/migrations.md
@@ -73,7 +73,7 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
## Blogger
- [blogimport](https://github.com/natefinch/blogimport) - A tool to import from Blogger posts to Hugo.
-- [blogger-to-hugo](https://bitbucket.org/petraszd/blogger-to-hugo) - Another tool to import Blogger posts to Hugo. It also downloads embedded images so they will be stored locally.
+- [blogger-to-hugo](https://pypi.org/project/blogger-to-hugo/) - Another tool to import Blogger posts to Hugo. It also downloads embedded images so they will be stored locally.
- [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://support.google.com/blogger/answer/41387?hl=en) file of your YOUR-TLD.blogspot.com website. It also saves comments to `YOUR-POST-NAME-comments.md` file along with posts.
- [BloggerToHugo](https://github.com/huanlin/blogger-to-hugo) - Yet another tool to import Blogger posts to Hugo. For Windows platform only, and .NET Framework 4.5 is required. See README.md before using this tool.
diff --git a/content/en/troubleshooting/faq.md b/content/en/troubleshooting/faq.md
index 1934bc5e5..66ea78630 100644
--- a/content/en/troubleshooting/faq.md
+++ b/content/en/troubleshooting/faq.md
@@ -27,7 +27,7 @@ Yes you can! See [Configure with Environment Variables](/getting-started/configu
## How do I schedule posts?
-1. Set `publishDate` in the page [Front Matter](/content-management/front-matter/) to a date in the future.
+1. Set `publishDate` in the page [Front Matter](/content-management/front-matter/) to a datetime in the future. If you want the creation and publication datetime to be the same, it's also sufficient to only set `date`[^date-hierarchy].
2. Build and publish at intervals.
How to automate the "publish at intervals" part depends on your situation:
@@ -39,6 +39,8 @@ Also see this Twitter thread:
{{< tweet 962380712027590657 >}}
+[^date-hierarchy]: See [Configure Dates](https://gohugo.io/getting-started/configuration/#configure-dates) for the order in which the different date variables are complemented by each other when not explicitly set.
+
## Can I use the latest Hugo version on Netlify?
Yes you can! Read [this](/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify).
diff --git a/content/en/variables/site.md b/content/en/variables/site.md
index d3df29609..2300c2cb8 100644
--- a/content/en/variables/site.md
+++ b/content/en/variables/site.md
@@ -22,7 +22,7 @@ The following is a list of site-level (aka "global") variables. Many of these va
## Get the Site object from a partial
-All the methods below, e.g. `.Site.RegularPages` can also be reached via the global `site` function, e.g. `site.RegularPages`, which can be handy in partials where the `Page` object isn't easily available. {{< new-in "0.53" >}}.
+All the methods below, e.g. `.Site.RegularPages` can also be reached via the global [`site`](/functions/site/) function, e.g. `site.RegularPages`, which can be handy in partials where the `Page` object isn't easily available. {{< new-in "0.53" >}}.
## Site Variables List
diff --git a/data/docs.json b/data/docs.json
index 37fdf6518..e757680a5 100644
--- a/data/docs.json
+++ b/data/docs.json
@@ -1597,263 +1597,369 @@
"media": {
"types": [
{
- "type": "application/javascript",
- "string": "application/javascript",
"mainType": "application",
"subType": "javascript",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "js",
+ "fullSuffix": ".js"
+ },
+ "type": "application/javascript",
+ "string": "application/javascript",
"suffixes": [
"js"
]
},
{
- "type": "application/json",
- "string": "application/json",
"mainType": "application",
"subType": "json",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "json",
+ "fullSuffix": ".json"
+ },
+ "type": "application/json",
+ "string": "application/json",
"suffixes": [
"json"
]
},
{
- "type": "application/octet-stream",
- "string": "application/octet-stream",
"mainType": "application",
"subType": "octet-stream",
- "delimiter": "",
- "suffixes": null
+ "delimiter": ".",
+ "firstSuffix": {
+ "suffix": "",
+ "fullSuffix": ""
+ },
+ "type": "application/octet-stream",
+ "string": "application/octet-stream",
+ "suffixes": [
+ ""
+ ]
},
{
- "type": "application/rss+xml",
- "string": "application/rss+xml",
"mainType": "application",
"subType": "rss",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "xml",
+ "fullSuffix": ".xml"
+ },
+ "type": "application/rss+xml",
+ "string": "application/rss+xml",
"suffixes": [
"xml"
]
},
{
- "type": "application/toml",
- "string": "application/toml",
"mainType": "application",
"subType": "toml",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "toml",
+ "fullSuffix": ".toml"
+ },
+ "type": "application/toml",
+ "string": "application/toml",
"suffixes": [
"toml"
]
},
{
- "type": "application/typescript",
- "string": "application/typescript",
"mainType": "application",
"subType": "typescript",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "ts",
+ "fullSuffix": ".ts"
+ },
+ "type": "application/typescript",
+ "string": "application/typescript",
"suffixes": [
"ts"
]
},
{
- "type": "application/xml",
- "string": "application/xml",
"mainType": "application",
"subType": "xml",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "xml",
+ "fullSuffix": ".xml"
+ },
+ "type": "application/xml",
+ "string": "application/xml",
"suffixes": [
"xml"
]
},
{
- "type": "application/yaml",
- "string": "application/yaml",
"mainType": "application",
"subType": "yaml",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "yaml",
+ "fullSuffix": ".yaml"
+ },
+ "type": "application/yaml",
+ "string": "application/yaml",
"suffixes": [
"yaml",
"yml"
]
},
{
- "type": "image/jpeg",
- "string": "image/jpeg",
"mainType": "image",
"subType": "jpeg",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "jpg",
+ "fullSuffix": ".jpg"
+ },
+ "type": "image/jpeg",
+ "string": "image/jpeg",
"suffixes": [
"jpg",
"jpeg"
]
},
{
- "type": "image/png",
- "string": "image/png",
"mainType": "image",
"subType": "png",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "png",
+ "fullSuffix": ".png"
+ },
+ "type": "image/png",
+ "string": "image/png",
"suffixes": [
"png"
]
},
{
- "type": "image/svg+xml",
- "string": "image/svg+xml",
"mainType": "image",
"subType": "svg",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "svg",
+ "fullSuffix": ".svg"
+ },
+ "type": "image/svg+xml",
+ "string": "image/svg+xml",
"suffixes": [
"svg"
]
},
{
- "type": "text/calendar",
- "string": "text/calendar",
"mainType": "text",
"subType": "calendar",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "ics",
+ "fullSuffix": ".ics"
+ },
+ "type": "text/calendar",
+ "string": "text/calendar",
"suffixes": [
"ics"
]
},
{
- "type": "text/css",
- "string": "text/css",
"mainType": "text",
"subType": "css",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "css",
+ "fullSuffix": ".css"
+ },
+ "type": "text/css",
+ "string": "text/css",
"suffixes": [
"css"
]
},
{
- "type": "text/csv",
- "string": "text/csv",
"mainType": "text",
"subType": "csv",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "csv",
+ "fullSuffix": ".csv"
+ },
+ "type": "text/csv",
+ "string": "text/csv",
"suffixes": [
"csv"
]
},
{
- "type": "text/html",
- "string": "text/html",
"mainType": "text",
"subType": "html",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "html",
+ "fullSuffix": ".html"
+ },
+ "type": "text/html",
+ "string": "text/html",
"suffixes": [
"html"
]
},
{
- "type": "text/jsx",
- "string": "text/jsx",
"mainType": "text",
"subType": "jsx",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "jsx",
+ "fullSuffix": ".jsx"
+ },
+ "type": "text/jsx",
+ "string": "text/jsx",
"suffixes": [
"jsx"
]
},
{
- "type": "text/plain",
- "string": "text/plain",
"mainType": "text",
"subType": "plain",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "txt",
+ "fullSuffix": ".txt"
+ },
+ "type": "text/plain",
+ "string": "text/plain",
"suffixes": [
"txt"
]
},
{
- "type": "text/tsx",
- "string": "text/tsx",
"mainType": "text",
"subType": "tsx",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "tsx",
+ "fullSuffix": ".tsx"
+ },
+ "type": "text/tsx",
+ "string": "text/tsx",
"suffixes": [
"tsx"
]
},
{
- "type": "text/x-sass",
- "string": "text/x-sass",
"mainType": "text",
"subType": "x-sass",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "sass",
+ "fullSuffix": ".sass"
+ },
+ "type": "text/x-sass",
+ "string": "text/x-sass",
"suffixes": [
"sass"
]
},
{
- "type": "text/x-scss",
- "string": "text/x-scss",
"mainType": "text",
"subType": "x-scss",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "scss",
+ "fullSuffix": ".scss"
+ },
+ "type": "text/x-scss",
+ "string": "text/x-scss",
"suffixes": [
"scss"
]
},
{
- "type": "video/3gpp",
- "string": "video/3gpp",
"mainType": "video",
"subType": "3gpp",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "3gpp",
+ "fullSuffix": ".3gpp"
+ },
+ "type": "video/3gpp",
+ "string": "video/3gpp",
"suffixes": [
"3gpp",
"3gp"
]
},
{
- "type": "video/mp4",
- "string": "video/mp4",
"mainType": "video",
"subType": "mp4",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "mp4",
+ "fullSuffix": ".mp4"
+ },
+ "type": "video/mp4",
+ "string": "video/mp4",
"suffixes": [
"mp4"
]
},
{
- "type": "video/mpeg",
- "string": "video/mpeg",
"mainType": "video",
"subType": "mpeg",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "mpg",
+ "fullSuffix": ".mpg"
+ },
+ "type": "video/mpeg",
+ "string": "video/mpeg",
"suffixes": [
"mpg",
"mpeg"
]
},
{
- "type": "video/ogg",
- "string": "video/ogg",
"mainType": "video",
"subType": "ogg",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "ogv",
+ "fullSuffix": ".ogv"
+ },
+ "type": "video/ogg",
+ "string": "video/ogg",
"suffixes": [
"ogv"
]
},
{
- "type": "video/webm",
- "string": "video/webm",
"mainType": "video",
"subType": "webm",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "webm",
+ "fullSuffix": ".webm"
+ },
+ "type": "video/webm",
+ "string": "video/webm",
"suffixes": [
"webm"
]
},
{
- "type": "video/x-msvideo",
- "string": "video/x-msvideo",
"mainType": "video",
"subType": "x-msvideo",
"delimiter": ".",
+ "firstSuffix": {
+ "suffix": "avi",
+ "fullSuffix": ".avi"
+ },
+ "type": "video/x-msvideo",
+ "string": "video/x-msvideo",
"suffixes": [
"avi"
]
@@ -1863,18 +1969,8 @@
"output": {
"formats": [
{
- "MediaType": "text/html",
+ "mediaType": "text/html",
"name": "HTML",
- "mediaType": {
- "type": "text/html",
- "string": "text/html",
- "mainType": "text",
- "subType": "html",
- "delimiter": ".",
- "suffixes": [
- "html"
- ]
- },
"path": "",
"baseName": "index",
"rel": "canonical",
@@ -1887,18 +1983,8 @@
"weight": 10
},
{
- "MediaType": "text/html",
+ "mediaType": "text/html",
"name": "AMP",
- "mediaType": {
- "type": "text/html",
- "string": "text/html",
- "mainType": "text",
- "subType": "html",
- "delimiter": ".",
- "suffixes": [
- "html"
- ]
- },
"path": "amp",
"baseName": "index",
"rel": "amphtml",
@@ -1911,18 +1997,8 @@
"weight": 0
},
{
- "MediaType": "text/css",
+ "mediaType": "text/css",
"name": "CSS",
- "mediaType": {
- "type": "text/css",
- "string": "text/css",
- "mainType": "text",
- "subType": "css",
- "delimiter": ".",
- "suffixes": [
- "css"
- ]
- },
"path": "",
"baseName": "styles",
"rel": "stylesheet",
@@ -1935,18 +2011,8 @@
"weight": 0
},
{
- "MediaType": "text/csv",
+ "mediaType": "text/csv",
"name": "CSV",
- "mediaType": {
- "type": "text/csv",
- "string": "text/csv",
- "mainType": "text",
- "subType": "csv",
- "delimiter": ".",
- "suffixes": [
- "csv"
- ]
- },
"path": "",
"baseName": "index",
"rel": "alternate",
@@ -1959,18 +2025,8 @@
"weight": 0
},
{
- "MediaType": "text/calendar",
+ "mediaType": "text/calendar",
"name": "Calendar",
- "mediaType": {
- "type": "text/calendar",
- "string": "text/calendar",
- "mainType": "text",
- "subType": "calendar",
- "delimiter": ".",
- "suffixes": [
- "ics"
- ]
- },
"path": "",
"baseName": "index",
"rel": "alternate",
@@ -1983,18 +2039,8 @@
"weight": 0
},
{
- "MediaType": "application/json",
+ "mediaType": "application/json",
"name": "JSON",
- "mediaType": {
- "type": "application/json",
- "string": "application/json",
- "mainType": "application",
- "subType": "json",
- "delimiter": ".",
- "suffixes": [
- "json"
- ]
- },
"path": "",
"baseName": "index",
"rel": "alternate",
@@ -2007,18 +2053,8 @@
"weight": 0
},
{
- "MediaType": "text/plain",
+ "mediaType": "text/plain",
"name": "ROBOTS",
- "mediaType": {
- "type": "text/plain",
- "string": "text/plain",
- "mainType": "text",
- "subType": "plain",
- "delimiter": ".",
- "suffixes": [
- "txt"
- ]
- },
"path": "",
"baseName": "robots",
"rel": "alternate",
@@ -2031,18 +2067,8 @@
"weight": 0
},
{
- "MediaType": "application/rss+xml",
+ "mediaType": "application/rss+xml",
"name": "RSS",
- "mediaType": {
- "type": "application/rss+xml",
- "string": "application/rss+xml",
- "mainType": "application",
- "subType": "rss",
- "delimiter": ".",
- "suffixes": [
- "xml"
- ]
- },
"path": "",
"baseName": "index",
"rel": "alternate",
@@ -2055,18 +2081,8 @@
"weight": 0
},
{
- "MediaType": "application/xml",
+ "mediaType": "application/xml",
"name": "Sitemap",
- "mediaType": {
- "type": "application/xml",
- "string": "application/xml",
- "mainType": "application",
- "subType": "xml",
- "delimiter": ".",
- "suffixes": [
- "xml"
- ]
- },
"path": "",
"baseName": "sitemap",
"rel": "sitemap",
@@ -2299,7 +2315,7 @@
]
},
{
- "Example": "AMP home, French language\"",
+ "Example": "AMP home, French language",
"Kind": "home",
"OutputFormat": "AMP",
"Suffix": "html",
@@ -4360,16 +4376,40 @@
]
},
"Contains": {
- "Description": "",
- "Args": null,
+ "Description": "Contains reports whether substr is in s.",
+ "Args": [
+ "s",
+ "substr"
+ ],
"Aliases": null,
- "Examples": null
+ "Examples": [
+ [
+ "{{ strings.Contains \"abc\" \"b\" }}",
+ "true"
+ ],
+ [
+ "{{ strings.Contains \"abc\" \"d\" }}",
+ "false"
+ ]
+ ]
},
"ContainsAny": {
- "Description": "",
- "Args": null,
+ "Description": "ContainsAny reports whether any Unicode code points in chars are within s.",
+ "Args": [
+ "s",
+ "chars"
+ ],
"Aliases": null,
- "Examples": null
+ "Examples": [
+ [
+ "{{ strings.ContainsAny \"abc\" \"bcd\" }}",
+ "true"
+ ],
+ [
+ "{{ strings.ContainsAny \"abc\" \"def\" }}",
+ "false"
+ ]
+ ]
},
"Count": {
"Description": "Count counts the number of non-overlapping instances of substr in s.\nIf substr is an empty string, Count returns 1 + the number of Unicode code points in s.",
diff --git a/go.mod b/go.mod
index b389a795f..169f7967f 100644
--- a/go.mod
+++ b/go.mod
@@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
go 1.12
-require github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 // indirect
+require github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7 // indirect
diff --git a/go.sum b/go.sum
index d19e6e7b8..739466c4a 100644
--- a/go.sum
+++ b/go.sum
@@ -25,3 +25,7 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f h1:BWJyycs4
github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 h1:ShqzOFeeg54FPSuS6q8HSeTVgj2xNZRe/YS0jNbi21g=
github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65 h1:EJzierSWKqwsrUXU6MaFe0J97c0e5pzl5dBNRRrV2Nc=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7 h1:uRCgPslaBgLYy4ANXBoPbBQVM8aNiHoxIZTKUXpkuUA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
diff --git a/layouts/shortcodes/datatable-filtered.html b/layouts/shortcodes/datatable-filtered.html
index 576ddab6f..ff3f299bd 100644
--- a/layouts/shortcodes/datatable-filtered.html
+++ b/layouts/shortcodes/datatable-filtered.html
@@ -20,8 +20,19 @@
{{ range $k, $v := . }}
{{ $.Scratch.Set $k $v }}
{{ end }}
- {{ range $fields }}
- {{ $.Scratch.Get . }} |
+ {{ range $k, $v := $fields }}
+
+ {{ $tdContent := $.Scratch.Get . }}
+ {{ if eq $k 3 }}
+ {{ printf "%v" $tdContent |
+ strings.ReplaceRE `\[` "- " |
+ strings.ReplaceRE `\s` "
- " |
+ strings.ReplaceRE `\]` "
" |
+ safeHTML }}
+ {{ else }}
+ {{ $tdContent }}
+ {{ end}}
+ |
{{ end }}
{{ end }}
diff --git a/netlify.toml b/netlify.toml
index e36b878d4..7f80f5cc8 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
-HUGO_VERSION = "0.81.0"
+HUGO_VERSION = "0.82.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.81.0"
+HUGO_VERSION = "0.82.1"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
-HUGO_VERSION = "0.81.0"
+HUGO_VERSION = "0.82.1"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
-HUGO_VERSION = "0.81.0"
+HUGO_VERSION = "0.82.1"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"
diff --git a/resources/_gen/images/news/0.82.0-relnotes/featured_hu5d8344c080499179dc5edbf7deb421a4_57106_480x0_resize_catmullrom_2.png b/resources/_gen/images/news/0.82.0-relnotes/featured_hu5d8344c080499179dc5edbf7deb421a4_57106_480x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..a08dda230
Binary files /dev/null and b/resources/_gen/images/news/0.82.0-relnotes/featured_hu5d8344c080499179dc5edbf7deb421a4_57106_480x0_resize_catmullrom_2.png differ
diff --git a/resources/_gen/images/news/0.82.0-relnotes/featured_hu5d8344c080499179dc5edbf7deb421a4_57106_640x0_resize_catmullrom_2.png b/resources/_gen/images/news/0.82.0-relnotes/featured_hu5d8344c080499179dc5edbf7deb421a4_57106_640x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..9cf18659d
Binary files /dev/null and b/resources/_gen/images/news/0.82.0-relnotes/featured_hu5d8344c080499179dc5edbf7deb421a4_57106_640x0_resize_catmullrom_2.png differ