From c8aa8617f1457de4165656c9a4e089fed7652504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 17 Jan 2023 12:09:45 +0100 Subject: [PATCH 01/26] Move config/_default/config.toml -> config.toml I will do a new rename in a minute, but my take on this now is that: * Every site should have a hugo.toml (or yaml,json) file. * In most simple setups, I would limit the use of the /config folder to environment specific things. --- config/_default/config.toml => config.toml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config/_default/config.toml => config.toml (100%) diff --git a/config/_default/config.toml b/config.toml similarity index 100% rename from config/_default/config.toml rename to config.toml From 4cadf795ef7c12fe0cbb564a036705ea6a253b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 17 Jan 2023 12:11:34 +0100 Subject: [PATCH 02/26] Rename config.toml -> hugo.toml --- config.toml => hugo.toml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config.toml => hugo.toml (100%) diff --git a/config.toml b/hugo.toml similarity index 100% rename from config.toml rename to hugo.toml From e83141f88dbec930b8039cb73d676cec6416c59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 17 Jan 2023 12:12:37 +0100 Subject: [PATCH 03/26] Format config --- hugo.toml | 124 +++++++++++++++++++++++++++--------------------------- 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/hugo.toml b/hugo.toml index 731233310..da6bd9534 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,85 +1,87 @@ -baseURL = "https://gohugo.io/" +# This his the main configuration file. There are also environment specific configuration stored in the /config directory. + +baseURL = "https://gohugo.io/" defaultContentLanguage = "en" -enableEmoji = true -googleAnalytics = "G-MBZGKNMDWC" -ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"] -languageCode = "en-us" -paginate = 100 -pluralizeListTitles = false -timeZone = "Europe/Oslo" -title = "Hugo" +enableEmoji = true +googleAnalytics = "G-MBZGKNMDWC" +ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"] +languageCode = "en-us" +paginate = 100 +pluralizeListTitles = false +timeZone = "Europe/Oslo" +title = "Hugo" # We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below). disableAliases = true [minify] -[minify.tdewolff] -[minify.tdewolff.html] -keepWhitespace = true + [minify.tdewolff] + [minify.tdewolff.html] + keepWhitespace = true [module] -[module.hugoVersion] -min = "0.56.0" -[[module.imports]] -path = "github.com/gohugoio/gohugoioTheme" + [module.hugoVersion] + min = "0.56.0" + [[module.imports]] + path = "github.com/gohugoio/gohugoioTheme" [outputs] -home = [ "HTML", "RSS", "REDIR", "HEADERS" ] -section = [ "HTML", "RSS"] + home = ["HTML", "RSS", "REDIR", "HEADERS"] + section = ["HTML", "RSS"] [mediaTypes] -[mediaTypes."text/netlify"] -delimiter = "" + [mediaTypes."text/netlify"] + delimiter = "" [outputFormats] -[outputFormats.REDIR] -mediatype = "text/netlify" -baseName = "_redirects" -isPlainText = true -notAlternative = true -[outputFormats.HEADERS] -mediatype = "text/netlify" -baseName = "_headers" -isPlainText = true -notAlternative = true + [outputFormats.REDIR] + mediatype = "text/netlify" + baseName = "_redirects" + isPlainText = true + notAlternative = true + [outputFormats.HEADERS] + mediatype = "text/netlify" + baseName = "_headers" + isPlainText = true + notAlternative = true [caches] -[caches.getjson] -dir = ":cacheDir/:project" -maxAge = -1 -[caches.getcsv] -dir = ":cacheDir/:project" -maxAge = -1 -[caches.images] -dir = ":cacheDir/images" -maxAge = "1440h" -[caches.assets] -dir = ":resourceDir/_gen" -maxAge = -1 + [caches.getjson] + dir = ":cacheDir/:project" + maxAge = -1 + [caches.getcsv] + dir = ":cacheDir/:project" + maxAge = -1 + [caches.images] + dir = ":cacheDir/images" + maxAge = "1440h" + [caches.assets] + dir = ":resourceDir/_gen" + maxAge = -1 [related] -threshold = 80 -includeNewer = true -toLower = false -[[related.indices]] -name = "keywords" -weight = 100 -[[related.indices]] -name = "date" -weight = 10 -pattern = "2006" + threshold = 80 + includeNewer = true + toLower = false + [[related.indices]] + name = "keywords" + weight = 100 + [[related.indices]] + name = "date" + weight = 10 + pattern = "2006" [social] -twitter = "GoHugoIO" + twitter = "GoHugoIO" [imaging] -# See https://github.com/disintegration/imaging -# CatmullRom is a sharp bicubic filter which should fit the docs site well with its many screenshots. -# Note that you can also set this per image processing. -resampleFilter = "CatmullRom" -# Default JPEG quality setting. Default is 75. -quality = 75 -anchor = "smart" + # See https://github.com/disintegration/imaging + # CatmullRom is a sharp bicubic filter which should fit the docs site well with its many screenshots. + # Note that you can also set this per image processing. + resampleFilter = "CatmullRom" + # Default JPEG quality setting. Default is 75. + quality = 75 + anchor = "smart" [taxonomies] -category = "categories" + category = "categories" From 3d72ed8fb8e70b45fd5b10241ed06357f548da0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 17 Jan 2023 14:23:16 +0100 Subject: [PATCH 04/26] netlify: Hugo 0.110.0 --- netlify.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index 4a1e79e8c..d99f6d223 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ publish = "public" command = "hugo --gc --minify" [context.production.environment] -HUGO_VERSION = "0.109.0" +HUGO_VERSION = "0.110.0" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" @@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true" command = "hugo --gc --minify --enableGitInfo" [context.split1.environment] -HUGO_VERSION = "0.109.0" +HUGO_VERSION = "0.110.0" HUGO_ENV = "production" [context.deploy-preview] command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] -HUGO_VERSION = "0.109.0" +HUGO_VERSION = "0.110.0" [context.branch-deploy] command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] -HUGO_VERSION = "0.109.0" +HUGO_VERSION = "0.110.0" [context.next.environment] HUGO_ENABLEGITINFO = "true" From f827cce8d836b77940ac39aa28a42d3a2824e9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 18 Jan 2023 09:27:46 +0100 Subject: [PATCH 05/26] Update configuration.md --- content/en/getting-started/configuration.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 3c9b42678..5a79f80dd 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -37,6 +37,12 @@ Multiple site config files can be specified as a comma-separated string to the ` {{< todo >}}TODO: distinct config.toml and others (the root object files){{< /todo >}} +## hugo.toml vs config.toml + +In Hugo 0.110.0 we changed the default config base filename to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventuall rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier code editors and build tools to identify this as a Hugo configuration file and project. + +{{new-in "0.110.0" }} + ## Configuration Directory In addition to using a single site config file, one can use the `configDir` directory (default to `config/`) to maintain easier organization and environment specific settings. From b1c3b58a74c49f241e7c1de17d732025ce9100cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 18 Jan 2023 09:29:06 +0100 Subject: [PATCH 06/26] Update configuration.md --- content/en/getting-started/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 5a79f80dd..37c76f048 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -41,7 +41,7 @@ Multiple site config files can be specified as a comma-separated string to the ` In Hugo 0.110.0 we changed the default config base filename to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventuall rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier code editors and build tools to identify this as a Hugo configuration file and project. -{{new-in "0.110.0" }} +{{< new-in "0.110.0" >}} ## Configuration Directory From 4d39137ef9379f1ab288565baa8c71a42bf3e092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 18 Jan 2023 09:29:46 +0100 Subject: [PATCH 07/26] Update configuration.md --- content/en/getting-started/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 37c76f048..cc52afcb9 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -39,7 +39,7 @@ Multiple site config files can be specified as a comma-separated string to the ` ## hugo.toml vs config.toml -In Hugo 0.110.0 we changed the default config base filename to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventuall rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier code editors and build tools to identify this as a Hugo configuration file and project. +In Hugo 0.110.0 we changed the default config base filename to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventually rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier code editors and build tools to identify this as a Hugo configuration file and project. {{< new-in "0.110.0" >}} From 513b7a43aa5d043a81bacc62b692308b5fae267c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 18 Jan 2023 09:36:25 +0100 Subject: [PATCH 08/26] Update findRe.md --- content/en/functions/findRe.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/en/functions/findRe.md b/content/en/functions/findRe.md index 8e08bfc0d..13d43f896 100644 --- a/content/en/functions/findRe.md +++ b/content/en/functions/findRe.md @@ -36,5 +36,24 @@ To limit the number of matches to one: You can write and test your regular expression using [regex101.com](https://regex101.com/). Be sure to select the Go flavor before you begin. {{% /note %}} +## findRESubmatch + +In Hugo 0.110.0 we added a variant of `findRe` that returns a slice of strings holding the text of the leftmost match of the regular expression in s and the matches, if any, of its subexpressions. + +This: + +```go-html-template +{{ findRESubmatch §§(.+?)§§ §§
  • Foo
  • Bar
  • §§ | print | safeHTML }} +``` + +Will print: + +``` +[[Foo #foo Foo] [Bar #bar Bar]] +``` + +{{< new-in "0.110.0" >}} + + [RE2]: https://github.com/google/re2/wiki/Syntax [string literal]: https://go.dev/ref/spec#String_literals From fd0385ee20e8ff0d780f6c299a43c1da9b47ef3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 19 Jan 2023 11:36:03 +0100 Subject: [PATCH 09/26] Update theme --- .../home-page-sections/installation.html | 6 +- .../static/images/icon-h/hugo-h-1.svg | 11 ++++ .../static/images/icon-h/hugo-h-2.svg | 62 +++++++++++++++++++ .../static/images/icon-h/hugo-h-3.svg | 62 +++++++++++++++++++ .../static/images/icon-h/hugo-h-4.svg | 62 +++++++++++++++++++ .../images/sponsors/your-company-dark.svg | 4 ++ _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 + 9 files changed, 208 insertions(+), 5 deletions(-) create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-1.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-2.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-3.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-4.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html index a23cae11d..cf2989ddb 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html @@ -20,13 +20,13 @@

    Windows

    - $ choco install hugo -confirm
    + $ choco install hugo-extended

    Linux

    - $ snap install hugo
    + $ sudo snap install hugo
    - + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-1.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-1.svg new file mode 100644 index 000000000..a3a3ba35b --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-1.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-2.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-2.svg new file mode 100644 index 000000000..d587f9a1f --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-2.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-3.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-3.svg new file mode 100644 index 000000000..c5c3af884 --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-3.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-4.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-4.svg new file mode 100644 index 000000000..181bc14b0 --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-4.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg new file mode 100644 index 000000000..1793cb644 --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 21e85264c..1dee80d7c 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456 +# github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b diff --git a/go.mod b/go.mod index 25975d5c4..551a849c4 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs go 1.16 -require github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456 // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b // indirect diff --git a/go.sum b/go.sum index 52c3793ca..755c6d0ab 100644 --- a/go.sum +++ b/go.sum @@ -53,3 +53,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6 h1:yEoQecRB github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456 h1:RSLItaapVjWkqSdQhumAmJkodFDbWMGNZmkVW/AFx0c= github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= +github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b h1:i/iaEOOuR1mKRR0qUOET587ooVhG8c2tllpA5HsrWNU= +github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= From 58e42b03dc5b3192423408a84178582f1a737a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 20 Jan 2023 19:51:51 +0100 Subject: [PATCH 10/26] Update theme --- .../github.com/gohugoio/gohugoioTheme/data/sponsors.toml | 6 +++--- _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index adf26ecdb..dcdfeb653 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -12,9 +12,9 @@ bgcolor = "#131A3E" [[banners]] - name = "Your Company?" - link = "https://bep.is/en/hugo-sponsor-2023-01/" - logo = "/images/sponsors/your-company.svg" + name = "BEP Consulting" + link = "https://bep.consulting" + logo = "/images/sponsors/bep-consulting.svg" utm_campaign = "hugosponsor" bgcolor = "#004887" diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 1dee80d7c..2de5fadcf 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b +# github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 diff --git a/go.mod b/go.mod index 551a849c4..9436c3475 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs go 1.16 -require github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 // indirect diff --git a/go.sum b/go.sum index 755c6d0ab..78703effe 100644 --- a/go.sum +++ b/go.sum @@ -55,3 +55,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456 h1:RSLItaap github.com/gohugoio/gohugoioTheme v0.0.0-20230109120406-12694c4a9456/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b h1:i/iaEOOuR1mKRR0qUOET587ooVhG8c2tllpA5HsrWNU= github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= +github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 h1:bEojKgKInbsLkID5Arh95vP4+0xydtn/+ayT6I8vkiU= +github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= From 7c806371f68fd9f91e02e3707da8f2a828bcb83d Mon Sep 17 00:00:00 2001 From: aaron Date: Sat, 21 Jan 2023 18:02:30 +0000 Subject: [PATCH 11/26] Fix 404 error for CloudCannon community learn docs (#1955) --- content/en/getting-started/external-learning-resources/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/external-learning-resources/index.md b/content/en/getting-started/external-learning-resources/index.md index 7102e0831..61e7ed649 100644 --- a/content/en/getting-started/external-learning-resources/index.md +++ b/content/en/getting-started/external-learning-resources/index.md @@ -34,7 +34,7 @@ Hugo in Action is a step-by-step guide to using Hugo to create static websites. ### Hugo tutorial by CloudCannon -[Step-by-step written tutorial](https://cloudcannon.com/community/learn/hugo-101/) to teach you the basics of creating a Hugo site. +[Step-by-step written tutorial](https://cloudcannon.com/community/learn/hugo-beginner-tutorial/) to teach you the basics of creating a Hugo site. ## Video tutorials From 58347d41f3ea5ba485c8995d1006e91f5c304f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 24 Jan 2023 14:58:17 +0100 Subject: [PATCH 12/26] Update theme --- .../images/sponsors/bep-consulting.svg | 0 .../images/sponsors/butter-dark.svg | 0 .../images/sponsors/butter-light.svg | 0 .../images/sponsors/esolia-logo.svg | 0 .../assets/images/sponsors/graitykit-dark.svg | 3 ++ .../assets/images/sponsors/linode-logo.svg | 1 + .../linode-logo_standard_light_medium.png | Bin .../images/sponsors/your-company-dark.svg | 0 .../images/sponsors/your-company.svg | 0 .../gohugoio/gohugoioTheme/data/sponsors.toml | 13 +++++---- .../partials/home-page-sections/sponsors.html | 27 ++++++++---------- _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 ++ 14 files changed, 27 insertions(+), 23 deletions(-) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/bep-consulting.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/butter-dark.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/butter-light.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/esolia-logo.svg (100%) create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/linode-logo_standard_light_medium.png (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/your-company-dark.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/your-company.svg (100%) diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/bep-consulting.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/bep-consulting.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-dark.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-dark.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-light.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-light.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/esolia-logo.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/esolia-logo.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/esolia-logo.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/esolia-logo.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg new file mode 100644 index 000000000..fd7d12f5c --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg new file mode 100644 index 000000000..7060e856f --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg @@ -0,0 +1 @@ + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/linode-logo_standard_light_medium.png b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo_standard_light_medium.png similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/linode-logo_standard_light_medium.png rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo_standard_light_medium.png diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index dcdfeb653..c31178c92 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -1,22 +1,23 @@ [[banners]] name = "Linode" link = "https://www.linode.com/" - logo = "/images/sponsors/linode-logo_standard_light_medium.png" + logo = "images/sponsors/linode-logo.svg" utm_campaign = "hugosponsor" [[banners]] name = "ButterCMS" link = "https://buttercms.com/hugo-cms/" - logo = "/images/sponsors/butter-light.svg" + logo = "images/sponsors/butter-light.svg" utm_campaign = "sponsorship" bgcolor = "#131A3E" [[banners]] - name = "BEP Consulting" - link = "https://bep.consulting" - logo = "/images/sponsors/bep-consulting.svg" + name = "Gravity Kit" + link = "https://www.gravitykit.com/" + logo = "images/sponsors/graitykit-dark.svg" + query_params = "ref=532&campaign=hugo&" utm_campaign = "hugosponsor" - bgcolor = "#004887" + bgcolor = "#e0ecf3" #hugohome #hugofooter diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html index e0f6670be..b2915e109 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html @@ -2,7 +2,8 @@ {{ $gtag := .gtag | default "unknown" }} {{ $classes_box := "ba b--dark-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l " }} {{ $gtag := .gtag | default "unknown" }} -{{ $utmSource := cond (eq $gtag "footer") "hugofooter" "hugohome" }} +{{ $isFooter := (eq $gtag "footer") }} +{{ $utmSource := cond $isFooter "hugofooter" "hugohome" }} {{ with .cx.Site.Data.sponsors }}
    @@ -12,26 +13,22 @@ {{ range .banners }}
    - {{ $url := printf "%s?%s" .link (querify "utm_source" $utmSource "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor")) | safeURL }} - {{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }} + style="background-color: {{ .bgcolor }};"> + {{ $query_params := .query_params | default "" }} + {{ $url := printf "%s?%s%s" .link $query_params (querify "utm_source" $utmSource "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor")) | safeURL }} + {{ $logo := resources.Get .logo }} + {{ if hugo.IsProduction }} {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }} - Logo for {{ .name }} + class="w-100 grow pa3"> + {{ $logo.Content | safeHTML }} {{ else }} - - Logo for {{ .name }} + + {{ $logo.Content | safeHTML }} + {{ end }}
    {{ end }} diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 2de5fadcf..9e5b08998 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 +# github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f diff --git a/go.mod b/go.mod index 9436c3475..33f818ad6 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs go 1.16 -require github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f // indirect diff --git a/go.sum b/go.sum index 78703effe..ea0d2dcbe 100644 --- a/go.sum +++ b/go.sum @@ -57,3 +57,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b h1:i/iaEOOu github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 h1:bEojKgKInbsLkID5Arh95vP4+0xydtn/+ayT6I8vkiU= github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= +github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f h1:8wI3zOTWQG15aKkbAZQaoGnUQff46hO95opQndBHRE4= +github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= From 914ca0c387424313454b7cdf6d4fc3b00c13f3ec Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Mon, 30 Jan 2023 11:23:25 +0900 Subject: [PATCH 13/26] remove `version` from SVG example (#1957) version is deprecated and is not needed REF: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/version --- content/en/functions/dict.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/functions/dict.md b/content/en/functions/dict.md index 5c8ad9d8a..dd1e2cd5b 100644 --- a/content/en/functions/dict.md +++ b/content/en/functions/dict.md @@ -31,7 +31,7 @@ The partial below creates an SVG and expects `fill`, `height` and `width` from t ### Partial definition {{< code file="layouts/partials/svgs/external-links.svg" download="external-links.svg" >}} - From 096f794d0cceb9a95c0ed061fcbde3f5618a3f71 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 30 Jan 2023 08:37:20 -0800 Subject: [PATCH 14/26] Update uniq.md --- content/en/functions/uniq.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/functions/uniq.md b/content/en/functions/uniq.md index eec55e5c3..b3f7f32cd 100644 --- a/content/en/functions/uniq.md +++ b/content/en/functions/uniq.md @@ -1,7 +1,8 @@ --- title: uniq linktitle: uniq -description: Takes in a slice or array and returns a slice with subsequent duplicate elements removed. +description: Takes in a slice or array and returns a slice with duplicate elements removed. +subsequent date: 2017-02-01 publishdate: 2017-02-01 lastmod: 2017-02-01 From 686a65cf69fde2d8db339ca2c3831939a68d1f7f Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 30 Jan 2023 08:37:49 -0800 Subject: [PATCH 15/26] Update uniq.md --- content/en/functions/uniq.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/en/functions/uniq.md b/content/en/functions/uniq.md index b3f7f32cd..1f0a5659f 100644 --- a/content/en/functions/uniq.md +++ b/content/en/functions/uniq.md @@ -2,7 +2,6 @@ title: uniq linktitle: uniq description: Takes in a slice or array and returns a slice with duplicate elements removed. -subsequent date: 2017-02-01 publishdate: 2017-02-01 lastmod: 2017-02-01 From 6cc9ebdfd8e464316f48a232902b373e48d1af34 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 30 Jan 2023 11:50:25 -0800 Subject: [PATCH 16/26] Update uniq function example (#1963) --- content/en/functions/uniq.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/content/en/functions/uniq.md b/content/en/functions/uniq.md index 1f0a5659f..73ca32488 100644 --- a/content/en/functions/uniq.md +++ b/content/en/functions/uniq.md @@ -2,24 +2,17 @@ title: uniq linktitle: uniq description: Takes in a slice or array and returns a slice with duplicate elements removed. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 categories: [functions] menu: docs: - parent: "functions" + parent: functions keywords: [multilingual,i18n,urls] -signature: ["uniq SET"] -workson: [] -hugoversion: -relatedfuncs: [] -deprecated: false +signature: [uniq SET] aliases: [] --- + ``` -{{ uniq (slice 1 2 3 2) }} -{{ slice 1 2 3 2 | uniq }} - +{{ slice 1 3 2 1 | uniq }} --> [1 3 2] + ``` From 73a4bcd1f4b6b6f3c97e0a6a35cc561ed7281273 Mon Sep 17 00:00:00 2001 From: Paolo Mainardi Date: Tue, 31 Jan 2023 23:11:08 +0100 Subject: [PATCH 17/26] doc: Add hugo-lyra search engine (#1959) * doc: Add hugo-lyra search engine * Fix capitalization --- content/en/tools/search.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/tools/search.md b/content/en/tools/search.md index 97ddeaf01..464aa9107 100644 --- a/content/en/tools/search.md +++ b/content/en/tools/search.md @@ -27,6 +27,7 @@ A static website with a dynamic search function? Yes, Hugo provides an alternati * [hugofastsearch](https://gist.github.com/cmod/5410eae147e4318164258742dd053993). A usability and speed update to "GitHub Gist for Fuse.js integration" — global, keyboard-optimized search. * [JS & Fuse.js tutorial](https://makewithhugo.com/add-search-to-a-hugo-site/) A simple client-side search solution, using FuseJS (does not require jQuery). * [Pagefind](https://github.com/cloudcannon/pagefind). A fully static search library that aims to perform well on large sites, while using as little of your users' bandwidth as possible. +* [Hugo Lyra](https://github.com/paolomainardi/hugo-lyra). Hugo-Lyra is a JavaScript module to integrate [Lyra](https://github.com/LyraSearch/lyra) into a Hugo website. It contains the server-side part to generate the index and the client-side library (optional) to bootstrap the search engine easily. ## Commercial Search Services From 5739a174ee365d1e6bfc7a6195968cf303e2fbc8 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 31 Jan 2023 18:48:44 -0800 Subject: [PATCH 18/26] Add detail to tabWidth highlighting option --- content/en/functions/highlight.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/en/functions/highlight.md b/content/en/functions/highlight.md index 8324edb81..10b1c2d90 100644 --- a/content/en/functions/highlight.md +++ b/content/en/functions/highlight.md @@ -36,19 +36,19 @@ Display a number at the beginning of each line. lineNumbersInTable : Boolean. Default is `true`.\ -Render the highlighted code in an HTML table with two cells. The left table cell contains the line numbers. The right table cell contains the code, allowing a user to select and copy the code without line numbers. Irrelevant if `lineNos` is false. +Render the highlighted code in an HTML table with two cells. The left table cell contains the line numbers. The right table cell contains the code, allowing a user to select and copy the code without line numbers. Irrelevant if `lineNos` is `false`. anchorLineNos : Boolean. Default is `false`.\ -Render each line number as an HTML anchor element, and set the `id` attribute of the surrounding `` to the line number. Irrelevant if `lineNos` is false. +Render each line number as an HTML anchor element, and set the `id` attribute of the surrounding `` to the line number. Irrelevant if `lineNos` is `false`. lineAnchors : String. Default is `""`.\ -When rendering a line number as an HTML anchor element, prepend this value to the `id` attribute of the surrounding ``. This provides unique `id` attributes when a page contains two or more code blocks. Irrelevant if `lineNos` or `anchorLineNos` is false. +When rendering a line number as an HTML anchor element, prepend this value to the `id` attribute of the surrounding ``. This provides unique `id` attributes when a page contains two or more code blocks. Irrelevant if `lineNos` or `anchorLineNos` is `false`. lineNoStart : Integer. Default is `1`.\ -The number to display at the beginning of the first line. Irrelevant if `lineNos` is false. +The number to display at the beginning of the first line. Irrelevant if `lineNos` is `false`. hl_Lines : String. Default is `""`.\ @@ -68,7 +68,7 @@ Use inline CSS styles instead of an external CSS file. To use an external CSS fi tabWidth : Integer. Default is `4`.\ -Substitute this number of spaces for each tab character in your highlighted code. +Substitute this number of spaces for each tab character in your highlighted code. Irrelevant if `noClasses` is `false`. guessSyntax : Boolean. Default is `false`.\ From c47cadfcbd5c902a396d514853badbfe050df147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Fri, 3 Feb 2023 22:03:47 +0100 Subject: [PATCH 19/26] Fix `hardWraps` config spelling (#1964) --- content/en/getting-started/configuration-markup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md index b55bd79c4..d1d237b2a 100644 --- a/content/en/getting-started/configuration-markup.md +++ b/content/en/getting-started/configuration-markup.md @@ -32,7 +32,7 @@ For details on the extensions, refer to [this section](https://github.com/yuin/g Some settings explained: -hardWrap +hardWraps : By default, Goldmark ignores newlines within a paragraph. Set to `true` to render newlines as `
    ` elements. unsafe From 596af47f5829ebeae7b00855250b2f0fe3f940e1 Mon Sep 17 00:00:00 2001 From: Max Efremov <51917427+mefrem@users.noreply.github.com> Date: Tue, 7 Feb 2023 22:46:31 -0600 Subject: [PATCH 20/26] Fixing typo in configuration.md doc (#1966) Co-authored-by: Joe Mooring --- content/en/getting-started/configuration.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index cc52afcb9..99d11fbb1 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -123,8 +123,7 @@ Note that you don't need to be so verbose as in the default setup below; a `_mer ## All Configuration Settings -The following is the full list of Hugo-defined variables with their default -value in parentheses. Users may choose to override those values in their site +The following is the full list of Hugo-defined variables. Users may choose to override those values in their site config file(s). ### archetypeDir From b5aa8d598e5d596734c69cb8477cceb608a5ca8c Mon Sep 17 00:00:00 2001 From: Jakub Mikulas Date: Thu, 9 Feb 2023 15:49:26 +0100 Subject: [PATCH 21/26] docs(markdownify): mention a context limitation (#1968) --- content/en/functions/markdownify.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/en/functions/markdownify.md b/content/en/functions/markdownify.md index b42e045e7..8d8726cff 100644 --- a/content/en/functions/markdownify.md +++ b/content/en/functions/markdownify.md @@ -4,7 +4,7 @@ linktitle: markdownify description: Runs the provided string through the Markdown processor. date: 2017-02-01 publishdate: 2017-02-01 -lastmod: 2017-02-01 +lastmod: 2023-02-09 keywords: [markdown,content] categories: [functions] menu: @@ -23,6 +23,7 @@ aliases: [] {{ .Title | markdownify }} ``` -{{< new-in "0.93.0" >}} **Note**: `markdownify` now supports [Render Hooks] just like [.RenderString](/functions/renderstring/). +{{< new-in "0.93.0" >}} **Note**: `markdownify` now supports [Render Hooks] just like [`.Page.RenderString`]. However, if you use more complicated [Render Hooks] relying on page context, use [`.Page.RenderString`] instead. See [GitHub issue #9692](https://github.com/gohugoio/hugo/issues/9692) for more details. [Render Hooks]: /templates/render-hooks/ +[`.Page.RenderString`]: /functions/renderstring/ From 08c9ed09a9abaacc52743f824f1e177dc3dc2c2c Mon Sep 17 00:00:00 2001 From: Kiran Castellino <57894504+kcastellino@users.noreply.github.com> Date: Wed, 15 Feb 2023 12:12:10 +1100 Subject: [PATCH 22/26] Simplify ordinal abbreviation example... (#1970) Simplify ordinal abbreviation example --- content/en/functions/format.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/functions/format.md b/content/en/functions/format.md index e2f93f1fc..5c86714fe 100644 --- a/content/en/functions/format.md +++ b/content/en/functions/format.md @@ -95,10 +95,10 @@ More examples can be found in Go's [documentation for the time package][timecons Spelled-out cardinal numbers (e.g. "one", "two", and "three") are not currently supported. -Ordinal abbreviations (i.e., with shorted suffixes like "1st", "2nd", and "3rd") are not currently directly supported. By using `{{.Date.Format "Jan 2nd 2006"}}`, Hugo assumes you want to append `nd` as a string to the day of the month. However, you can chain functions together to create something like this: +Use the [`humanize`](/functions/humanize) function to render the day of the month as an ordinal number: ``` -{{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }} of {{ .Date.Format "January 2006" }} +{{ humanize .Date.Day }} of {{ .Date.Format "January 2006" }} ``` This will output: From 3e3458f09d37fe22d5ddfed239a62194760883f5 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 18 Feb 2023 15:59:07 -0800 Subject: [PATCH 23/26] Describe default source map behavior for js.build (#1974) Closes #1973 --- content/en/hugo-pipes/js.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md index c95688e68..6905a6555 100644 --- a/content/en/hugo-pipes/js.md +++ b/content/en/hugo-pipes/js.md @@ -41,7 +41,7 @@ minify [bool] inject [slice] : 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 -shims +shims [map] : This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development: ```go-html-template @@ -84,13 +84,13 @@ defines [map] {{ $defines := dict "process.env.NODE_ENV" `"development"` }} ``` -format [string] +format [string] : The output format. One of: `iife`, `cjs`, `esm`. Default is `iife`, a self-executing function, suitable for inclusion as a