From cf591b7c0c598d34896709db6d28598da37e3ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 23 Feb 2023 07:52:04 +0100 Subject: [PATCH] Squashed 'docs/' changes from 1214f6ffb..36dd5483f 36dd5483f Clarify placement of 404 template 6f0a5f3f0 Update urls.Parse.md c8070e578 Remove reference to Internet Explorer conditional comments (#1975) 3e3458f09 Describe default source map behavior for js.build (#1974) 08c9ed09a Simplify ordinal abbreviation example... (#1970) b5aa8d598 docs(markdownify): mention a context limitation (#1968) 596af47f5 Fixing typo in configuration.md doc (#1966) c47cadfcb Fix `hardWraps` config spelling (#1964) 5739a174e Add detail to tabWidth highlighting option 73a4bcd1f doc: Add hugo-lyra search engine (#1959) 6cc9ebdfd Update uniq function example (#1963) 686a65cf6 Update uniq.md 096f794d0 Update uniq.md 914ca0c38 remove `version` from SVG example (#1957) 58347d41f Update theme 7c806371f Fix 404 error for CloudCannon community learn docs (#1955) 58e42b03d Update theme fd0385ee2 Update theme 513b7a43a Update findRe.md 4d39137ef Update configuration.md b1c3b58a7 Update configuration.md f827cce8d Update configuration.md 3d72ed8fb netlify: Hugo 0.110.0 e6f969c87 Merge branch 'feat/config-rename' 4c0b5a0b5 dos: Regen CLI docs 05d9db705 docs: Regen docshelper f73bdb6e5 Merge commit 'ef6f101e75256c3bb88a6f1f3b5c1273bf8d7382' e83141f88 Format config 4cadf795e Rename config.toml -> hugo.toml c8aa8617f Move config/_default/config.toml -> config.toml 2943c031a Add fill HTTP Response info into .Data in resources.GetRemote git-subtree-dir: docs git-subtree-split: 36dd5483fb8efb6db4488bbaca5f6ac855f8ffea --- .../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 | 4 + .../images/sponsors/your-company.svg | 0 .../gohugoio/gohugoioTheme/data/sponsors.toml | 13 +-- .../home-page-sections/installation.html | 6 +- .../partials/home-page-sections/sponsors.html | 27 +++--- .../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 +++++++++++++ _vendor/modules.txt | 2 +- config/_default/config.toml | 85 ----------------- content/en/commands/hugo.md | 2 +- content/en/commands/hugo_completion.md | 2 +- content/en/commands/hugo_completion_bash.md | 2 +- content/en/commands/hugo_completion_fish.md | 2 +- .../en/commands/hugo_completion_powershell.md | 2 +- content/en/commands/hugo_completion_zsh.md | 2 +- content/en/commands/hugo_config.md | 2 +- content/en/commands/hugo_config_mounts.md | 2 +- content/en/commands/hugo_convert.md | 2 +- content/en/commands/hugo_convert_toJSON.md | 2 +- content/en/commands/hugo_convert_toTOML.md | 2 +- content/en/commands/hugo_convert_toYAML.md | 2 +- content/en/commands/hugo_deploy.md | 2 +- content/en/commands/hugo_env.md | 2 +- content/en/commands/hugo_gen.md | 2 +- content/en/commands/hugo_gen_chromastyles.md | 2 +- content/en/commands/hugo_gen_doc.md | 2 +- content/en/commands/hugo_gen_man.md | 2 +- content/en/commands/hugo_import.md | 2 +- content/en/commands/hugo_import_jekyll.md | 2 +- content/en/commands/hugo_list.md | 2 +- content/en/commands/hugo_list_all.md | 2 +- content/en/commands/hugo_list_drafts.md | 2 +- content/en/commands/hugo_list_expired.md | 2 +- content/en/commands/hugo_list_future.md | 2 +- content/en/commands/hugo_mod.md | 2 +- content/en/commands/hugo_mod_clean.md | 2 +- content/en/commands/hugo_mod_get.md | 2 +- content/en/commands/hugo_mod_graph.md | 2 +- content/en/commands/hugo_mod_init.md | 2 +- content/en/commands/hugo_mod_npm.md | 2 +- content/en/commands/hugo_mod_npm_pack.md | 2 +- content/en/commands/hugo_mod_tidy.md | 2 +- content/en/commands/hugo_mod_vendor.md | 2 +- content/en/commands/hugo_mod_verify.md | 2 +- content/en/commands/hugo_new.md | 2 +- content/en/commands/hugo_new_site.md | 2 +- content/en/commands/hugo_new_theme.md | 2 +- content/en/commands/hugo_server.md | 2 +- content/en/commands/hugo_version.md | 2 +- content/en/functions/dict.md | 2 +- content/en/functions/findRe.md | 19 ++++ content/en/functions/format.md | 4 +- content/en/functions/highlight.md | 10 +- content/en/functions/markdownify.md | 5 +- content/en/functions/uniq.md | 19 ++-- content/en/functions/urls.Parse.md | 2 +- .../getting-started/configuration-markup.md | 2 +- content/en/getting-started/configuration.md | 9 +- .../external-learning-resources/index.md | 2 +- content/en/hugo-pipes/introduction.md | 24 +++++ content/en/hugo-pipes/js.md | 8 +- content/en/templates/404.md | 2 +- content/en/templates/introduction.md | 12 ++- content/en/tools/search.md | 1 + data/docs.json | 25 ++++- go.mod | 2 +- go.sum | 6 ++ hugo.toml | 87 ++++++++++++++++++ netlify.toml | 8 +- 78 files changed, 474 insertions(+), 193 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%) create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/your-company.svg (100%) 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 delete mode 100644 config/_default/config.toml create mode 100644 hugo.toml 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 00000000000..fd7d12f5cf9 --- /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 00000000000..7060e856f00 --- /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/assets/images/sponsors/your-company-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg new file mode 100644 index 00000000000..1793cb6446a --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg @@ -0,0 +1,4 @@ + + + + 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 adf26ecdb1b..c31178c9235 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 = "Your Company?" - link = "https://bep.is/en/hugo-sponsor-2023-01/" - logo = "/images/sponsors/your-company.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/installation.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html index a23cae11d9c..cf2989ddb4e 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 @@

Install in seconds, build in milliseconds.

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/layouts/partials/home-page-sections/sponsors.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html index e0f6670be64..b2915e109c1 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 @@

Hugo Sponsors

{{ 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/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 00000000000..a3a3ba35bee --- /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 00000000000..d587f9a1fb2 --- /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 00000000000..c5c3af884b9 --- /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 00000000000..181bc14b04b --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/icon-h/hugo-h-4.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 21e85264cce..9e5b08998d8 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-20230124135550-462d5fe4a87f diff --git a/config/_default/config.toml b/config/_default/config.toml deleted file mode 100644 index 7312333100e..00000000000 --- a/config/_default/config.toml +++ /dev/null @@ -1,85 +0,0 @@ -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" - -# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below). -disableAliases = true - -[minify] -[minify.tdewolff] -[minify.tdewolff.html] -keepWhitespace = true - -[module] -[module.hugoVersion] -min = "0.56.0" -[[module.imports]] -path = "github.com/gohugoio/gohugoioTheme" - -[outputs] -home = [ "HTML", "RSS", "REDIR", "HEADERS" ] -section = [ "HTML", "RSS"] - -[mediaTypes] -[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 - -[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 - -[related] -threshold = 80 -includeNewer = true -toLower = false -[[related.indices]] -name = "keywords" -weight = 100 -[[related.indices]] -name = "date" -weight = 10 -pattern = "2006" - -[social] -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" - -[taxonomies] -category = "categories" diff --git a/content/en/commands/hugo.md b/content/en/commands/hugo.md index e51a79f4847..0b42d5521a2 100644 --- a/content/en/commands/hugo.md +++ b/content/en/commands/hugo.md @@ -30,7 +30,7 @@ hugo [flags] --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ --cleanDestinationDir remove files from destination not found in static directories --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") -c, --contentDir string filesystem path to content directory --debug debug output diff --git a/content/en/commands/hugo_completion.md b/content/en/commands/hugo_completion.md index 309af4fe9b3..5387f7aeda2 100644 --- a/content/en/commands/hugo_completion.md +++ b/content/en/commands/hugo_completion.md @@ -23,7 +23,7 @@ See each sub-command's help for details on how to use the generated script. ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_completion_bash.md b/content/en/commands/hugo_completion_bash.md index d770934564c..22d9486477e 100644 --- a/content/en/commands/hugo_completion_bash.md +++ b/content/en/commands/hugo_completion_bash.md @@ -46,7 +46,7 @@ hugo completion bash ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_completion_fish.md b/content/en/commands/hugo_completion_fish.md index 26cdb9b5f42..48150704499 100644 --- a/content/en/commands/hugo_completion_fish.md +++ b/content/en/commands/hugo_completion_fish.md @@ -37,7 +37,7 @@ hugo completion fish [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_completion_powershell.md b/content/en/commands/hugo_completion_powershell.md index 85bf878365b..7e6abb9f475 100644 --- a/content/en/commands/hugo_completion_powershell.md +++ b/content/en/commands/hugo_completion_powershell.md @@ -34,7 +34,7 @@ hugo completion powershell [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_completion_zsh.md b/content/en/commands/hugo_completion_zsh.md index 7e4e15ac9ab..9612817e38d 100644 --- a/content/en/commands/hugo_completion_zsh.md +++ b/content/en/commands/hugo_completion_zsh.md @@ -48,7 +48,7 @@ hugo completion zsh [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_config.md b/content/en/commands/hugo_config.md index f1a875ab537..ca73bbe4b6a 100644 --- a/content/en/commands/hugo_config.md +++ b/content/en/commands/hugo_config.md @@ -29,7 +29,7 @@ hugo config [flags] ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_config_mounts.md b/content/en/commands/hugo_config_mounts.md index 0bcc3ac78db..825ddf1b591 100644 --- a/content/en/commands/hugo_config_mounts.md +++ b/content/en/commands/hugo_config_mounts.md @@ -21,7 +21,7 @@ hugo config mounts [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_convert.md b/content/en/commands/hugo_convert.md index b85bfb7e0fe..e8015a5b5f7 100644 --- a/content/en/commands/hugo_convert.md +++ b/content/en/commands/hugo_convert.md @@ -29,7 +29,7 @@ See convert's subcommands toJSON, toTOML and toYAML for more information. ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_convert_toJSON.md b/content/en/commands/hugo_convert_toJSON.md index 2c437d13aaa..162c42d0a91 100644 --- a/content/en/commands/hugo_convert_toJSON.md +++ b/content/en/commands/hugo_convert_toJSON.md @@ -26,7 +26,7 @@ hugo convert toJSON [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_convert_toTOML.md b/content/en/commands/hugo_convert_toTOML.md index d45935beb12..50c0c9ebf23 100644 --- a/content/en/commands/hugo_convert_toTOML.md +++ b/content/en/commands/hugo_convert_toTOML.md @@ -26,7 +26,7 @@ hugo convert toTOML [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_convert_toYAML.md b/content/en/commands/hugo_convert_toYAML.md index 113efcd6b02..bf2d28421f4 100644 --- a/content/en/commands/hugo_convert_toYAML.md +++ b/content/en/commands/hugo_convert_toYAML.md @@ -26,7 +26,7 @@ hugo convert toYAML [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_deploy.md b/content/en/commands/hugo_deploy.md index f9d8e83fbaf..4e1d468b7c3 100644 --- a/content/en/commands/hugo_deploy.md +++ b/content/en/commands/hugo_deploy.md @@ -39,7 +39,7 @@ hugo deploy [flags] ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_env.md b/content/en/commands/hugo_env.md index c1d7b67b7cb..632614d5066 100644 --- a/content/en/commands/hugo_env.md +++ b/content/en/commands/hugo_env.md @@ -28,7 +28,7 @@ hugo env [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_gen.md b/content/en/commands/hugo_gen.md index aeb5a66ca14..281669b596c 100644 --- a/content/en/commands/hugo_gen.md +++ b/content/en/commands/hugo_gen.md @@ -17,7 +17,7 @@ A collection of several useful generators. ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_gen_chromastyles.md b/content/en/commands/hugo_gen_chromastyles.md index 6c39faf7d14..ed434b1c794 100644 --- a/content/en/commands/hugo_gen_chromastyles.md +++ b/content/en/commands/hugo_gen_chromastyles.md @@ -30,7 +30,7 @@ hugo gen chromastyles [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_gen_doc.md b/content/en/commands/hugo_gen_doc.md index f8d1ab4e5ae..b6e6a99f2f9 100644 --- a/content/en/commands/hugo_gen_doc.md +++ b/content/en/commands/hugo_gen_doc.md @@ -32,7 +32,7 @@ hugo gen doc [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_gen_man.md b/content/en/commands/hugo_gen_man.md index a01b7ccd335..c37ca242023 100644 --- a/content/en/commands/hugo_gen_man.md +++ b/content/en/commands/hugo_gen_man.md @@ -28,7 +28,7 @@ hugo gen man [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_import.md b/content/en/commands/hugo_import.md index e297ff92760..70b182902a3 100644 --- a/content/en/commands/hugo_import.md +++ b/content/en/commands/hugo_import.md @@ -23,7 +23,7 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_import_jekyll.md b/content/en/commands/hugo_import_jekyll.md index 5686f511eee..ff0ff549b4b 100644 --- a/content/en/commands/hugo_import_jekyll.md +++ b/content/en/commands/hugo_import_jekyll.md @@ -28,7 +28,7 @@ hugo import jekyll [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_list.md b/content/en/commands/hugo_list.md index 6ef2bbd68fd..e2854c56801 100644 --- a/content/en/commands/hugo_list.md +++ b/content/en/commands/hugo_list.md @@ -27,7 +27,7 @@ List requires a subcommand, e.g. `hugo list drafts`. ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_list_all.md b/content/en/commands/hugo_list_all.md index a179df34350..a6f9f94d674 100644 --- a/content/en/commands/hugo_list_all.md +++ b/content/en/commands/hugo_list_all.md @@ -25,7 +25,7 @@ hugo list all [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_list_drafts.md b/content/en/commands/hugo_list_drafts.md index 0ef3525dd9a..98c8a047cfe 100644 --- a/content/en/commands/hugo_list_drafts.md +++ b/content/en/commands/hugo_list_drafts.md @@ -25,7 +25,7 @@ hugo list drafts [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_list_expired.md b/content/en/commands/hugo_list_expired.md index 8e43a6c14b9..89c10d50110 100644 --- a/content/en/commands/hugo_list_expired.md +++ b/content/en/commands/hugo_list_expired.md @@ -25,7 +25,7 @@ hugo list expired [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_list_future.md b/content/en/commands/hugo_list_future.md index db756392a90..ca15b767356 100644 --- a/content/en/commands/hugo_list_future.md +++ b/content/en/commands/hugo_list_future.md @@ -25,7 +25,7 @@ hugo list future [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod.md b/content/en/commands/hugo_mod.md index 6678e433f90..1df6df78e5e 100644 --- a/content/en/commands/hugo_mod.md +++ b/content/en/commands/hugo_mod.md @@ -65,7 +65,7 @@ See https://gohugo.io/hugo-modules/ for more information. ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_mod_clean.md b/content/en/commands/hugo_mod_clean.md index d99db11b2aa..b13b7c020b4 100644 --- a/content/en/commands/hugo_mod_clean.md +++ b/content/en/commands/hugo_mod_clean.md @@ -33,7 +33,7 @@ hugo mod clean [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_get.md b/content/en/commands/hugo_mod_get.md index 298a5808b3a..54eaa74deaf 100644 --- a/content/en/commands/hugo_mod_get.md +++ b/content/en/commands/hugo_mod_get.md @@ -51,7 +51,7 @@ hugo mod get [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_graph.md b/content/en/commands/hugo_mod_graph.md index bff68e2174c..ba8898a6906 100644 --- a/content/en/commands/hugo_mod_graph.md +++ b/content/en/commands/hugo_mod_graph.md @@ -27,7 +27,7 @@ hugo mod graph [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_init.md b/content/en/commands/hugo_mod_init.md index 5cd25be1a56..21aacf1315e 100644 --- a/content/en/commands/hugo_mod_init.md +++ b/content/en/commands/hugo_mod_init.md @@ -32,7 +32,7 @@ hugo mod init [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_npm.md b/content/en/commands/hugo_mod_npm.md index c9dc16d7baa..0a9a4386906 100644 --- a/content/en/commands/hugo_mod_npm.md +++ b/content/en/commands/hugo_mod_npm.md @@ -25,7 +25,7 @@ hugo mod npm [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_npm_pack.md b/content/en/commands/hugo_mod_npm_pack.md index 134cb66c499..597b039ded1 100644 --- a/content/en/commands/hugo_mod_npm_pack.md +++ b/content/en/commands/hugo_mod_npm_pack.md @@ -35,7 +35,7 @@ hugo mod npm pack [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_tidy.md b/content/en/commands/hugo_mod_tidy.md index 448697b1c90..68279cf9b41 100644 --- a/content/en/commands/hugo_mod_tidy.md +++ b/content/en/commands/hugo_mod_tidy.md @@ -21,7 +21,7 @@ hugo mod tidy [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_vendor.md b/content/en/commands/hugo_mod_vendor.md index 5758a3b4918..1dab295cabd 100644 --- a/content/en/commands/hugo_mod_vendor.md +++ b/content/en/commands/hugo_mod_vendor.md @@ -28,7 +28,7 @@ hugo mod vendor [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_mod_verify.md b/content/en/commands/hugo_mod_verify.md index 6a21c2076c2..7ffab453ef2 100644 --- a/content/en/commands/hugo_mod_verify.md +++ b/content/en/commands/hugo_mod_verify.md @@ -27,7 +27,7 @@ hugo mod verify [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/commands/hugo_new.md b/content/en/commands/hugo_new.md index 5ca850c3b75..e0f58247be8 100644 --- a/content/en/commands/hugo_new.md +++ b/content/en/commands/hugo_new.md @@ -67,7 +67,7 @@ hugo new [path] [flags] ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_new_site.md b/content/en/commands/hugo_new_site.md index e0bd35c1767..e594a997911 100644 --- a/content/en/commands/hugo_new_site.md +++ b/content/en/commands/hugo_new_site.md @@ -33,7 +33,7 @@ hugo new site [path] [flags] ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_new_theme.md b/content/en/commands/hugo_new_theme.md index 822bce5434a..48c374d9871 100644 --- a/content/en/commands/hugo_new_theme.md +++ b/content/en/commands/hugo_new_theme.md @@ -32,7 +32,7 @@ hugo new theme [name] [flags] ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_server.md b/content/en/commands/hugo_server.md index 62a3938e451..f80bd496e15 100644 --- a/content/en/commands/hugo_server.md +++ b/content/en/commands/hugo_server.md @@ -82,7 +82,7 @@ hugo server [flags] ### Options inherited from parent commands ``` - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output --log enable Logging diff --git a/content/en/commands/hugo_version.md b/content/en/commands/hugo_version.md index e6e8fcaa14e..bdef5bbd467 100644 --- a/content/en/commands/hugo_version.md +++ b/content/en/commands/hugo_version.md @@ -25,7 +25,7 @@ hugo version [flags] ``` --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --config string config file (default is path/config.yaml|json|toml) + --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment diff --git a/content/en/functions/dict.md b/content/en/functions/dict.md index 5c8ad9d8ab1..dd1e2cd5b07 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" >}} - diff --git a/content/en/functions/findRe.md b/content/en/functions/findRe.md index 8e08bfc0d2f..13d43f896ac 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 diff --git a/content/en/functions/format.md b/content/en/functions/format.md index e2f93f1fc83..5c86714fe26 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: diff --git a/content/en/functions/highlight.md b/content/en/functions/highlight.md index 8324edb810f..10b1c2d904d 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`.\ diff --git a/content/en/functions/markdownify.md b/content/en/functions/markdownify.md index b42e045e7f2..8d8726cffe1 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/ diff --git a/content/en/functions/uniq.md b/content/en/functions/uniq.md index eec55e5c310..73ca32488ce 100644 --- a/content/en/functions/uniq.md +++ b/content/en/functions/uniq.md @@ -1,25 +1,18 @@ --- title: uniq linktitle: uniq -description: Takes in a slice or array and returns a slice with subsequent duplicate elements removed. -date: 2017-02-01 -publishdate: 2017-02-01 -lastmod: 2017-02-01 +description: Takes in a slice or array and returns a slice with duplicate elements removed. 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] + ``` diff --git a/content/en/functions/urls.Parse.md b/content/en/functions/urls.Parse.md index 67673421095..988ecb3ac01 100644 --- a/content/en/functions/urls.Parse.md +++ b/content/en/functions/urls.Parse.md @@ -1,6 +1,6 @@ --- title: urls.Parse -description: Parse parses a given url, which may be relative or absolute, into a URL structure. +description: Parse parses a given URL, which may be relative or absolute, into a URL structure. date: 2017-09-25 publishdate: 2017-09-25 lastmod: 2017-09-25 diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md index b55bd79c4e0..d1d237b2a98 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 diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 3c9b426789e..99d11fbb174 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 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" >}} + ## 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. @@ -117,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 diff --git a/content/en/getting-started/external-learning-resources/index.md b/content/en/getting-started/external-learning-resources/index.md index 7102e08317d..61e7ed649bd 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 diff --git a/content/en/hugo-pipes/introduction.md b/content/en/hugo-pipes/introduction.md index f38ec58959c..e83741f7430 100755 --- a/content/en/hugo-pipes/introduction.md +++ b/content/en/hugo-pipes/introduction.md @@ -50,6 +50,30 @@ With `resources.GetRemote`, the first argument is a remote URL: `resources.Get` and `resources.GetRemote` return `nil` if the resource is not found. +{{< new-in "0.110.0" >}} You can get information about the HTTP Response using `.Data` in the returned `Resource`. This is especially useful for HEAD request without any body. The Data object contains: + +StatusCode +: The HTTP status code, e.g. 200 +Status +: The HTTP status text, e.g. "200 OK" +TransferEncoding +: The transfer encoding, e.g. "chunked" +ContentLength +: The content length, e.g. 1234 +ContentType +: The content type, e.g. "text/html" + + +## Copy a Resource + +{{< new-in "0.100.0" >}} + +`resources.Copy` allows you to copy almost any Hugo `Resource` (the one exception is the `Page`), possibly most useful for renaming things: + +```go-html-template +{{ $resized := $image.Resize "400x400" | resources.Copy "images/mynewname.jpg" }} + +``` ### Caching diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md index c95688e687b..6905a6555a1 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