From de0df119b504a91c9e1f442b07954f366ffb2932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 13 Nov 2024 11:07:57 +0100 Subject: [PATCH] Squashed 'docs/' changes from ccb1b97cb..159c843fd 159c843fd Fix front matter menu entry example c3a476a19 Document soft deprecation of PAGE.Scratch cdead9785 netlify: Hugo 0.138.0 9169b4da4 Update version references 3bc6bf431 Update embedded.md 5c7743b2e Update creation instructions for the emoji quick reference 109efe3eb Document the comment shortcode 83d7d3005 Update theme d3c205054 netlify: Hugo 0.137.1 545290351 Handle inline HTML content 0204be97d Update theme 18d09235e Remove JS and CSS that prevents FOUC with client side math rendering 63d9dd876 Update RenderShortcodes.md 064b95539 Update output-format-definition.md 3744f3be2 Describe and refer to the extended/deploy edition 3d3302308 netlify: Hugo 0.137.0 b53aedcea Update RenderShortcodes.md b5f289165 Replace HTML comments in markdown with the new comment shortcode c673880b6 Remove superfluous right bracket f80b0c61e Update faq.md 2ede707eb Document installation on NixOS 09b114914 Update theme 76a9f90b2 Update passthrough.md 9f3355630 Update Scratch.md bc080ecaa Update Store.md 1507ede32 Update Scratch.md 54a90f569 Update Store.md 7c9145c43 Fix broken link dd15f183b Update ToMath.md 2b021c34b Move the [build] documentation to its own page cbb6677ec Fix typo ac0969063 Update ToMath.md 7fbdfd7c8 netlify: Hugo 0.136.5 17f54223c Update ToMath.md 4c9c3bb06 Update multilingual.md 1432da7bd Make site and page language methods linkable fd5b746cb Update urls.md a746f1b3a Update urls.md abf8738e2 netlify: Hugo 0.136.4 bd8759996 Update TrimSpace.md 6103c1e84 Documents strings.TrimSpace 533dd3a7b netlify: Hugo 0.136.3 30f3f97cf Update quick-start.md b0d7b41a0 Update configuration-markup.md 760e5e4f0 Update quick-start.md 17daeb866 Update quick-start.md 1e158e723 netlify: Hugo 0.136.2 d32530839 Update theme edb9bee02 Update description of url front matter field e1c576e18 netlify: Hugo 0.136.1 1ad28e1e0 Describe how to configure uglyURLs per section cbbd4c4fe netlify: Hugo 0.136.0 bb7f35e99 Merge branch 'tempv0.136.0' 706110736 docs: Regen CLI docs bf0c7821f Update urls.md 8c544e6c0 Update quick-start.md 8d02733d0 Update Paginator.md a45327aac Update Paginate.md 1377ed4de Clarify date parsing e19fb8043 Document front matter date field aliases a39951847 Update Tailwind CSS installation instructions 3be164c35 Remove duplicate token 05fc815f7 commands: Add "hugo build" as an alias for "hugo" cb3cb504c Update table render hook example efbee0bff Clarify resources.GetRemote 404 handling 4312d49c9 Update compare.Conditional documentation 4a46d53b6 Update theme 93e542d4f netlify: Hugo 0.135.0 b4da1c104 Remvoe some old new-in shortcodes 4c316f051 Update TailwindCSS.md c2fe91509 Update introduction.md 906b7c66b Update configuration.md 5ab6b3cdd Update documentation.md 26fb4bb4c Update documentation.md e9e917f37 Update version refs 83ce07f24 netlify: Hugo 0.134.3 8cb32f802 Update front-matter.md 94d7f576a Update faq.md fafc1d8d9 netlify: Hugo 0.134.2 bfe9cdc3d Update content-adapters.md 9e49ae3e1 Document ignoreLogs configuration setting 6b47a1d57 Update configuration.md fd98a0372 Document CLI options that can be set in configuration 07c2400d8 Document alternative to Summary method d053fa163 Update to reflect changes in v0.134.1 137dc3241 Update ContentWithoutSummary.md e8f6427d9 netlify: Hugo 0.134.1 git-subtree-dir: docs git-subtree-split: 159c843fd79e94a0f49bee74c272cd0cc4a848a2 --- .cspell.json | 4 + README.md | 4 +- .../gohugoioTheme/assets/css/_font-family.css | 8 +- .../assets/images/sponsors/goland.svg | 20 + .../gohugoioTheme/assets/output/css/app.css | 8 +- .../gohugoio/gohugoioTheme/data/sponsors.toml | 12 +- .../layouts/_default/baseof.html | 4 +- .../partials/home-page-sections/sponsors.html | 2 +- .../gohugoioTheme/layouts/partials/math.html | 11 +- .../layouts/partials/social-follow.html | 6 - .../layouts/shortcodes/gomodules-info.html | 2 +- .../shortcodes/module-mounts-note.html | 2 +- _vendor/modules.txt | 2 +- content/en/commands/hugo.md | 25 +- content/en/commands/hugo_build.md | 74 ++++ content/en/commands/hugo_completion.md | 2 +- content/en/commands/hugo_config.md | 6 +- content/en/commands/hugo_config_mounts.md | 2 +- content/en/commands/hugo_convert.md | 6 +- 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 | 6 +- content/en/commands/hugo_env.md | 6 +- content/en/commands/hugo_gen.md | 8 +- 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 | 6 +- content/en/commands/hugo_import_jekyll.md | 2 +- content/en/commands/hugo_list.md | 6 +- 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_list_published.md | 2 +- content/en/commands/hugo_mod.md | 4 +- 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_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 | 6 +- content/en/commands/hugo_new_content.md | 4 +- content/en/commands/hugo_new_site.md | 2 +- content/en/commands/hugo_new_theme.md | 2 +- content/en/commands/hugo_server.md | 4 +- content/en/commands/hugo_server_trust.md | 2 +- content/en/commands/hugo_version.md | 6 +- .../en/content-management/content-adapters.md | 4 + content/en/content-management/formats.md | 2 +- content/en/content-management/front-matter.md | 45 ++- .../image-processing/index.md | 2 - content/en/content-management/menus.md | 2 +- content/en/content-management/multilingual.md | 2 +- content/en/content-management/shortcodes.md | 20 + content/en/content-management/summaries.md | 66 +-- content/en/content-management/urls.md | 61 ++- content/en/contribute/development.md | 20 +- content/en/contribute/documentation.md | 24 +- content/en/functions/compare/Conditional.md | 13 +- content/en/functions/css/Sass.md | 12 +- content/en/functions/css/TailwindCSS.md | 7 +- content/en/functions/hugo/Generator.md | 2 +- content/en/functions/hugo/Version.md | 2 +- content/en/functions/resources/Babel.md | 4 +- content/en/functions/resources/FromString.md | 2 +- content/en/functions/resources/GetRemote.md | 4 + content/en/functions/resources/PostCSS.md | 4 +- content/en/functions/resources/ToCSS.md | 16 +- content/en/functions/strings/Chomp.md | 9 +- .../en/functions/strings/ContainsNonSpace.md | 16 +- content/en/functions/strings/Trim.md | 39 +- content/en/functions/strings/TrimLeft.md | 1 + content/en/functions/strings/TrimPrefix.md | 1 + content/en/functions/strings/TrimRight.md | 1 + content/en/functions/strings/TrimSpace.md | 26 ++ content/en/functions/strings/TrimSuffix.md | 1 + content/en/functions/time/AsTime.md | 31 +- content/en/functions/time/Format.md | 18 +- .../_common/parsable-date-time-strings.md | 16 +- content/en/functions/transform/ToMath.md | 6 +- .../en/getting-started/configuration-build.md | 88 ++++ .../getting-started/configuration-markup.md | 2 +- content/en/getting-started/configuration.md | 154 ++++--- content/en/getting-started/glossary.md | 2 +- content/en/getting-started/quick-start.md | 4 +- .../hosting-on-github/index.md | 2 +- .../hosting-on-gitlab.md | 4 +- .../hosting-on-netlify/index.md | 6 +- .../en/hosting-and-deployment/hugo-deploy.md | 9 +- .../en/hugo-pipes/transpile-sass-to-css.md | 12 +- .../en/installation/_common/01-editions.md | 14 +- .../_common/04-build-from-source.md | 17 +- content/en/installation/bsd.md | 5 + content/en/installation/linux.md | 13 + content/en/installation/macos.md | 5 + content/en/installation/windows.md | 4 + .../en/methods/page/ContentWithoutSummary.md | 2 +- content/en/methods/page/Language.md | 25 +- content/en/methods/page/Paginate.md | 2 +- content/en/methods/page/Paginator.md | 2 +- content/en/methods/page/RenderShortcodes.md | 17 +- content/en/methods/page/Scratch.md | 14 +- content/en/methods/page/Store.md | 8 +- content/en/methods/page/Summary.md | 34 +- content/en/methods/page/Truncated.md | 16 +- .../page/_common/output-format-definition.md | 1 - content/en/methods/resource/Colors.md | 2 - content/en/methods/shortcode/Inner.md | 14 +- content/en/methods/shortcode/InnerDeindent.md | 4 +- content/en/methods/shortcode/Parent.md | 2 +- content/en/methods/site/Language.md | 25 +- content/en/methods/site/Taxonomies.md | 7 +- content/en/quick-reference/emojis.md | 79 ++-- content/en/render-hooks/passthrough.md | 2 +- content/en/render-hooks/tables.md | 12 +- content/en/templates/embedded.md | 2 +- content/en/templates/introduction.md | 6 +- content/en/troubleshooting/faq.md | 14 +- data/embedded_template_urls.toml | 1 + go.mod | 2 +- go.sum | 20 +- layouts/shortcodes/img.html | 381 ------------------ netlify.toml | 2 +- 128 files changed, 893 insertions(+), 925 deletions(-) create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/goland.svg create mode 100644 content/en/commands/hugo_build.md create mode 100644 content/en/functions/strings/TrimSpace.md create mode 100644 content/en/getting-started/configuration-build.md delete mode 100644 layouts/shortcodes/img.html diff --git a/.cspell.json b/.cspell.json index 01d248e25..6596a160c 100644 --- a/.cspell.json +++ b/.cspell.json @@ -85,6 +85,7 @@ "stringifier", "struct", "toclevels", + "unpublishdate", "zgotmplz", "# ----------------------------------------------------------------------", "# cspell: ignore foreign language words", @@ -129,6 +130,7 @@ "Samsa", "Stucki", "Thénardier", + "WASI", "# ----------------------------------------------------------------------", "# cspell: ignore operating systems and software packages", "# ----------------------------------------------------------------------", @@ -158,10 +160,12 @@ "achristie", "ddmaurier", "dring", + "fleqn", "inor", "jausten", "jdoe", "jsmith", + "leqno", "milli", "rgba", "rsmith", diff --git a/README.md b/README.md index 93eaaf02e..7550a93cd 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,10 @@ A fast and flexible static site generator built with love by [bep], [spf13], and [![Netlify Status](https://api.netlify.com/api/v1/badges/e0dbbfc7-34f1-4393-a679-c16e80162705/deploy-status)](https://app.netlify.com/sites/gohugoio/deploys) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://gohugo.io/contribute/documentation/) -This is the repository for the [Hugo](https://github.com/gohugoio/hugo) documentation site. +This is the repository for the [Hugo](https://github.com/gohugoio/hugo) documentation site. Please see the [contributing] section for guidelines, examples, and process. - - [bep]: https://github.com/bep [spf13]: https://github.com/spf13 [friends]: https://github.com/gohugoio/hugo/graphs/contributors diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_font-family.css b/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_font-family.css index 440b5efdd..85b3b6c95 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_font-family.css +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_font-family.css @@ -4,13 +4,7 @@ code, .code, pre code, .highlight pre { } .sans-serif { - font-family: 'Muli', - avenir, - 'helvetica neue', helvetica, - ubuntu, - roboto, noto, - 'segoe ui', arial, - sans-serif; + font-family: 'Muli', Avenir, 'Helvetica Neue', Helvetica, Roboto, Noto, 'Segoe UI', Arial, sans-serif; } diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/goland.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/goland.svg new file mode 100644 index 000000000..ff3bde8bf --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/goland.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css index 5e0b0c708..b9518491c 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/output/css/app.css @@ -5002,13 +5002,7 @@ code, .code, pre code, .highlight pre { font-family: 'inconsolata',Menlo,Monaco,'Courier New',monospace; } .sans-serif { - font-family: 'Muli', - avenir, - 'helvetica neue', helvetica, - ubuntu, - roboto, noto, - 'segoe ui', arial, - sans-serif; + font-family: 'Muli', Avenir, 'Helvetica Neue', Helvetica, Roboto, Noto, 'Segoe UI', Arial, sans-serif; } .serif { font-family: Palatino,"Palatino Linotype","Palatino LT STD","Book Antiqua",Georgia,serif; diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index 33d550449..ca02ecc6f 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -15,9 +15,9 @@ link_attr = "style='color: #ffffff; font-weight: bold; text-decoration: none; text-align: center'" [[banners]] - name = "Your Company?" - link = "https://bep.is/en/hugo-sponsor-2023-01/" - utm_campaign = "hugosponsor" - show_on_hover = true - bgcolor = "#4e4f4f" - link_attr = "style='color: #ffffff; font-weight: bold; text-decoration: none; text-align: center'" + name = "GoLand" + title = "The complete IDE crafted for professional Go developers." + no_query_params = true + link = "https://www.jetbrains.com/go/?utm_source=OSS&utm_medium=referral&utm_campaign=hugo" + logo = "images/sponsors/goland.svg" + bgcolor = "#f4f4f4" diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html index beb2d8619..6992881b6 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html @@ -106,9 +106,7 @@ + class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}"> {{ partial "hooks/after-body-start.html" . }} {{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }} {{ block "header" . }}{{ end }} 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 84033c42c..751ee8894 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 @@ -25,7 +25,7 @@ {{ $query_params := .query_params | default "" }} {{ $url := .link }} {{ if not .no_query_params }} - {{ $url = printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }} + {{ $url = printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" (.utm_medium | default "banner") "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }} {{ end }} {{ $logo := resources.Get .logo }} {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/math.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/math.html index b1eb5c8db..defcaa055 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/math.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/math.html @@ -2,15 +2,8 @@ diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html index 7451c15d6..243b22ccb 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html @@ -1,9 +1,3 @@ - - {{ partial "svg/twitter.svg" (dict "size" "32px") }} - }} +{{% note %}} +Note that the `Site` returned isn't fully built when invoked from the content adapters; if you try to call methods that depends on pages, e.g. `.Site.Pages`, you will get an error saying "this method cannot be called before the site is fully initialized". +{{% /note %}} + ###### Store Returns a persistent “scratch pad” to store and manipulate data. The main use case for this is to transfer values between executions when [EnableAllLanguages](#enablealllanguages) is set. See [examples](/methods/page/store/). diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index e96bc5af3..1132c888c 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -59,7 +59,7 @@ Create your content in [HTML] preceded by front matter. The content is typically ### Emacs Org Mode -Create your content in the [Emacs Org Mode] format preceded by front matter. You can use Org Mode keywords for front matter. See [details](/content-management/front-matter/#emacs-org-mode)). +Create your content in the [Emacs Org Mode] format preceded by front matter. You can use Org Mode keywords for front matter. See [details](/content-management/front-matter/#emacs-org-mode). ### AsciiDoc diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index 3ac2a63bc..5cbf645a5 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -39,7 +39,7 @@ weight = 10 author = 'John Smith' {{< /code-toggle >}} -Front matter fields may be [scalar], [arrays], or [maps] containing [boolean], [integer], [float], or [string] values. Note that the TOML format also supports date/time values using unquoted strings. +Front matter fields may be [boolean], [integer], [float], [string], [arrays], or [maps]. Note that the TOML format also supports unquoted date/time values. [scalar]: /getting-started/glossary/#scalar [arrays]: /getting-started/glossary/#array @@ -80,7 +80,8 @@ The field names below are reserved. For example, you cannot create a custom fiel ###### date -(`string`) The date associated with the page, typically the creation date. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`Date`] method on a `Page` object. +(`string`) The date associated with the page, typically the creation date. Note that the TOML format also supports unquoted date/time values. See the [dates](#dates) section for examples. Access this value from a template using the [`Date`] method on a `Page` object. + [`date`]: /methods/page/date/ @@ -99,7 +100,7 @@ If `true`, the page will not be rendered unless you pass the `--buildDrafts` fla ###### expiryDate -(`string`) The page expiration date. On or after the expiration date, the page will not be rendered unless you pass the `--buildExpired` flag to the `hugo` command. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`ExpiryDate`] method on a `Page` object. +(`string`) The page expiration date. On or after the expiration date, the page will not be rendered unless you pass the `--buildExpired` flag to the `hugo` command. Note that the TOML format also supports unquoted date/time values. See the [dates](#dates) section for examples. Access this value from a template using the [`ExpiryDate`] method on a `Page` object. [`expirydate`]: /methods/page/expirydate/ @@ -127,6 +128,7 @@ If `true`, the page will not be rendered unless you pass the `--buildDrafts` fla [`keywords`]: /methods/page/keywords/ [taxonomy]: /getting-started/glossary/#taxonomy +{{% comment %}} +{{% /comment %}} ###### lastmod -(`string`) The date that the page was last modified. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`Lastmod`] method on a `Page` object. +(`string`) The date that the page was last modified. Note that the TOML format also supports unquoted date/time values. See the [dates](#dates) section for examples. Access this value from a template using the [`Lastmod`] method on a `Page` object. [`lastmod`]: /methods/page/date/ @@ -167,21 +170,27 @@ lang ###### menus -(`string`,`string array`, or `map`) If set, Hugo adds the page to the given menu or menus. See the [menus] page for details. +(`string`, `string array`, or `map`) If set, Hugo adds the page to the given menu or menus. See the [menus] page for details. [menus]: /content-management/menus/#define-in-front-matter +###### modified + +Alias to [lastmod](#lastmod). + ###### outputs (`string array`) The [output formats] to render. [output formats]: /templates/output-formats/ +{{% comment %}} +{{% /comment %}} ###### params @@ -191,12 +200,20 @@ path [page parameters]: #parameters +###### pubdate + +Alias to [publishDate](#publishdate). + ###### publishDate -(`string`) The page publication date. Before the publication date, the page will not be rendered unless you pass the `--buildFuture` flag to the `hugo` command. Note that the TOML format also supports date/time values using unquoted strings. Access this value from a template using the [`PublishDate`] method on a `Page` object. +(`string`) The page publication date. Before the publication date, the page will not be rendered unless you pass the `--buildFuture` flag to the `hugo` command. Note that the TOML format also supports unquoted date/time values. See the [dates](#dates) section for examples. Access this value from a template using the [`PublishDate`] method on a `Page` object. [`publishdate`]: /methods/page/publishdate/ +###### published + +Alias to [publishDate](#publishdate). + ###### resources (`map array`) An array of maps to provide metadata for [page resources]. @@ -242,6 +259,10 @@ path [content type]: /getting-started/glossary/#content-type [`type`]: /methods/page/type/ +###### unpublishdate + +Alias to [expirydate](#expirydate). + ###### url (`string`) Overrides the entire URL path. Applicable to regular pages and section pages. See the [URL management] page for details. @@ -428,3 +449,15 @@ Note that you can also specify array elements on a single line: [content format]: /content-management/formats/ [emacs org mode]: https://orgmode.org/ + +## Dates + +When populating a date field, whether a [custom page parameter](#parameters) or one of the four predefined fields ([`date`](#date), [`expiryDate`](#expirydate), [`lastmod`](#lastmod), [`publishDate`](#publishdate)), use one of these parsable formats: + +{{% include "functions/time/_common/parsable-date-time-strings.md" %}} + +To override the default time zone, set the [`timeZone`](https://gohugo.io/getting-started/configuration/#timezone) in your site configuration. The order of precedence for determining the time zone is: + +1. The time zone offset in the date/time string +2. The time zone specified in your site configuration +3. The `Etc/UTC` time zone diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index db786361c..841f12863 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -205,8 +205,6 @@ Sometimes it can be useful to create the filter chain once and then reuse it. ### Colors -{{< new-in 0.104.0 >}} - `.Colors` returns a slice of hex strings with the dominant colors in the image using a simple histogram method. ```go-html-template diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index 169b6eb05..ff2011d3d 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -100,7 +100,7 @@ This front matter menu entry demonstrates some of the available properties: {{< code-toggle file=content/products/software.md fm=true >}} title = 'Software' -[[menus.main]] +[menus.main] parent = 'Products' weight = 20 pre = '' diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index b8ba80dfd..165b2402e 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -136,7 +136,7 @@ In the example above, all settings except `color` below `params` map to predefin ```go-html-template {{ site.Title }} -{{ site.LanguageCode }} +{{ site.Language.LanguageCode }} {{ site.Params.color }} ``` diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md index 847ba2bbb..8e345f2fb 100644 --- a/content/en/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -74,6 +74,26 @@ You can call shortcodes within other shortcodes by creating your own templates t Use these embedded shortcodes as needed. +### comment + +{{< new-in "0.137.1" >}} + +{{% note %}} +To override Hugo's embedded `comment` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory. + +[source code]: {{% eturl comment %}} +{{% /note %}} + +Use the `comment` shortcode to include comments in your Markdown. Hugo excludes the encapsulated text when rendering your site. + +Example usage: + +```text +{{%/* comment */%}} TODO: rewrite the paragraph below. {{%/* /comment */%}} +``` + +Although you can call this shortcode using the `{{}}` notation, computationally it is more efficient to call it using the `{{%/* */%}}` notation as shown above. + ### figure {{% note %}} diff --git a/content/en/content-management/summaries.md b/content/en/content-management/summaries.md index e0b2c9590..07c61d963 100644 --- a/content/en/content-management/summaries.md +++ b/content/en/content-management/summaries.md @@ -12,35 +12,34 @@ weight: 160 toc: true aliases: [/content/summaries/,/content-management/content-summaries/] --- - +{{% comment %}} +{{% /comment %}} -You can define a content summary manually, in front matter, or automatically. A manual content summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary. +You can define a summary manually, in front matter, or automatically. A manual summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary. Review the [comparison table](#comparison) below to understand the characteristics of each summary type. ## Manual summary -Use a `` divider to indicate the end of the content summary. Hugo will not render the summary divider itself. +Use a `` divider to indicate the end of the summary. Hugo will not render the summary divider itself. -{{< code file=content/sample.md >}} +{{< code file=content/example.md >}} +++ title: 'Example' date: 2024-05-26T09:10:33-07:00 +++ -Thénardier was not mistaken. The man was sitting there, and letting -Cosette get somewhat rested. +This is the first paragraph. -The inn-keeper walked round the brushwood and presented himself -abruptly to the eyes of those whom he was in search of. +This is the second paragraph. {{< /code >}} -When using the Emacs Org Mode [content format], use a `# more` divider to indicate the end of the content summary. +When using the Emacs Org Mode [content format], use a `# more` divider to indicate the end of the summary. [content format]: /content-management/formats/ @@ -48,46 +47,44 @@ When using the Emacs Org Mode [content format], use a `# more` divider to indica Use front matter to define a summary independent of content. -{{< code file=content/sample.md >}} +{{< code file=content/example.md >}} +++ title: 'Example' date: 2024-05-26T09:10:33-07:00 -summary: 'Learn more about _Les Misérables_ by Victor Hugo.' +summary: 'This summary is independent of the content.' +++ -Thénardier was not mistaken. The man was sitting there, and letting -Cosette get somewhat rested. The inn-keeper walked round the -brushwood and presented himself abruptly to the eyes of those whom -he was in search of. +This is the first paragraph. + +This is the second paragraph. {{< /code >}} ## Automatic summary -If you have not defined the summary manually or in front matter, Hugo automatically defines the summary based on the [`summaryLength`] in your site configuration. +If you do not define the summary manually or in front matter, Hugo automatically defines the summary based on the [`summaryLength`] in your site configuration. [`summaryLength`]: /getting-started/configuration/#summarylength -{{< code file=content/sample.md >}} +{{< code file=content/example.md >}} +++ title: 'Example' date: 2024-05-26T09:10:33-07:00 +++ -Thénardier was not mistaken. The man was sitting there, and letting -Cosette get somewhat rested. The inn-keeper walked round the -brushwood and presented himself abruptly to the eyes of those whom -he was in search of. +This is the first paragraph. + +This is the second paragraph. + +This is the third paragraph. {{< /code >}} -For example, with a `summaryLength` of 10, the automatic summary will be: +For example, with a `summaryLength` of 7, the automatic summary will be: -```text -Thénardier was not mistaken. The man was sitting there, and letting -Cosette get somewhat rested. +```html +

This is the first paragraph.

+

This is the second paragraph.

``` -Note that the `summaryLength` is an approximate number of words. - ## Comparison Each summary type has different characteristics: @@ -115,3 +112,18 @@ Render the summary in a template by calling the [`Summary`] method on a `Page` o {{ end }} ``` + +## Alternative + +Instead of calling the `Summary` method on a `Page` object, use the [`strings.Truncate`] function for granular control of the summary length. For example: + +[`strings.Truncate`]: /functions/strings/truncate/ + +```go-html-template +{{ range site.RegularPages }} +

{{ .LinkTitle }}

+
+ {{ .Content | strings.Truncate 42 }} +
+{{ end }} +``` diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index e3370f956..0f1d93c63 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -43,11 +43,45 @@ https://example.org/posts/my-first-post/ Set the `url` in front matter to override the entire path. Use this with either regular pages or section pages. +{{% note %}} +Hugo does not sanitize the `url` front matter field, allowing you to generate: + +- File paths that contain characters reserved by the operating system. For example, file paths on Windows may not contain any of these [reserved characters]. Hugo throws an error if a file path includes a character reserved by the current operating system. +- URLs that contain disallowed characters. For example, the less than sign (`<`) is not allowed in a URL. + +[reserved characters]: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions +{{% /note %}} + +If you set both `slug` and `url` in front matter, the `url` value takes precedence. + +#### Include a colon + +{{< new-in 0.136.0 >}} + +If you need to include a colon in the `url` front matter field, escape it with backslash characters. Use one backslash if you wrap the string within single quotes, or use two backslashes if you wrap the string within double quotes. With YAML front matter, use a single backslash if you omit quotation marks. + +For example, with this front matter: + +{{< code-toggle file=content/example.md fm=true >}} +title: Example +url: "my\\:example" +{{< /code-toggle >}} + +The resulting URL will be: + +```text +https://example.org/my:example/ +``` + +As described above, this will fail on Windows because the colon (`:`) is a reserved character. + +#### File extensions + With this front matter: {{< code-toggle file=content/posts/post-1.md fm=true >}} title = 'My First Article' -url = '/articles/my-first-article' +url = 'articles/my-first-article' {{< /code-toggle >}} The resulting URL will be: @@ -60,7 +94,7 @@ If you include a file extension: {{< code-toggle file=content/posts/post-1.md fm=true >}} title = 'My First Article' -url = '/articles/my-first-article.html' +url = 'articles/my-first-article.html' {{< /code-toggle >}} The resulting URL will be: @@ -69,12 +103,11 @@ The resulting URL will be: https://example.org/articles/my-first-article.html ``` -In a monolingual site, a `url` value with or without a leading slash is relative to the `baseURL`. +#### Leading slashes -In a multilingual site: +With monolingual sites, `url` values with or without a leading slash are relative to the [`baseURL`]. With multilingual sites, `url` values with a leading slash are relative to the `baseURL`, and `url` values without a leading slash are relative to the `baseURL` plus the language prefix. -- A `url` value with a leading slash is relative to the `baseURL`. -- A `url` value without a leading slash is relative to the `baseURL` plus the language prefix. +[`baseURL`]: /getting-started/configuration/#baseurl Site type|Front matter `url`|Resulting URL :--|:--|:-- @@ -83,13 +116,11 @@ monolingual|`about`|`https://example.org/about/` multilingual|`/about`|`https://example.org/about/` multilingual|`about`|`https://example.org/de/about/` -If you set both `slug` and `url` in front matter, the `url` value takes precedence. - #### Permalinks tokens in front matter {{< new-in "0.131.0" >}} -You can also use [Permalinks tokens](#tokens) in the `url` front matter. This is typically used in `cascade` sections: +You can also use [tokens](#tokens) when setting the `url` value. This is typically used in `cascade` sections: {{< code-toggle file=content/foo/bar/_index.md fm=true >}} title ="Bar" @@ -246,9 +277,7 @@ public/ #### Tokens -Use these tokens when defining the URL pattern. These can both be used in the `permalinks` configuration and in the front matter [url](#permalinks-tokens-in-front-matter). - -`:filename` +Use these tokens when defining the URL pattern. You can also use these tokens when setting the [`url`](#permalinks-tokens-in-front-matter) value in front matter. `:year` : The 4-digit year as defined in the front matter `date` field. @@ -313,6 +342,14 @@ By default, Hugo produces pretty URLs. To generate ugly URLs, change your site c uglyURLs = true {{< /code-toggle >}} +You can also enable uglyURLs by section. For example, with a site that contains sections for books and films: + +{{< code-toggle file=hugo >}} +[uglyURLs] +books = true +films = false +{{< /code-toggle >}} + ### Post-processing Hugo provides two mutually exclusive configuration options to alter URLs _after_ it renders a page. diff --git a/content/en/contribute/development.md b/content/en/contribute/development.md index e4b183e93..1680d4a46 100644 --- a/content/en/contribute/development.md +++ b/content/en/contribute/development.md @@ -45,7 +45,7 @@ For a complete guide to contributing to Hugo, see the [Contribution Guide]. ## Prerequisites -To build the extended edition of Hugo from source you must: +To build the extended or extended/deploy edition from source you must: 1. Install [Git] 1. Install [Go] version 1.23.0 or later @@ -97,12 +97,26 @@ Step 4 : Make changes. Step 5 -: Compile and install: +: Compile and install. + +To compile and install the standard edition: + +```text +go install +``` + +To compile and install the extended edition: ```text CGO_ENABLED=1 go install -tags extended ``` +To compile and install the extended/deploy edition: + +```text +CGO_ENABLED=1 go install -tags extended,withdeploy +``` + Step 6 : Test your changes: @@ -158,7 +172,7 @@ CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest To build and install a specific release: ```sh -CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.128.0 +CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.137.1 ``` To build and install at the latest commit on the master branch: diff --git a/content/en/contribute/documentation.md b/content/en/contribute/documentation.md index 408ed505d..580d0b0e2 100644 --- a/content/en/contribute/documentation.md +++ b/content/en/contribute/documentation.md @@ -85,6 +85,24 @@ Yes → Hugo is fast. "It's an adverb, Sam. It's a lazy tool of a weak mind." (Outbreak, 1995). {{% /note %}} +#### Level 6 headings + +Level 6 headings are styled as `dt` elements. This was implemented to support a [glossary] with linkable terms. + +[glossary]: /getting-started/glossary/ + +#### Function and method descriptions + +When adding a page to the [functions] or [methods] section, begin the description with the word "Returns". With functions and methods that return a boolean value, begin the description with the phrase "Reports whether". + +For example: + +- `Returns the URL aliases as defined in front matter.` +- `Reports whether the given page is in the given section.` + +[functions]: /functions +[methods]: /methods + #### Miscellaneous Other guidelines to consider: @@ -97,12 +115,6 @@ Other guidelines to consider: - When including code samples, use short snippets that demonstrate the concept. - The Hugo user community is global; use [basic english](https://simple.wikipedia.org/wiki/Basic_English) when possible. -#### Level 6 headings - -Level 6 headings are styled as `dt` elements. This was implemented to support a [glossary] with linkable terms. - -[glossary]: /getting-started/glossary/ - ## Code examples Indent code by two spaces. With examples of template code, include a space after opening action delimiters, and include a space before closing action delimiters. diff --git a/content/en/functions/compare/Conditional.md b/content/en/functions/compare/Conditional.md index 6d693770d..997b71e94 100644 --- a/content/en/functions/compare/Conditional.md +++ b/content/en/functions/compare/Conditional.md @@ -12,26 +12,17 @@ action: aliases: [/functions/cond] --- -The CONTROL argument is a boolean value that indicates whether the function should return ARG1 or ARG2. If CONTROL is `true`, the function returns ARG1. Otherwise, the function returns ARG2. +If CONTROL is truthy the function returns ARG1, otherwise it returns ARG2. ```go-html-template {{ $qty := 42 }} {{ cond (le $qty 3) "few" "many" }} → many ``` -The CONTROL argument must be either `true` or `false`. To cast a non-boolean value to boolean, pass it through the `not` operator twice. - -```go-html-template -{{ cond (42 | not | not) "truthy" "falsy" }} → truthy -{{ cond ("" | not | not) "truthy" "falsy" }} → falsy -``` - -{{% note %}} -Unlike [ternary operators] in other languages, the `cond` function does not perform [short-circuit evaluation]. The function evaluates both ARG1 and ARG2, regardless of the CONTROL value. +Unlike [ternary operators] in other languages, the `compare.Conditional` function does not perform [short-circuit evaluation]. It evaluates both ARG1 and ARG2 regardless of the CONTROL value. [short-circuit evaluation]: https://en.wikipedia.org/wiki/Short-circuit_evaluation [ternary operators]: https://en.wikipedia.org/wiki/Ternary_conditional_operator -{{% /note %}} Due to the absence of short-circuit evaluation, these examples throw an error: diff --git a/content/en/functions/css/Sass.md b/content/en/functions/css/Sass.md index ef1572ae0..328037bb9 100644 --- a/content/en/functions/css/Sass.md +++ b/content/en/functions/css/Sass.md @@ -32,7 +32,7 @@ toc: true {{ end }} ``` -Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended edition, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language. +Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended and extended/deploy editions, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language. Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both. @@ -42,7 +42,7 @@ Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both. ## Options transpiler -: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended edition includes the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass) below. +: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended and extended/deploy editions include the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass) below. targetPath : (`string`) If not set, the transformed resource's target path will be the original path of the asset file with its extension replaced by `.css`. @@ -141,8 +141,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file ```yaml variables: - HUGO_VERSION: 0.128.0 - DART_SASS_VERSION: 1.77.5 + HUGO_VERSION: 0.137.1 + DART_SASS_VERSION: 1.80.6 GIT_DEPTH: 0 GIT_STRATEGY: clone GIT_SUBMODULE_STRATEGY: recursive @@ -175,8 +175,8 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should ```toml [build.environment] -HUGO_VERSION = "0.128.0" -DART_SASS_VERSION = "1.77.5" +HUGO_VERSION = "0.137.1" +DART_SASS_VERSION = "1.80.6" TZ = "America/Los_Angeles" [build] diff --git a/content/en/functions/css/TailwindCSS.md b/content/en/functions/css/TailwindCSS.md index 143616453..828ac9051 100644 --- a/content/en/functions/css/TailwindCSS.md +++ b/content/en/functions/css/TailwindCSS.md @@ -16,7 +16,7 @@ toc: true {{< new-in 0.128.0 >}} - +{{% todo %}}remove this admonition when feature is stable.{{% /todo %}} {{% note %}} This is an experimental feature pending the release of TailwindCSS v4.0. @@ -31,9 +31,10 @@ To use this function you must install the Tailwind CSS CLI v4.0 or later. You ma [Tailwind CSS documentation]: https://tailwindcss.com/docs/installation {{% note %}} -Use npm to install the CLI prior to the v4.0 release of Tailwind CSS. +Prior to the release of Tailwind CSS v4.0 you must install [v4.0.0-alpha.26](https://github.com/tailwindlabs/tailwindcss/releases/tag/v4.0.0-alpha.26) or later. `npm install --save-dev tailwindcss@next @tailwindcss/cli@next` + {{% /note %}} ## Options @@ -54,7 +55,7 @@ skipInlineImportsNotFound Define a [cache buster] in your site configuration: -[cache buster]: /getting-started/configuration/#configure-cache-busters +[cache buster]: /getting-started/configuration-build/#configure-cache-busters {{< code-toggle file=hugo >}} [[build.cachebusters]] diff --git a/content/en/functions/hugo/Generator.md b/content/en/functions/hugo/Generator.md index 5538903ed..f8d20559b 100644 --- a/content/en/functions/hugo/Generator.md +++ b/content/en/functions/hugo/Generator.md @@ -11,5 +11,5 @@ action: --- ```go-html-template -{{ hugo.Generator }} → +{{ hugo.Generator }} → ``` diff --git a/content/en/functions/hugo/Version.md b/content/en/functions/hugo/Version.md index 988e8ad88..c1aee8e3f 100644 --- a/content/en/functions/hugo/Version.md +++ b/content/en/functions/hugo/Version.md @@ -11,5 +11,5 @@ action: --- ```go-html-template -{{ hugo.Version }} → 0.128.0 +{{ hugo.Version }} → 0.137.1 ``` diff --git a/content/en/functions/resources/Babel.md b/content/en/functions/resources/Babel.md index b2b51ae97..3e98ba3fe 100644 --- a/content/en/functions/resources/Babel.md +++ b/content/en/functions/resources/Babel.md @@ -15,9 +15,9 @@ expiryDate: 2025-06-24 # deprecated 2024-06-24 --- {{% deprecated-in 0.128.0 %}} -Use [js.Babel] instead. +Use [`js.Babel`] instead. -[js.Babel]: /functions/js/babel/ +[`js.Babel`]: /functions/js/babel/ {{% /deprecated-in %}} ```go-html-template diff --git a/content/en/functions/resources/FromString.md b/content/en/functions/resources/FromString.md index 8801de6e4..be30367db 100644 --- a/content/en/functions/resources/FromString.md +++ b/content/en/functions/resources/FromString.md @@ -24,7 +24,7 @@ Let's say you need to publish a file named "site.json" in the root of your publi ```json { "build_date": "2024-02-19T12:27:05-08:00", - "hugo_version": "0.128.0", + "hugo_version": "0.137.1", "last_modified": "2024-02-19T12:01:42-08:00" } ``` diff --git a/content/en/functions/resources/GetRemote.md b/content/en/functions/resources/GetRemote.md index 556bfbeca..2179415dd 100644 --- a/content/en/functions/resources/GetRemote.md +++ b/content/en/functions/resources/GetRemote.md @@ -102,6 +102,10 @@ The [`Err`] method on a resource returned by the `resources.GetRemote` function [`Err`]: /methods/resource/err/ +{{% note %}} +Hugo does not classify an HTTP response with status code 404 as an error. In this case the function returns nil. +{{% /note %}} + ```go-html-template {{ $url := "https://broken-example.org/images/a.jpg" }} {{ with resources.GetRemote $url }} diff --git a/content/en/functions/resources/PostCSS.md b/content/en/functions/resources/PostCSS.md index f495b16fe..2389d2ff5 100644 --- a/content/en/functions/resources/PostCSS.md +++ b/content/en/functions/resources/PostCSS.md @@ -16,9 +16,9 @@ expiryDate: 2025-06-24 # deprecated 2024-06-24 --- {{% deprecated-in 0.128.0 %}} -Use [css.PostCSS] instead. +Use [`css.PostCSS`] instead. -[css.PostCSS]: /functions/css/postcss/ +[`css.PostCSS`]: /functions/css/postcss/ {{% /deprecated-in %}} ```go-html-template diff --git a/content/en/functions/resources/ToCSS.md b/content/en/functions/resources/ToCSS.md index bd98dab19..5db634f93 100644 --- a/content/en/functions/resources/ToCSS.md +++ b/content/en/functions/resources/ToCSS.md @@ -16,9 +16,9 @@ expiryDate: 2025-06-24 # deprecated 2024-06-24 --- {{% deprecated-in 0.128.0 %}} -Use [css.Sass] instead. +Use [`css.Sass`] instead. -[css.Sass]: /functions/css/sass/ +[`css.Sass`]: /functions/css/sass/ {{% /deprecated-in %}} ```go-html-template @@ -36,7 +36,7 @@ Use [css.Sass] instead. {{ end }} ``` -Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended edition, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language. +Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended and extended/deploy editions, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language. Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both. @@ -46,7 +46,7 @@ Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both. ## Options transpiler -: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended edition includes the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass) below. +: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended and extended/deploy editions include the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass) below. targetPath : (`string`) If not set, the transformed resource's target path will be the original path of the asset file with its extension replaced by `.css`. @@ -145,8 +145,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file ```yaml variables: - HUGO_VERSION: 0.128.0 - DART_SASS_VERSION: 1.77.5 + HUGO_VERSION: 0.137.1 + DART_SASS_VERSION: 1.80.6 GIT_DEPTH: 0 GIT_STRATEGY: clone GIT_SUBMODULE_STRATEGY: recursive @@ -179,8 +179,8 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should ```toml [build.environment] -HUGO_VERSION = "0.128.0" -DART_SASS_VERSION = "1.77.5" +HUGO_VERSION = "0.137.1" +DART_SASS_VERSION = "1.80.6" TZ = "America/Los_Angeles" [build] diff --git a/content/en/functions/strings/Chomp.md b/content/en/functions/strings/Chomp.md index 349f1e9b7..8024758ba 100644 --- a/content/en/functions/strings/Chomp.md +++ b/content/en/functions/strings/Chomp.md @@ -7,6 +7,7 @@ action: aliases: [chomp] related: - functions/strings/Trim + - functions/strings/TrimSpace - functions/strings/TrimLeft - functions/strings/TrimPrefix - functions/strings/TrimRight @@ -19,9 +20,9 @@ aliases: [/functions/chomp] If the argument is of type `template.HTML`, returns `template.HTML`, else returns a `string`. ```go-html-template -{{ chomp | "foo\n" }} → foo -{{ chomp | "foo\n\n" }} → foo +{{ chomp "foo\n" }} → foo +{{ chomp "foo\n\n" }} → foo -{{ chomp | "foo\r\n" }} → foo -{{ chomp | "foo\r\n\r\n" }} → foo +{{ chomp "foo\r\n" }} → foo +{{ chomp "foo\r\n\r\n" }} → foo ``` diff --git a/content/en/functions/strings/ContainsNonSpace.md b/content/en/functions/strings/ContainsNonSpace.md index d4c72eea0..81e11a5ba 100644 --- a/content/en/functions/strings/ContainsNonSpace.md +++ b/content/en/functions/strings/ContainsNonSpace.md @@ -1,6 +1,6 @@ --- title: strings.ContainsNonSpace -description: Reports whether the given string contains any non-space characters as defined by Unicode's White Space property. +description: Reports whether the given string contains any non-space characters as defined by Unicode. categories: [] keywords: [] action: @@ -18,18 +18,12 @@ aliases: [/functions/strings.containsnonspace] {{< new-in 0.111.0 >}} +Whitespace characters include `\t`, `\n`, `\v`, `\f`, `\r`, and characters in the [Unicode Space Separator] category. + +[Unicode Space Separator]: https://www.compart.com/en/unicode/category/Zs + ```go-html-template {{ strings.ContainsNonSpace "\n" }} → false {{ strings.ContainsNonSpace " " }} → false {{ strings.ContainsNonSpace "\n abc" }} → true ``` - -Common whitespace characters include: - -```text -'\t', '\n', '\v', '\f', '\r', ' ' -``` - -See the [Unicode Character Database] for a complete list. - -[Unicode Character Database]: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt diff --git a/content/en/functions/strings/Trim.md b/content/en/functions/strings/Trim.md index 9a87ff206..a8c4cf92d 100644 --- a/content/en/functions/strings/Trim.md +++ b/content/en/functions/strings/Trim.md @@ -7,6 +7,7 @@ action: aliases: [trim] related: - functions/strings/Chomp + - functions/strings/TrimSpace - functions/strings/TrimLeft - functions/strings/TrimPrefix - functions/strings/TrimRight @@ -19,41 +20,3 @@ aliases: [/functions/trim] ```go-html-template {{ trim "++foo--" "+-" }} → foo ``` - -To remove leading and trailing newline characters and carriage returns: - -```go-html-template -{{ trim "\nfoo\n" "\n\r" }} → foo -{{ trim "\n\nfoo\n\n" "\n\r" }} → foo - -{{ trim "\r\nfoo\r\n" "\n\r" }} → foo -{{ trim "\r\n\r\nfoo\r\n\r\n" "\n\r" }} → foo -``` - -The `strings.Trim` function is commonly used in shortcodes to remove leading and trailing newlines characters and carriage returns from the content within the opening and closing shortcode tags. - -For example, with this Markdown: - -```text -{{}} -Able was I ere I saw Elba. -{{}} -``` - -The value of `.Inner` in the shortcode template is: - -```text -\nAble was I ere I saw Elba.\n -``` - -If authored on a Windows system the value of `.Inner` might, depending on the editor configuration, be: - -```text -\r\nAble was I ere I saw Elba.\r\n -``` - -This construct is common in shortcode templates: - -```go-html-template -{{ trim .Inner "\n\r" }} -``` diff --git a/content/en/functions/strings/TrimLeft.md b/content/en/functions/strings/TrimLeft.md index 07cdf0064..d94aa05a3 100644 --- a/content/en/functions/strings/TrimLeft.md +++ b/content/en/functions/strings/TrimLeft.md @@ -8,6 +8,7 @@ action: related: - functions/strings/Chomp - functions/strings/Trim + - functions/strings/TrimSpace - functions/strings/TrimPrefix - functions/strings/TrimRight - functions/strings/TrimSuffix diff --git a/content/en/functions/strings/TrimPrefix.md b/content/en/functions/strings/TrimPrefix.md index 917cf06f5..331c52a03 100644 --- a/content/en/functions/strings/TrimPrefix.md +++ b/content/en/functions/strings/TrimPrefix.md @@ -8,6 +8,7 @@ action: related: - functions/strings/Chomp - functions/strings/Trim + - functions/strings/TrimSpace - functions/strings/TrimLeft - functions/strings/TrimRight - functions/strings/TrimSuffix diff --git a/content/en/functions/strings/TrimRight.md b/content/en/functions/strings/TrimRight.md index b244925ef..f36597d3d 100644 --- a/content/en/functions/strings/TrimRight.md +++ b/content/en/functions/strings/TrimRight.md @@ -8,6 +8,7 @@ action: related: - functions/strings/Chomp - functions/strings/Trim + - functions/strings/TrimSpace - functions/strings/TrimLeft - functions/strings/TrimPrefix - functions/strings/TrimSuffix diff --git a/content/en/functions/strings/TrimSpace.md b/content/en/functions/strings/TrimSpace.md new file mode 100644 index 000000000..eef4e8121 --- /dev/null +++ b/content/en/functions/strings/TrimSpace.md @@ -0,0 +1,26 @@ +--- +title: strings.TrimSpace +description: Returns the given string, removing leading and trailing whitespace as defined by Unicode. +categories: [] +keywords: [] +action: + related: + - functions/strings/Chomp + - functions/strings/Trim + - functions/strings/TrimLeft + - functions/strings/TrimPrefix + - functions/strings/TrimRight + - functions/strings/TrimSuffix + returnType: string + signatures: [strings.TrimSpace INPUT] +--- + +{{< new-in 0.136.3 >}} + +Whitespace characters include `\t`, `\n`, `\v`, `\f`, `\r`, and characters in the [Unicode Space Separator] category. + +[Unicode Space Separator]: https://www.compart.com/en/unicode/category/Zs + +```go-html-template +{{ strings.TrimSpace "\n\r\t foo \n\r\t" }} → foo +``` diff --git a/content/en/functions/strings/TrimSuffix.md b/content/en/functions/strings/TrimSuffix.md index 704bbd2d2..d612ae695 100644 --- a/content/en/functions/strings/TrimSuffix.md +++ b/content/en/functions/strings/TrimSuffix.md @@ -8,6 +8,7 @@ action: related: - functions/strings/Chomp - functions/strings/Trim + - functions/strings/TrimSpace - functions/strings/TrimLeft - functions/strings/TrimPrefix - functions/strings/TrimRight diff --git a/content/en/functions/time/AsTime.md b/content/en/functions/time/AsTime.md index 23e5304a5..70b2bd1f3 100644 --- a/content/en/functions/time/AsTime.md +++ b/content/en/functions/time/AsTime.md @@ -21,41 +21,34 @@ toc: true Hugo provides [functions] and [methods] to format, localize, parse, compare, and manipulate date/time values. Before you can do any of these with string representations of date/time values, you must first convert them to [`time.Time`] values using the `time.AsTime` function. ```go-html-template -{{ $t := "2023-10-15T14:20:28-07:00" }} -{{ time.AsTime $t }} → 2023-10-15 14:20:28 -0700 PDT (time.Time) +{{ $t := "2023-10-15T13:18:50-07:00" }} +{{ time.AsTime $t }} → 2023-10-15 13:18:50 -0700 PDT (time.Time) ``` ## Parsable strings -As shown above, the first argument must be a *parsable* string representation of a date/time value. For example: +As shown above, the first argument must be a parsable string representation of a date/time value. For example: {{% include "functions/time/_common/parsable-date-time-strings.md" %}} -## Time zones +To override the default time zone, set the [`timeZone`] in your site configuration or provide a second argument to the `time.AsTime` function. For example: -When the parsable string does not contain a time zone offset, you can do either of the following to assign a time zone other than Etc/UTC: +```go-html-template +{{ time.AsTime "15 Oct 2023" "America/Los_Angeles" }} +``` -- Provide a second argument to the `time.AsTime` function - - ```go-html-template - {{ time.AsTime "15 Oct 2023" "America/Chicago" }} - ``` - -- Set the default time zone in your site configuration - - {{< code-toggle file=hugo >}} - timeZone = 'America/New_York' - {{< /code-toggle >}} +The list of valid time zones may be system dependent, but should include `UTC`, `Local`, or any location in the [IANA Time Zone database]. The order of precedence for determining the time zone is: 1. The time zone offset in the date/time string -2. The time zone provide as the second argument to the `time.AsTime` function +2. The time zone provided as the second argument to the `time.AsTime` function 3. The time zone specified in your site configuration +4. The `Etc/UTC` time zone -The list of valid time zones may be system dependent, but should include `UTC`, `Local`, or any location in the [IANA Time Zone database]. +[IANA Time Zone database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones [`time.Time`]: https://pkg.go.dev/time#Time +[`timeZone`]: https://gohugo.io/getting-started/configuration/#timezone [functions]: /functions/time/ -[iana time zone database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones [methods]: /methods/time/ diff --git a/content/en/functions/time/Format.md b/content/en/functions/time/Format.md index 74384959b..b9db6905b 100644 --- a/content/en/functions/time/Format.md +++ b/content/en/functions/time/Format.md @@ -19,21 +19,29 @@ toc: true Use the `time.Format` function with `time.Time` values: ```go-html-template -{{ $t := time.AsTime "2023-02-27T23:44:58-08:00" }} -{{ time.Format "2 Jan 2006" $t }} → 27 Feb 2023 +{{ $t := time.AsTime "2023-10-15T13:18:50-07:00" }} +{{ time.Format "2 Jan 2006" $t }} → 15 Oct 2023 ``` -Or use `time.Format` with a *parsable* string representation of a date/time value: +Or use `time.Format` with a parsable string representation of a date/time value: ```go-html-template -{{ $t := "27 Feb 2023" }} -{{ time.Format "January 2, 2006" $t }} → February 27, 2023 +{{ $t := "15 Oct 2023" }} +{{ time.Format "January 2, 2006" $t }} → October 15, 2023 ``` Examples of parsable string representations: {{% include "functions/time/_common/parsable-date-time-strings.md" %}} +To override the default time zone, set the [`timeZone`] in your site configuration. The order of precedence for determining the time zone is: + +1. The time zone offset in the date/time string +2. The time zone specified in your site configuration +3. The `Etc/UTC` time zone + +[`timeZone`]: https://gohugo.io/getting-started/configuration/#timezone + ## Layout string {{% include "functions/_common/time-layout-string.md" %}} diff --git a/content/en/functions/time/_common/parsable-date-time-strings.md b/content/en/functions/time/_common/parsable-date-time-strings.md index a38b9983e..6d1633a6f 100644 --- a/content/en/functions/time/_common/parsable-date-time-strings.md +++ b/content/en/functions/time/_common/parsable-date-time-strings.md @@ -2,13 +2,13 @@ # Do not remove front matter. --- -String representation|Time zone +Format|Time zone :--|:-- -2023-10-15T14:20:28-07:00|America/Los_Angeles -2023-10-15T13:18:50-0700|America/Los_Angeles -2023-10-15T13:18:50Z|Etc/UTC -2023-10-15T13:18:50|Etc/UTC -2023-10-15|Etc/UTC -15 Oct 2023|Etc/UTC +`2023-10-15T13:18:50-07:00`|`America/Los_Angeles` +`2023-10-15T13:18:50-0700`|`America/Los_Angeles` +`2023-10-15T13:18:50Z`|`Etc/UTC` +`2023-10-15T13:18:50`|Default is `Etc/UTC` +`2023-10-15`|Default is `Etc/UTC` +`15 Oct 2023`|Default is `Etc/UTC` -The last four examples are not fully qualified. Without a time zone offset, the time zone is set to Etc/UTC (Coordinated Universal Time). +The last three examples are not fully qualified, and default to the `Etc/UTC` time zone. diff --git a/content/en/functions/transform/ToMath.md b/content/en/functions/transform/ToMath.md index db93a7382..bbdc7b289 100644 --- a/content/en/functions/transform/ToMath.md +++ b/content/en/functions/transform/ToMath.md @@ -2,7 +2,7 @@ title: transform.ToMath description: Renders a math expression using KaTeX. categories: [] -keywords: [] +keywords: [math,katex] action: aliases: [] related: @@ -36,7 +36,7 @@ These are a subset of the [KaTeX options]. output : (`string`). Determines the markup language of the output. One of `html`, `mathml`, or `htmlAndMathml`. Default is `mathml`. - + {{% comment %}}Indent to prevent splitting the description list.{{% / comment %}} With `html` and `htmlAndMathml` you must include KaTeX CSS within the `head` element of your base template. For example: @@ -94,7 +94,7 @@ There are 3 ways to handle errors from KaTeX: 1. Let KaTeX throw an error and make the build fail. This is the default behavior. 1. Handle the error in your template. See the render hook example below. -1. Set the `throwOnError` option to `false` to make KaTeX render the expression as an error instead of throwing an error. See [options]. +1. Set the `throwOnError` option to `false` to make KaTeX render the expression as an error instead of throwing an error. See [options](#options). {{< code file=layouts/_default/_markup/render-passthrough-inline.html copy=true >}} {{ with transform.ToMath .Inner }} diff --git a/content/en/getting-started/configuration-build.md b/content/en/getting-started/configuration-build.md new file mode 100644 index 000000000..cc64b51d7 --- /dev/null +++ b/content/en/getting-started/configuration-build.md @@ -0,0 +1,88 @@ +--- +title: Configure build +description: Configure global build options. +categories: [getting started,fundamentals] +keywords: [build,buildStats,cache] +menu: + docs: + parent: getting-started + weight: 60 +weight: 60 +slug: configuration-build +toc: true +--- + +The `build` configuration section contains global build-related configuration options. + +{{< code-toggle config=build />}} + +#### buildStats + +See [Configure buildStats](#configure-build-stats). + +#### cachebusters + +See [Configure Cache Busters](#configure-cache-busters). + +#### noJSConfigInAssets + +(`bool`) If `true`, turns off writing a `jsconfig.json` into your `/assets` folder with mapping of imports from running [js.Build](/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written. + +#### useResourceCacheWhen + +(`string`) When to use the cached resources in `/resources/_gen` for PostCSS and ToCSS. Valid values are `never`, `always` and `fallback`. The last value means that the cache will be tried if PostCSS/extended version is not available. + + +## Configure cache busters + +{{< new-in 0.112.0 >}} + +The `build.cachebusters` configuration option was added to support development using Tailwind 3.x's JIT compiler where a `build` configuration may look like this: + +{{< code-toggle file=hugo >}} +[build] + [build.buildStats] + enable = true + [[build.cachebusters]] + source = "assets/watching/hugo_stats\\.json" + target = "styles\\.css" + [[build.cachebusters]] + source = "(postcss|tailwind)\\.config\\.js" + target = "css" + [[build.cachebusters]] + source = "assets/.*\\.(js|ts|jsx|tsx)" + target = "js" + [[build.cachebusters]] + source = "assets/.*\\.(.*)$" + target = "$1" +{{< /code-toggle >}} + +When `buildStats` {{< new-in 0.115.1 >}} is enabled, Hugo writes a `hugo_stats.json` file on each build with HTML classes etc. that's used in the rendered output. Changes to this file will trigger a rebuild of the `styles.css` file. You also need to add `hugo_stats.json` to Hugo's server watcher. See [Hugo Starter Tailwind Basic](https://github.com/bep/hugo-starter-tailwind-basic) for a running example. + +source +: A regexp matching file(s) relative to one of the virtual component directories in Hugo, typically `assets/...`. + +target +: A regexp matching the keys in the resource cache that should be expired when `source` changes. You can use the matching regexp groups from `source` in the expression, e.g. `$1`. + +## Configure build stats + +{{< code-toggle config=build.buildStats />}} + +{{< new-in 0.115.1 >}} + +If `enable` is set to `true`, creates a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking. + +[removing unused CSS]: /hugo-pipes/postprocess/#css-purging-with-postcss + +Exclude `class` attributes, `id` attributes, or tags from `hugo_stats.json` with the `disableClasses`, `disableIDs`, and `disableTags` keys. + +{{% note %}} +Given that CSS purging is typically limited to production builds, place the `buildStats` object below [config/production]. + +[config/production]: /getting-started/configuration/#configuration-directory + +Built for speed, there may be "false positive" detections (e.g., HTML elements that are not HTML elements) while parsing the published site. These "false positives" are infrequent and inconsequential. +{{% /note %}} + +Due to the nature of partial server builds, new HTML entities are added while the server is running, but old values will not be removed until you restart the server or run a regular `hugo` build. \ No newline at end of file diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md index 0046ff1ed..bcc997519 100644 --- a/content/en/getting-started/configuration-markup.md +++ b/content/en/getting-started/configuration-markup.md @@ -238,7 +238,7 @@ This is the default configuration for the AsciiDoc renderer: ###### attributes -(`map`) A map of key-value pairs, each a document attributes. See Asciidoctor’s [attributes]. +(`map`) A map of key-value pairs, each a document attribute. See Asciidoctor’s [attributes]. [attributes]: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index b0a6cae66..342804a72 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -228,6 +228,10 @@ See [Configure Build](#configure-build). See [Configure File Caches](#configure-file-caches). +###### canonifyURLs + +(`bool`) See [details](/content-management/urls/#canonical-urls) before enabling this feature. Default is `false`. + ###### capitalizeListTitles {{< new-in 0.123.3 >}} @@ -246,10 +250,6 @@ For a website in a single language, define the `[[cascade]]` in [Front Matter](/ To remain consistent and prevent unexpected behavior, do not mix these strategies. {{% /note %}} -###### canonifyURLs - -(`bool`) See [details](/content-management/urls/#canonical-urls) before enabling this feature. Default is `false`. - ###### cleanDestinationDir (`bool`) When building, removes files from destination not found in static directories. Default is `false`. @@ -288,6 +288,10 @@ To remain consistent and prevent unexpected behavior, do not mix these strategie [kinds]: /getting-started/glossary/#page-kind +###### disableLanguages + +See [disable a language](/content-management/multilingual/#disable-a-language). + ###### disableLiveReload (`bool`) Disable automatic live reloading of browser window. Default is `false`. @@ -312,6 +316,9 @@ To remain consistent and prevent unexpected behavior, do not mix these strategie (`bool`) Enable generation of `robots.txt` file. Default is `false`. +###### environment + +(`string`) Build environment. Default is `production` when running `hugo` and `development` when running `hugo server`. See [Configuration directory](https://gohugo.io/getting-started/configuration/#configuration-directory). ###### frontmatter See [Front matter Configuration](#configure-front-matter). @@ -320,6 +327,22 @@ See [Front matter Configuration](#configure-front-matter). (`bool`) If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages. Default is `false`. +###### ignoreCache + +(`bool`) Ignore the cache directory. Default is `false`. + +###### ignoreLogs +(`string slice`) A slice of message identifiers corresponding to warnings and errors you wish to suppress. See [`erroridf`] and [`warnidf`]. + +[`erroridf`]: /functions/fmt/erroridf/ +[`warnidf`]: /functions/fmt/warnidf/ + +###### ignoreVendorPaths + +(`string`) Ignore vendored modules that match the given [Glob] pattern within the `_vendor` directory. + +[Glob]: https://github.com/gobwas/glob?tab=readme-ov-file#example] + ###### imaging See [image processing configuration](/content-management/image-processing/#imaging-configuration). @@ -338,9 +361,9 @@ When present in the root of the configuration, this value is ignored if one or m See [Configure Languages](/content-management/multilingual/#configure-languages). -###### disableLanguages +###### layoutDir -See [Disable a Language](/content-management/multilingual/#disable-a-language) +(`string`) The directory that contains templates. Default is `layouts`. ###### markup @@ -366,6 +389,10 @@ Module configuration see [module configuration](/hugo-modules/configuration/). (`string`) The editor to use when creating new content. +###### noBuildLock + +(`bool`) Don't create `.hugo_build.lock` file. Default is `false`. + ###### noChmod (`bool`) Don't sync permission mode of files. Default is `false`. @@ -386,6 +413,10 @@ See [configure page](#configure-page). See [configure pagination](/templates/pagination/#configuration). +###### panicOnWarning + +(`bool`) Whether to panic on first WARNING. Default is `false`. + ###### permalinks See [Content Management](/content-management/urls/#permalinks). @@ -394,6 +425,18 @@ See [Content Management](/content-management/urls/#permalinks). (`bool`) Whether to pluralize automatic list titles. Applicable to section pages. Default is `true`. +###### printI18nWarnings + +(`bool`) Whether to log WARNINGs for each missing translation. Default is `false`. + +###### printPathWarnings + +(`bool`) Whether to log WARNINGs when Hugo publishes two or more files to the same path. Default is `false`. + +###### printUnusedTemplates + +(`bool`) Whether to log WARNINGs for each unused template. Default is `false`. + ###### publishDir (`string`) The directory to where Hugo will write the final static site (the HTML files etc.). Default is `public`. @@ -414,12 +457,6 @@ See [Related Content](/content-management/related/#configure-related-content). (`bool`) See [details](/content-management/urls/#relative-urls) before enabling this feature. Default is `false`. -###### renderSegments - -{{< new-in 0.124.0 >}} - -(`string slice`) A list of segments to render. If not set, everything will be rendered. This is more commonly set in a CLI flag, e.g. `hugo --renderSegments segment1,segment2`. The segment names must match the names in the [segments](#configure-segments) configuration. - ###### removePathAccents (`bool`) Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths. Default is `false`. @@ -428,6 +465,12 @@ See [Related Content](/content-management/related/#configure-related-content). content/post/hügó.md → https://example.org/post/hugo/ ``` +###### renderSegments + +{{< new-in 0.124.0 >}} + +(`string slice`) A list of segments to render. If not set, everything will be rendered. This is more commonly set in a CLI flag, e.g. `hugo --renderSegments segment1,segment2`. The segment names must match the names in the [segments](#configure-segments) configuration. + ###### sectionPagesMenu See [Menus](/content-management/menus/#define-automatically). @@ -446,14 +489,23 @@ Default [sitemap configuration](/templates/sitemap/#configuration). ###### summaryLength -(`int`) Applicable to automatic summaries, the approximate number of words to render when calling the [`Summary`] method on a `Page` object. Default is `70`. +(`int`) Applicable to [automatic summaries], the minimum number of words to render when calling the [`Summary`] method on a `Page` object. In this case the `Summary` method returns the content, truncated to the paragraph closest to the `summaryLength`. +[automatic summaries]: /content-management/summaries/#automatic-summary [`Summary`]: /methods/page/summary/ ###### taxonomies See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies). +###### templateMetrics + +(`bool`) Whether to print template execution metrics to the console. Default is `false`. See [Template metrics](/troubleshooting/performance/#template-metrics). + +###### templateMetricsHints + +(`bool`) Whether to print template execution improvement hints to the console. Applicable when `templateMetrics` is `true`. Default is `false`. See [Template metrics](/troubleshooting/performance/#template-metrics). + ###### theme See [module configuration](/hugo-modules/configuration/#module-configuration-imports) for how to import a theme. @@ -468,7 +520,11 @@ See [module configuration](/hugo-modules/configuration/#module-configuration-imp ###### timeZone -(`string`) The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time`] function. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). +(`string`) The time zone used to parse dates without time zone offsets, including front matter date fields and values passed to the [`time.AsTime`] and [`time.Format`] template functions. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone Database]. For example, `America/Los_Angeles` and `Europe/Oslo` are valid time zones. + +[`time.AsTime`]: /functions/time/astime/ +[`time.Format`]: /functions/time/format/ +[IANA Time Zone Database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ###### title @@ -480,7 +536,7 @@ See [module configuration](/hugo-modules/configuration/#module-configuration-imp ###### uglyURLs -(`bool`) When enabled, creates URL of the form `/filename.html` instead of `/filename/`. Default is `false`. +(`bool` or `map`) Whether to generate uglyURLs. Default is `false`. See [details](/content-management/urls/#appearance). ###### watch @@ -546,69 +602,8 @@ These settings do not apply to the [`Next`] or [`Prev`] methods on a `Pages` obj ## Configure build -The `build` configuration section contains global build-related configuration options. +See [Configure Build](/getting-started/configuration-build/). -{{< code-toggle config=build />}} - -buildStats {{< new-in 0.115.1 >}} -: When enabled, creates a `hugo_stats.json` file in the root of your project. This file contains arrays of the `class` attributes, `id` attributes, and tags of every HTML element within your published site. Use this file as data source when [removing unused CSS] from your site. This process is also known as pruning, purging, or tree shaking. - -[removing unused CSS]: /hugo-pipes/postprocess/#css-purging-with-postcss - -Exclude `class` attributes, `id` attributes, or tags from `hugo_stats.json` with the `disableClasses`, `disableIDs`, and `disableTags` keys. - -{{% note %}} -With v0.115.0 and earlier this feature was enabled by setting `writeStats` to `true`. Although still functional, the `writeStats` key will be deprecated in a future release. - -Given that CSS purging is typically limited to production builds, place the `buildStats` object below [config/production]. - -[config/production]: /getting-started/configuration/#configuration-directory - -Built for speed, there may be "false positive" detections (e.g., HTML elements that are not HTML elements) while parsing the published site. These "false positives" are infrequent and inconsequential. -{{% /note %}} - -Due to the nature of partial server builds, new HTML entities are added while the server is running, but old values will not be removed until you restart the server or run a regular `hugo` build. - -cachebusters -: See [Configure Cache Busters](#configure-cache-busters) - -noJSConfigInAssets -: Turn off writing a `jsconfig.json` into your `/assets` folder with mapping of imports from running [js.Build](/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written. - -useResourceCacheWhen -: When to use the cached resources in `/resources/_gen` for PostCSS and ToCSS. Valid values are `never`, `always` and `fallback`. The last value means that the cache will be tried if PostCSS/extended version is not available. - -## Configure cache busters - -{{< new-in 0.112.0 >}} - -The `build.cachebusters` configuration option was added to support development using Tailwind 3.x's JIT compiler where a `build` configuration may look like this: - -{{< code-toggle file=hugo >}} -[build] - [build.buildStats] - enable = true - [[build.cachebusters]] - source = "assets/watching/hugo_stats\\.json" - target = "styles\\.css" - [[build.cachebusters]] - source = "(postcss|tailwind)\\.config\\.js" - target = "css" - [[build.cachebusters]] - source = "assets/.*\\.(js|ts|jsx|tsx)" - target = "js" - [[build.cachebusters]] - source = "assets/.*\\.(.*)$" - target = "$1" -{{< /code-toggle >}} - -When `buildStats` {{< new-in 0.115.1 >}} is enabled, Hugo writes a `hugo_stats.json` file on each build with HTML classes etc. that's used in the rendered output. Changes to this file will trigger a rebuild of the `styles.css` file. You also need to add `hugo_stats.json` to Hugo's server watcher. See [Hugo Starter Tailwind Basic](https://github.com/bep/hugo-starter-tailwind-basic) for a running example. - -source -: A regexp matching file(s) relative to one of the virtual component directories in Hugo, typically `assets/...`. - -target -: A regexp matching the keys in the resource cache that should be expired when `source` changes. You can use the matching regexp groups from `source` in the expression, e.g. `$1`. ## Configure server @@ -748,7 +743,7 @@ HUGO_NUMWORKERMULTIPLIER ## Configure with environment variables -In addition to the 3 configuration options already mentioned, configuration key-values can be defined through operating system environment variables. +Configuration key-values can be defined through operating system environment variables. For example, the following command will effectively set a website's title on Unix-like systems: @@ -885,7 +880,6 @@ If this is not set, Hugo will use, in order of preference: If you want to know the current value of `cacheDir`, you can run `hugo config`, e.g: `hugo config | grep cachedir`. -[`time`]: /functions/time/astime/ [`.Site.Params`]: /method/site/params/ [directory structure]: /getting-started/directory-structure/ [lookup order]: /templates/lookup-order/ @@ -919,7 +913,7 @@ The caching in Hugo is layered: ``` Dynacache -: A in memory LRU cache that gets evicted on changes, [Cache Buster](#configure-cache-busters) matches and in low memory situations. +: A in memory LRU cache that gets evicted on changes, [Cache Buster](/getting-started/configuration-build/#configure-cache-busters) matches and in low memory situations. HTTP Cache : Enables HTTP cache behavior (RFC 9111) for remote resources. This works best for resources with properly set up HTTP cache headers. The HTTP cache uses the [file cache] to store and serve cached resources. diff --git a/content/en/getting-started/glossary.md b/content/en/getting-started/glossary.md index cdd9c58ee..0e63c790d 100644 --- a/content/en/getting-started/glossary.md +++ b/content/en/getting-started/glossary.md @@ -223,7 +223,7 @@ Adaptation of a site to meet language and regional requirements. This includes t {{< new-in 0.123.0 >}} -A page or page resource identifier derived from the file path, excluding its extension and language identifier. This value is neither a file path nor a URL. Starting with a file path relative to the content directory, Hugo determines the logical path by stripping the file extension and language identifier, converting to lower case, then replacing spaces with hyphens. See [examples](/methods/page/path/#examples). +A page or page resource identifier derived from the file path, excluding its extension and language identifier. This value is neither a file path nor a URL. Starting with a file path relative to the content directory, Hugo determines the logical path by stripping the file extension and language identifier, converting to lower case, then replacing spaces with hyphens. {{% comment %}}{{% /comment %}} See [examples](/methods/page/path/#examples). ###### map diff --git a/content/en/getting-started/quick-start.md b/content/en/getting-started/quick-start.md index 6e67cb73b..bdb3247ba 100644 --- a/content/en/getting-started/quick-start.md +++ b/content/en/getting-started/quick-start.md @@ -10,7 +10,7 @@ menu: weight: 20 toc: true aliases: [/quickstart/,/overview/quickstart/] -minVersion: v0.112.0 +minVersion: v0.128.0 --- In this tutorial you will: @@ -24,7 +24,7 @@ In this tutorial you will: Before you begin this tutorial you must: -1. [Install Hugo] (extended edition, {{% param "minVersion" %}} or later) +1. [Install Hugo] (extended or extended/deploy edition, {{% param "minVersion" %}} or later) 1. [Install Git] You must also be comfortable working from the command line. diff --git a/content/en/hosting-and-deployment/hosting-on-github/index.md b/content/en/hosting-and-deployment/hosting-on-github/index.md index 03cb95bb8..28c5ff841 100644 --- a/content/en/hosting-and-deployment/hosting-on-github/index.md +++ b/content/en/hosting-and-deployment/hosting-on-github/index.md @@ -97,7 +97,7 @@ jobs: build: runs-on: ubuntu-latest env: - HUGO_VERSION: 0.128.0 + HUGO_VERSION: 0.137.1 steps: - name: Install Hugo CLI run: | diff --git a/content/en/hosting-and-deployment/hosting-on-gitlab.md b/content/en/hosting-and-deployment/hosting-on-gitlab.md index 440bbc13d..d455c83e5 100644 --- a/content/en/hosting-and-deployment/hosting-on-gitlab.md +++ b/content/en/hosting-and-deployment/hosting-on-gitlab.md @@ -27,8 +27,8 @@ Define your [CI/CD](https://docs.gitlab.com/ee/ci/quick_start/) jobs by creating {{< code file=.gitlab-ci.yml copy=true >}} variables: - DART_SASS_VERSION: 1.77.5 - HUGO_VERSION: 0.128.0 + DART_SASS_VERSION: 1.80.6 + HUGO_VERSION: 0.137.1 NODE_VERSION: 20.x GIT_DEPTH: 0 GIT_STRATEGY: clone diff --git a/content/en/hosting-and-deployment/hosting-on-netlify/index.md b/content/en/hosting-and-deployment/hosting-on-netlify/index.md index 66382b7e3..a63451062 100644 --- a/content/en/hosting-and-deployment/hosting-on-netlify/index.md +++ b/content/en/hosting-and-deployment/hosting-on-netlify/index.md @@ -101,7 +101,7 @@ Create a new file named netlify.toml in the root of your project directory. In i {{< code file=netlify.toml >}} [build.environment] -HUGO_VERSION = "0.128.0" +HUGO_VERSION = "0.137.1" TZ = "America/Los_Angeles" [build] @@ -113,8 +113,8 @@ If your site requires Dart Sass to transpile Sass to CSS, the configuration file {{< code file=netlify.toml >}} [build.environment] -HUGO_VERSION = "0.128.0" -DART_SASS_VERSION = "1.77.5" +HUGO_VERSION = "0.137.1" +DART_SASS_VERSION = "1.80.6" TZ = "America/Los_Angeles" [build] diff --git a/content/en/hosting-and-deployment/hugo-deploy.md b/content/en/hosting-and-deployment/hugo-deploy.md index db2448ee7..a7925a666 100644 --- a/content/en/hosting-and-deployment/hugo-deploy.md +++ b/content/en/hosting-and-deployment/hugo-deploy.md @@ -1,6 +1,6 @@ --- title: Hugo Deploy -description: Upload your site to GCS, S3, or Azure +description: Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. categories: [hosting and deployment] keywords: [deployment,s3,gcs,azure] menu: @@ -11,8 +11,13 @@ weight: 20 toc: true --- -You can use the "hugo deploy" command to upload your site directly to a Google Cloud Storage (GCS) bucket, an AWS S3 bucket, and/or an Azure Storage container. +Use the `hugo deploy` command to deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container +{{% note %}} +This feature requires the Hugo extended/deploy edition. See the [installation] section for details. + +[installation]: /installation/ +{{% /note %}} ## Assumptions diff --git a/content/en/hugo-pipes/transpile-sass-to-css.md b/content/en/hugo-pipes/transpile-sass-to-css.md index ee4b1295d..df7eaa2a9 100644 --- a/content/en/hugo-pipes/transpile-sass-to-css.md +++ b/content/en/hugo-pipes/transpile-sass-to-css.md @@ -20,7 +20,7 @@ aliases: [/hugo-pipes/transform-to-css/] ## Usage -Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended edition, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language. +Transpile Sass to CSS using the LibSass transpiler included in Hugo's extended and extended/deploy editions, or [install Dart Sass](#dart-sass) to use the latest features of the Sass language. ```go-html-template {{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }} @@ -37,7 +37,7 @@ Sass has two forms of syntax: [SCSS] and [indented]. Hugo supports both. ## Options transpiler -: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended edition includes the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass) below. +: (`string`) The transpiler to use, either `libsass` (default) or `dartsass`. Hugo's extended and extended/deploy editions include the LibSass transpiler. To use the Dart Sass transpiler, see the [installation instructions](#dart-sass) below. targetPath : (`string`) If not set, the transformed resource's target path will be the original path of the asset file with its extension replaced by `.css`. @@ -136,8 +136,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file ```yaml variables: - HUGO_VERSION: 0.128.0 - DART_SASS_VERSION: 1.77.5 + HUGO_VERSION: 0.137.1 + DART_SASS_VERSION: 1.80.6 GIT_DEPTH: 0 GIT_STRATEGY: clone GIT_SUBMODULE_STRATEGY: recursive @@ -170,8 +170,8 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should ```toml [build.environment] -HUGO_VERSION = "0.128.0" -DART_SASS_VERSION = "1.77.5" +HUGO_VERSION = "0.137.1" +DART_SASS_VERSION = "1.80.6" TZ = "America/Los_Angeles" [build] diff --git a/content/en/installation/_common/01-editions.md b/content/en/installation/_common/01-editions.md index deec8cc83..7a80a522e 100644 --- a/content/en/installation/_common/01-editions.md +++ b/content/en/installation/_common/01-editions.md @@ -2,15 +2,15 @@ # Do not remove front matter. --- -## Editions +Hugo is available in three editions: standard, extended, and extended/deploy. While the standard edition provides core functionality, the extended and extended/deploy editions offer advanced features. -Hugo is available in two editions: standard and extended. With the extended edition you can: - -- Encode to the WebP format when [processing images]. You can decode WebP images with either edition. -- [Transpile Sass to CSS] using the embedded LibSass transpiler. The extended edition is not required to use the [Dart Sass] transpiler. - -We recommend that you install the extended edition. +Feature|extended edition|extended/deploy edition +:--|:-:|:-: +Encode to the WebP format when [processing images]. You can decode WebP images with any edition.|:heavy_check_mark:|:heavy_check_mark: +[Transpile Sass to CSS] using the embedded LibSass transpiler. You can use the [Dart Sass] transpiler with any edition.|:heavy_check_mark:|:heavy_check_mark: +Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See [details].|:x:|:heavy_check_mark: [dart sass]: /hugo-pipes/transpile-sass-to-css/#dart-sass [processing images]: /content-management/image-processing/ [transpile sass to css]: /hugo-pipes/transpile-sass-to-css/ +[details]: /hosting-and-deployment/hugo-deploy/ diff --git a/content/en/installation/_common/04-build-from-source.md b/content/en/installation/_common/04-build-from-source.md index 63be3e456..6829c50ce 100644 --- a/content/en/installation/_common/04-build-from-source.md +++ b/content/en/installation/_common/04-build-from-source.md @@ -4,7 +4,7 @@ ## Build from source -To build the extended edition of Hugo from source you must: +To build the extended or extended/deploy edition from source you must: 1. Install [Git] 1. Install [Go] version 1.20 or later @@ -13,11 +13,22 @@ To build the extended edition of Hugo from source you must: > The install directory is controlled by the `GOPATH` and `GOBIN` environment variables. If `GOBIN` is set, binaries are installed to that directory. If `GOPATH` is set, binaries are installed to the bin subdirectory of the first directory in the `GOPATH` list. Otherwise, binaries are installed to the bin subdirectory of the default `GOPATH` (`$HOME/go` or `%USERPROFILE%\go`). -Then build and test: +To build the standard edition: + +```sh +go install github.com/gohugoio/hugo@latest +``` + +To build the extended edition: ```sh CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest -hugo version +``` + +To build the extended/deploy edition: + +```sh +CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest ``` [Clang]: https://clang.llvm.org/ diff --git a/content/en/installation/bsd.md b/content/en/installation/bsd.md index 6d00b8b98..1b2589c75 100644 --- a/content/en/installation/bsd.md +++ b/content/en/installation/bsd.md @@ -10,8 +10,13 @@ menu: weight: 50 toc: true --- + +## Editions + {{% include "installation/_common/01-editions.md" %}} +Unless your specific deployment needs require the extended/deploy edition, we recommend the extended edition. + {{% include "installation/_common/02-prerequisites.md" %}} {{% include "installation/_common/03-prebuilt-binaries.md" %}} diff --git a/content/en/installation/linux.md b/content/en/installation/linux.md index 769011212..2403bf47b 100644 --- a/content/en/installation/linux.md +++ b/content/en/installation/linux.md @@ -10,8 +10,13 @@ menu: weight: 30 toc: true --- + +## Editions + {{% include "installation/_common/01-editions.md" %}} +Unless your specific deployment needs require the extended/deploy edition, we recommend the extended edition. + {{% include "installation/_common/02-prerequisites.md" %}} {{% include "installation/_common/03-prebuilt-binaries.md" %}} @@ -157,6 +162,14 @@ Derivatives of the [Gentoo] distribution of Linux include [Calculate Linux], [Fu [Gentoo]: https://www.gentoo.org/ [USE]: https://packages.gentoo.org/packages/www-apps/hugo +### NixOS + +The NixOS distribution of Linux includes Hugo in its package repository. To install the extended edition of Hugo: + +```sh +nix-env -iA nixos.hugo +``` + ### openSUSE Derivatives of the [openSUSE] distribution of Linux include [GeckoLinux], [Linux Karmada], and others. To install the extended edition of Hugo: diff --git a/content/en/installation/macos.md b/content/en/installation/macos.md index fa6029679..dace545db 100644 --- a/content/en/installation/macos.md +++ b/content/en/installation/macos.md @@ -10,8 +10,13 @@ menu: weight: 20 toc: true --- + +## Editions + {{% include "installation/_common/01-editions.md" %}} +Unless your specific deployment needs require the extended/deploy edition, we recommend the extended edition. + {{% include "installation/_common/02-prerequisites.md" %}} {{% include "installation/_common/03-prebuilt-binaries.md" %}} diff --git a/content/en/installation/windows.md b/content/en/installation/windows.md index 719264550..e04268cd2 100644 --- a/content/en/installation/windows.md +++ b/content/en/installation/windows.md @@ -15,8 +15,12 @@ toc: true Hugo v0.121.1 and later require at least Windows 10 or Windows Server 2016. {{% /note %}} +## Editions + {{% include "installation/_common/01-editions.md" %}} +Unless your specific deployment needs require the extended/deploy edition, we recommend the extended edition. + {{% include "installation/_common/02-prerequisites.md" %}} {{% include "installation/_common/03-prebuilt-binaries.md" %}} diff --git a/content/en/methods/page/ContentWithoutSummary.md b/content/en/methods/page/ContentWithoutSummary.md index 5080f6717..44d660cef 100644 --- a/content/en/methods/page/ContentWithoutSummary.md +++ b/content/en/methods/page/ContentWithoutSummary.md @@ -25,4 +25,4 @@ Applicable when using manual or automatic [content summaries], the `ContentWitho {{ .ContentWithoutSummary }} ``` -The `ContentWithoutSummary` method returns an empty string if you define the content summary in front matter. +The `ContentWithoutSummary` method returns the same as `Content` if you define the content summary in front matter. diff --git a/content/en/methods/page/Language.md b/content/en/methods/page/Language.md index 321b44e56..e12fc2e62 100644 --- a/content/en/methods/page/Language.md +++ b/content/en/methods/page/Language.md @@ -26,36 +26,41 @@ languageName = 'Deutsch' weight = 2 {{< /code-toggle >}} -Lang -: (`string`) The language tag as defined by [RFC 5646]. +###### Lang + +(`string`) The language tag as defined by [RFC 5646]. ```go-html-template {{ .Language.Lang }} → de ``` -LanguageCode -: (`string`) The language code from the site configuration. Falls back to `Lang` if not defined. +###### LanguageCode + +(`string`) The language code from the site configuration. Falls back to `Lang` if not defined. ```go-html-template {{ .Language.LanguageCode }} → de-DE ``` -LanguageDirection -: (`string`) The language direction from the site configuration, either `ltr` or `rtl`. +###### LanguageDirection + +(`string`) The language direction from the site configuration, either `ltr` or `rtl`. ```go-html-template {{ .Language.LanguageDirection }} → ltr ``` -LanguageName -: (`string`) The language name from the site configuration. +###### LanguageName + +(`string`) The language name from the site configuration. ```go-html-template {{ .Language.LanguageName }} → Deutsch ``` -Weight -: (`int`) The language weight from the site configuration which determines its order in the slice of languages returned by the `Languages` method on a `Site` object. +###### Weight + +(`int`) The language weight from the site configuration which determines its order in the slice of languages returned by the `Languages` method on a `Site` object. ```go-html-template {{ .Language.Weight }} → 2 diff --git a/content/en/methods/page/Paginate.md b/content/en/methods/page/Paginate.md index d9acb6b93..02daa64b4 100644 --- a/content/en/methods/page/Paginate.md +++ b/content/en/methods/page/Paginate.md @@ -10,7 +10,7 @@ action: signatures: ['PAGE.Paginate COLLECTION [N]'] --- -[Pagination] is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers. +Pagination is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers. By default, the number of elements on each pager is determined by your [site configuration]. The default is `10`. Override that value by providing a second argument, an integer, when calling the `Paginate` method. diff --git a/content/en/methods/page/Paginator.md b/content/en/methods/page/Paginator.md index f57e2437e..3dd959006 100644 --- a/content/en/methods/page/Paginator.md +++ b/content/en/methods/page/Paginator.md @@ -10,7 +10,7 @@ action: signatures: [PAGE.Paginator] --- -[Pagination] is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers. +Pagination is the process of splitting a list page into two or more pagers, where each pager contains a subset of the page collection and navigation links to other pagers. The number of elements on each pager is determined by your [site configuration]. The default is `10`. diff --git a/content/en/methods/page/RenderShortcodes.md b/content/en/methods/page/RenderShortcodes.md index 9679fc8d5..e95e0683e 100644 --- a/content/en/methods/page/RenderShortcodes.md +++ b/content/en/methods/page/RenderShortcodes.md @@ -32,9 +32,9 @@ For example: Then call the shortcode in your Markdown: {{< code file=content/about.md lang=md >}} -{{%/* include "/snippets/services.md" */%}} -{{%/* include "/snippets/values.md" */%}} -{{%/* include "/snippets/leadership.md" */%}} +{{%/* include "/snippets/services" */%}} +{{%/* include "/snippets/values" */%}} +{{%/* include "/snippets/leadership" */%}} {{< /code >}} Each of the included Markdown files can contain calls to other shortcodes. @@ -79,3 +79,14 @@ An *emphasized* word. ``` Note that the shortcode within the content file was rendered, but the surrounding Markdown was preserved. + + +## Limitations + +The primary use case for `.RenderShortcodes` is inclusion of Markdown content. If you try to use `.RenderShortcodes` inside `HTML` blocks when inside Markdown, you will get a warning similar to this: + +``` +WARN .RenderShortcodes detected inside HTML block in "/content/mypost.md"; this may not be what you intended ... +``` + +The above warning can be turned off is this is what you really want. diff --git a/content/en/methods/page/Scratch.md b/content/en/methods/page/Scratch.md index 8fef31893..41b1d17fd 100644 --- a/content/en/methods/page/Scratch.md +++ b/content/en/methods/page/Scratch.md @@ -13,6 +13,16 @@ toc: true aliases: [/extras/scratch/,/doc/scratch/,/functions/scratch] --- +{{% deprecated-in 0.138.0 %}} +Use the [`PAGE.Store`] method instead. + +This is a soft deprecation. This method will be removed in a future release, but the removal date has not been established. Although Hugo will not emit a warning if you continue to use this method, you should begin using `PAGE.Store` as soon as possible. + +Beginning with v0.138.0 the `PAGE.Scratch` method is aliased to `PAGE.Store`. + +[`PAGE.Store`]: /methods/page/store/ +{{% /deprecated-in %}} + The `Scratch` method on a `Page` object creates a [scratch pad] to store and manipulate data. To create a scratch pad that is not reset on server rebuilds, use the [`Store`] method instead. To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function. @@ -25,7 +35,7 @@ To create a locally scoped scratch pad that is not attached to a `Page` object, ## Determinate values -The `Scratch` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are not determinate until Hugo renders the page content. +The `Scratch` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are indeterminate until Hugo renders the page content. If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable: @@ -36,7 +46,7 @@ If you need to access a scratch pad value from a parent template, and the parent {{ .Store.Get "mykey" }} ``` -You can also trigger content rendering with the `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount` methods. For example: +You can also trigger content rendering with the `ContentWithoutSummary`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount` methods. For example: ```go-html-template {{ $noop := .WordCount }} diff --git a/content/en/methods/page/Store.md b/content/en/methods/page/Store.md index e7090fe79..a81fa71a3 100644 --- a/content/en/methods/page/Store.md +++ b/content/en/methods/page/Store.md @@ -13,9 +13,7 @@ toc: true aliases: [/functions/store] --- -The `Store` method on a `Page` object creates a persistent [scratch pad] to store and manipulate data. In contrast with the [`Scratch`] method, the scratch pad created by the `Store` method is not reset on server rebuilds. - -To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function. +The `Store` method on a `Page` object creates a persistent [scratch pad] to store and manipulate data. To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function. [`Scratch`]: /methods/page/scratch/ [`newScratch`]: /functions/collections/newscratch/ @@ -106,7 +104,7 @@ Removes the given key. ## Determinate values -The `Store` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are not determinate until Hugo renders the page content. +The `Store` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are indeterminate until Hugo renders the page content. If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable: @@ -117,7 +115,7 @@ If you need to access a scratch pad value from a parent template, and the parent {{ .Store.Get "mykey" }} ``` -You can also trigger content rendering with the `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount` methods. For example: +You can also trigger content rendering with the `ContentWithoutSummary`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount` methods. For example: ```go-html-template {{ $noop := .WordCount }} diff --git a/content/en/methods/page/Summary.md b/content/en/methods/page/Summary.md index e4542d258..490b201d0 100644 --- a/content/en/methods/page/Summary.md +++ b/content/en/methods/page/Summary.md @@ -1,25 +1,27 @@ --- title: Summary -description: Returns the content summary of the given page. +description: Returns the summary of the given page. categories: [] keywords: [] action: related: - methods/page/Truncated + - methods/page/Content + - methods/page/ContentWithoutSummary - methods/page/Description returnType: template.HTML signatures: [PAGE.Summary] --- - - +{{% comment %}} +Do not remove the manual summary divider below. +If you do, you will break its first literal usage on this page. +{{% /comment %}} -There are three ways to define the [content summary]: +You can define a [summary] manually, in front matter, or automatically. A manual summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary. -1. Let Hugo create the summary based on the first 70 words. You can change the number of words by setting the `summaryLength` in your site configuration. -2. Manually split the content with a `` tag in Markdown. Everything before the tag is included in the summary. -3. Create a `summary` field in front matter. +[summary]: /content-management/summaries/ To list the pages in a section with a summary beneath each link: @@ -30,4 +32,20 @@ To list the pages in a section with a summary beneath each link: {{ end }} ``` -[content summary]: /content-management/summaries/ +Depending on content length and how you define the summary, the summary may be equivalent to the content itself. To determine whether the content length exceeds the summary length, use the [`Truncated`] method on a `Page` object. This is useful for conditionally rendering a “read more” link: + +[`Truncated`]: /methods/page/truncated + +```go-html-template +{{ range .Pages }} +

{{ .LinkTitle }}

+ {{ .Summary }} + {{ if .Truncated }} + Read more... + {{ end }} +{{ end }} +``` + +{{% note %}} +The `Truncated` method returns `false` if you define the summary in front matter. +{{% /note %}} diff --git a/content/en/methods/page/Truncated.md b/content/en/methods/page/Truncated.md index 0785f40cb..b4ec7ce16 100644 --- a/content/en/methods/page/Truncated.md +++ b/content/en/methods/page/Truncated.md @@ -10,17 +10,11 @@ action: signatures: [PAGE.Truncated] --- -There are three ways to define the [content summary]: +You can define a [summary] manually, in front matter, or automatically. A manual summary takes precedence over a front matter summary, and a front matter summary takes precedence over an automatic summary. -1. Let Hugo create the summary based on the first 70 words. You can change the number of words by setting the `summaryLength` in your site configuration. -2. Manually split the content with a `<--more-->` tag in Markdown. Everything before the tag is included in the summary. -3. Create a `summary` field in front matter. +[summary]: /content-management/summaries/ -{{% note %}} -The `Truncated` method returns `false` if you define the summary in front matter. -{{% /note %}} - -The `Truncated` method returns `true` if the content length exceeds the summary length. This is useful for rendering a "read more" link: +The `Truncated` method returns `true` if the content length exceeds the summary length. This is useful for conditionally rendering a "read more" link: ```go-html-template {{ range .Pages }} @@ -32,4 +26,6 @@ The `Truncated` method returns `true` if the content length exceeds the summary {{ end }} ``` -[content summary]: /content-management/summaries/ +{{% note %}} +The `Truncated` method returns `false` if you define the summary in front matter. +{{% /note %}} diff --git a/content/en/methods/page/_common/output-format-definition.md b/content/en/methods/page/_common/output-format-definition.md index 412c5cee6..d21211a3d 100644 --- a/content/en/methods/page/_common/output-format-definition.md +++ b/content/en/methods/page/_common/output-format-definition.md @@ -1,7 +1,6 @@ --- # Do not remove front matter. --- - Hugo generates one or more files per page when building a site. For example, when rendering home, [section], [taxonomy], and [term] pages, Hugo generates an HTML file and an RSS file. Both HTML and RSS are built-in _output formats_. Create multiple output formats, and control generation based on [page kind], or by enabling one or more output formats for one or more pages. See [details]. [section]: /getting-started/glossary/#section diff --git a/content/en/methods/resource/Colors.md b/content/en/methods/resource/Colors.md index b062210ba..9ee71ba7d 100644 --- a/content/en/methods/resource/Colors.md +++ b/content/en/methods/resource/Colors.md @@ -11,8 +11,6 @@ toc: true math: true --- -{{< new-in 0.104.0 >}} - The `Resources.Colors` method returns a slice of the most dominant colors in an image, ordered from most dominant to least dominant. This method is fast, but if you also downsize your image you can improve performance by extracting the colors from the scaled image. {{% include "methods/resource/_common/global-page-remote-resources.md" %}} diff --git a/content/en/methods/shortcode/Inner.md b/content/en/methods/shortcode/Inner.md index 9271adb34..a428720d7 100644 --- a/content/en/methods/shortcode/Inner.md +++ b/content/en/methods/shortcode/Inner.md @@ -29,7 +29,7 @@ With this shortcode:
{{ . }}
{{ end }}
- {{ trim .Inner "\r\n" }} + {{ .Inner | strings.TrimSpace }}
{{< /code >}} @@ -46,9 +46,9 @@ Is rendered to: ``` {{% note %}} -Content between opening and closing shortcode tags may include leading and/or trailing newlines, depending on placement within the Markdown. Use the [`trim`] function as shown above to remove both carriage returns and newlines. +Content between opening and closing shortcode tags may include leading and/or trailing newlines, depending on placement within the Markdown. Use the [`strings.TrimSpace`] function as shown above to remove both carriage returns and newlines. -[`trim`]: /functions/strings/trim/ +[`strings.TrimSpace`]: /functions/strings/trimspace/ {{% /note %}} {{% note %}} @@ -68,7 +68,7 @@ Let's modify the example above to pass the value returned by `Inner` through the
{{ . }}
{{ end }}
- {{ trim .Inner "\r\n" | .Page.RenderString }} + {{ .Inner | strings.TrimSpace | .Page.RenderString }}
{{< /code >}} @@ -119,7 +119,7 @@ Second, because we are rendering the entire shortcode as Markdown, we must adher {{ end }}
- {{ trim .Inner "\r\n" }} + {{ .Inner | strings.TrimSpace }}
{{< /code >}} @@ -136,9 +136,9 @@ The difference between this and the previous example is subtle but required. Not +
{{ . }}
{{ end }}
-- {{ trim .Inner "\r\n" | .Page.RenderString }} +- {{ .Inner | strings.TrimSpace | .Page.RenderString }} + -+ {{ trim .Inner "\r\n" }} ++ {{ .Inner | strings.TrimSpace }}
``` diff --git a/content/en/methods/shortcode/InnerDeindent.md b/content/en/methods/shortcode/InnerDeindent.md index b5f5cf206..ab4263709 100644 --- a/content/en/methods/shortcode/InnerDeindent.md +++ b/content/en/methods/shortcode/InnerDeindent.md @@ -38,7 +38,7 @@ With this shortcode, calling `Inner` instead of `InnerDeindent`: {{< code file=layouts/shortcodes/gallery.html >}} {{< /code >}} @@ -69,7 +69,7 @@ Although technically correct per the CommonMark specification, this is not what {{< code file=layouts/shortcodes/gallery.html >}} {{< /code >}} diff --git a/content/en/methods/shortcode/Parent.md b/content/en/methods/shortcode/Parent.md index c500af375..53fac8237 100644 --- a/content/en/methods/shortcode/Parent.md +++ b/content/en/methods/shortcode/Parent.md @@ -21,7 +21,7 @@ Welcome. Today is {{}}. {{< code file=layouts/shortcodes/greeting.html >}}
- {{ trim .Inner "\r\n" | .Page.RenderString }} + {{ .Inner | strings.TrimSpace | .Page.RenderString }}
{{< /code >}} diff --git a/content/en/methods/site/Language.md b/content/en/methods/site/Language.md index 7179038e4..2400c225a 100644 --- a/content/en/methods/site/Language.md +++ b/content/en/methods/site/Language.md @@ -27,36 +27,41 @@ languageName = 'Deutsch' weight = 1 {{< /code-toggle >}} -Lang -: (`string`) The language tag as defined by [RFC 5646]. +###### Lang + +(`string`) The language tag as defined by [RFC 5646]. ```go-html-template {{ .Site.Language.Lang }} → de ``` -LanguageCode -: (`string`) The language code from the site configuration. Falls back to `Lang` if not defined. +###### LanguageCode + +(`string`) The language code from the site configuration. Falls back to `Lang` if not defined. ```go-html-template {{ .Site.Language.LanguageCode }} → de-DE ``` -LanguageDirection -: (`string`) The language direction from the site configuration, either `ltr` or `rtl`. +###### LanguageDirection + +(`string`) The language direction from the site configuration, either `ltr` or `rtl`. ```go-html-template {{ .Site.Language.LanguageDirection }} → ltr ``` -LanguageName -: (`string`) The language name from the site configuration. +###### LanguageName + +(`string`) The language name from the site configuration. ```go-html-template {{ .Site.Language.LanguageName }} → Deutsch ``` -Weight -: (`int`) The language weight from the site configuration which determines its order in the slice of languages returned by the `Languages` method on a `Site` object. +###### Weight + +(`int`) The language weight from the site configuration which determines its order in the slice of languages returned by the `Languages` method on a `Site` object. ```go-html-template {{ .Site.Language.Weight }} → 1 diff --git a/content/en/methods/site/Taxonomies.md b/content/en/methods/site/Taxonomies.md index d23a0908f..4690e6da5 100644 --- a/content/en/methods/site/Taxonomies.md +++ b/content/en/methods/site/Taxonomies.md @@ -9,12 +9,9 @@ action: signatures: [SITE.Taxonomies] --- - +{{% /comment %}} Conceptually, the `Taxonomies` method on a `Site` object returns a data structure such as: diff --git a/content/en/quick-reference/emojis.md b/content/en/quick-reference/emojis.md index 4c31c5d76..d2e73843f 100644 --- a/content/en/quick-reference/emojis.md +++ b/content/en/quick-reference/emojis.md @@ -53,7 +53,7 @@ To process an emoji shortcode from within a template, use the [`emojify`] functi [`emojify`]: /functions/transform/emojify/ [`RenderString`]: /methods/page/renderstring/ - + 4. Search/replace (regex) "
" "" +{{% /comment %}} ## Table of Contents @@ -106,7 +107,7 @@ Then... | - | :-: | - | :-: | - | - | | [top](#smileys--emotion) | :grinning: | `:grinning:` | :smiley: | `:smiley:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :smile: | `:smile:` | :grin: | `:grin:` | [top](#table-of-contents) | -| [top](#smileys--emotion) | :laughing: | `:laughing:`
`:satisfied:` | :sweat_smile: | `:sweat_smile:` | [top](#table-of-contents) | +| [top](#smileys--emotion) | :laughing: | `:laughing:` `:satisfied:` | :sweat_smile: | `:sweat_smile:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :rofl: | `:rofl:` | :joy: | `:joy:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :slightly_smiling_face: | `:slightly_smiling_face:` | :upside_down_face: | `:upside_down_face:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :melting_face: | `:melting_face:` | :wink: | `:wink:` | [top](#table-of-contents) | @@ -206,7 +207,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | -| [top](#smileys--emotion) | :triumph: | `:triumph:` | :pout: | `:pout:`
`:rage:` | [top](#table-of-contents) | +| [top](#smileys--emotion) | :triumph: | `:triumph:` | :pout: | `:pout:` `:rage:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :angry: | `:angry:` | :cursing_face: | `:cursing_face:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :smiling_imp: | `:smiling_imp:` | :imp: | `:imp:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :skull: | `:skull:` | :skull_and_crossbones: | `:skull_and_crossbones:` | [top](#table-of-contents) | @@ -215,7 +216,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | -| [top](#smileys--emotion) | :hankey: | `:hankey:`
`:poop:`
`:shit:` | :clown_face: | `:clown_face:` | [top](#table-of-contents) | +| [top](#smileys--emotion) | :hankey: | `:hankey:` `:poop:` `:shit:` | :clown_face: | `:clown_face:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :japanese_ogre: | `:japanese_ogre:` | :japanese_goblin: | `:japanese_goblin:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :ghost: | `:ghost:` | :alien: | `:alien:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :space_invader: | `:space_invader:` | :robot: | `:robot:` | [top](#table-of-contents) | @@ -260,7 +261,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#smileys--emotion) | :kiss: | `:kiss:` | :100: | `:100:` | [top](#table-of-contents) | -| [top](#smileys--emotion) | :anger: | `:anger:` | :boom: | `:boom:`
`:collision:` | [top](#table-of-contents) | +| [top](#smileys--emotion) | :anger: | `:anger:` | :boom: | `:boom:` `:collision:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :dizzy: | `:dizzy:` | :sweat_drops: | `:sweat_drops:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :dash: | `:dash:` | :hole: | `:hole:` | [top](#table-of-contents) | | [top](#smileys--emotion) | :speech_balloon: | `:speech_balloon:` | :eye_speech_bubble: | `:eye_speech_bubble:` | [top](#table-of-contents) | @@ -291,7 +292,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#people--body) | :wave: | `:wave:` | :raised_back_of_hand: | `:raised_back_of_hand:` | [top](#table-of-contents) | -| [top](#people--body) | :raised_hand_with_fingers_splayed: | `:raised_hand_with_fingers_splayed:` | :hand: | `:hand:`
`:raised_hand:` | [top](#table-of-contents) | +| [top](#people--body) | :raised_hand_with_fingers_splayed: | `:raised_hand_with_fingers_splayed:` | :hand: | `:hand:` `:raised_hand:` | [top](#table-of-contents) | | [top](#people--body) | :vulcan_salute: | `:vulcan_salute:` | :rightwards_hand: | `:rightwards_hand:` | [top](#table-of-contents) | | [top](#people--body) | :leftwards_hand: | `:leftwards_hand:` | :palm_down_hand: | `:palm_down_hand:` | [top](#table-of-contents) | | [top](#people--body) | :palm_up_hand: | `:palm_up_hand:` | :leftwards_pushing_hand: | `:leftwards_pushing_hand:` | [top](#table-of-contents) | @@ -312,7 +313,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#people--body) | :point_left: | `:point_left:` | :point_right: | `:point_right:` | [top](#table-of-contents) | -| [top](#people--body) | :point_up_2: | `:point_up_2:` | :fu: | `:fu:`
`:middle_finger:` | [top](#table-of-contents) | +| [top](#people--body) | :point_up_2: | `:point_up_2:` | :fu: | `:fu:` `:middle_finger:` | [top](#table-of-contents) | | [top](#people--body) | :point_down: | `:point_down:` | :point_up: | `:point_up:` | [top](#table-of-contents) | | [top](#people--body) | :index_pointing_at_the_viewer: | `:index_pointing_at_the_viewer:` | | | [top](#table-of-contents) | @@ -320,8 +321,8 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | -| [top](#people--body) | :+1: | `:+1:`
`:thumbsup:` | :-1: | `:-1:`
`:thumbsdown:` | [top](#table-of-contents) | -| [top](#people--body) | :fist: | `:fist:`
`:fist_raised:` | :facepunch: | `:facepunch:`
`:fist_oncoming:`
`:punch:` | [top](#table-of-contents) | +| [top](#people--body) | :+1: | `:+1:` `:thumbsup:` | :-1: | `:-1:` `:thumbsdown:` | [top](#table-of-contents) | +| [top](#people--body) | :fist: | `:fist:` `:fist_raised:` | :facepunch: | `:facepunch:` `:fist_oncoming:` `:punch:` | [top](#table-of-contents) | | [top](#people--body) | :fist_left: | `:fist_left:` | :fist_right: | `:fist_right:` | [top](#table-of-contents) | ### Hands @@ -369,7 +370,7 @@ Then... | [top](#people--body) | :person_red_hair: | `:person_red_hair:` | :curly_haired_woman: | `:curly_haired_woman:` | [top](#table-of-contents) | | [top](#people--body) | :person_curly_hair: | `:person_curly_hair:` | :white_haired_woman: | `:white_haired_woman:` | [top](#table-of-contents) | | [top](#people--body) | :person_white_hair: | `:person_white_hair:` | :bald_woman: | `:bald_woman:` | [top](#table-of-contents) | -| [top](#people--body) | :person_bald: | `:person_bald:` | :blond_haired_woman: | `:blond_haired_woman:`
`:blonde_woman:` | [top](#table-of-contents) | +| [top](#people--body) | :person_bald: | `:person_bald:` | :blond_haired_woman: | `:blond_haired_woman:` `:blonde_woman:` | [top](#table-of-contents) | | [top](#people--body) | :blond_haired_man: | `:blond_haired_man:` | :older_adult: | `:older_adult:` | [top](#table-of-contents) | | [top](#people--body) | :older_man: | `:older_man:` | :older_woman: | `:older_woman:` | [top](#table-of-contents) | @@ -380,11 +381,11 @@ Then... | [top](#people--body) | :frowning_person: | `:frowning_person:` | :frowning_man: | `:frowning_man:` | [top](#table-of-contents) | | [top](#people--body) | :frowning_woman: | `:frowning_woman:` | :pouting_face: | `:pouting_face:` | [top](#table-of-contents) | | [top](#people--body) | :pouting_man: | `:pouting_man:` | :pouting_woman: | `:pouting_woman:` | [top](#table-of-contents) | -| [top](#people--body) | :no_good: | `:no_good:` | :ng_man: | `:ng_man:`
`:no_good_man:` | [top](#table-of-contents) | -| [top](#people--body) | :ng_woman: | `:ng_woman:`
`:no_good_woman:` | :ok_person: | `:ok_person:` | [top](#table-of-contents) | +| [top](#people--body) | :no_good: | `:no_good:` | :ng_man: | `:ng_man:` `:no_good_man:` | [top](#table-of-contents) | +| [top](#people--body) | :ng_woman: | `:ng_woman:` `:no_good_woman:` | :ok_person: | `:ok_person:` | [top](#table-of-contents) | | [top](#people--body) | :ok_man: | `:ok_man:` | :ok_woman: | `:ok_woman:` | [top](#table-of-contents) | -| [top](#people--body) | :information_desk_person: | `:information_desk_person:`
`:tipping_hand_person:` | :sassy_man: | `:sassy_man:`
`:tipping_hand_man:` | [top](#table-of-contents) | -| [top](#people--body) | :sassy_woman: | `:sassy_woman:`
`:tipping_hand_woman:` | :raising_hand: | `:raising_hand:` | [top](#table-of-contents) | +| [top](#people--body) | :information_desk_person: | `:information_desk_person:` `:tipping_hand_person:` | :sassy_man: | `:sassy_man:` `:tipping_hand_man:` | [top](#table-of-contents) | +| [top](#people--body) | :sassy_woman: | `:sassy_woman:` `:tipping_hand_woman:` | :raising_hand: | `:raising_hand:` | [top](#table-of-contents) | | [top](#people--body) | :raising_hand_man: | `:raising_hand_man:` | :raising_hand_woman: | `:raising_hand_woman:` | [top](#table-of-contents) | | [top](#people--body) | :deaf_person: | `:deaf_person:` | :deaf_man: | `:deaf_man:` | [top](#table-of-contents) | | [top](#people--body) | :deaf_woman: | `:deaf_woman:` | :bow: | `:bow:` | [top](#table-of-contents) | @@ -421,7 +422,7 @@ Then... | [top](#people--body) | :astronaut: | `:astronaut:` | :man_astronaut: | `:man_astronaut:` | [top](#table-of-contents) | | [top](#people--body) | :woman_astronaut: | `:woman_astronaut:` | :firefighter: | `:firefighter:` | [top](#table-of-contents) | | [top](#people--body) | :man_firefighter: | `:man_firefighter:` | :woman_firefighter: | `:woman_firefighter:` | [top](#table-of-contents) | -| [top](#people--body) | :cop: | `:cop:`
`:police_officer:` | :policeman: | `:policeman:` | [top](#table-of-contents) | +| [top](#people--body) | :cop: | `:cop:` `:police_officer:` | :policeman: | `:policeman:` | [top](#table-of-contents) | | [top](#people--body) | :policewoman: | `:policewoman:` | :detective: | `:detective:` | [top](#table-of-contents) | | [top](#people--body) | :male_detective: | `:male_detective:` | :female_detective: | `:female_detective:` | [top](#table-of-contents) | | [top](#people--body) | :guard: | `:guard:` | :guardsman: | `:guardsman:` | [top](#table-of-contents) | @@ -434,7 +435,7 @@ Then... | [top](#people--body) | :woman_with_headscarf: | `:woman_with_headscarf:` | :person_in_tuxedo: | `:person_in_tuxedo:` | [top](#table-of-contents) | | [top](#people--body) | :man_in_tuxedo: | `:man_in_tuxedo:` | :woman_in_tuxedo: | `:woman_in_tuxedo:` | [top](#table-of-contents) | | [top](#people--body) | :person_with_veil: | `:person_with_veil:` | :man_with_veil: | `:man_with_veil:` | [top](#table-of-contents) | -| [top](#people--body) | :bride_with_veil: | `:bride_with_veil:`
`:woman_with_veil:` | :pregnant_woman: | `:pregnant_woman:` | [top](#table-of-contents) | +| [top](#people--body) | :bride_with_veil: | `:bride_with_veil:` `:woman_with_veil:` | :pregnant_woman: | `:pregnant_woman:` | [top](#table-of-contents) | | [top](#people--body) | :pregnant_man: | `:pregnant_man:` | :pregnant_person: | `:pregnant_person:` | [top](#table-of-contents) | | [top](#people--body) | :breast_feeding: | `:breast_feeding:` | :woman_feeding_baby: | `:woman_feeding_baby:` | [top](#table-of-contents) | | [top](#people--body) | :man_feeding_baby: | `:man_feeding_baby:` | :person_feeding_baby: | `:person_feeding_baby:` | [top](#table-of-contents) | @@ -476,8 +477,8 @@ Then... | [top](#people--body) | :person_in_motorized_wheelchair: | `:person_in_motorized_wheelchair:` | :man_in_motorized_wheelchair: | `:man_in_motorized_wheelchair:` | [top](#table-of-contents) | | [top](#people--body) | :woman_in_motorized_wheelchair: | `:woman_in_motorized_wheelchair:` | :person_in_manual_wheelchair: | `:person_in_manual_wheelchair:` | [top](#table-of-contents) | | [top](#people--body) | :man_in_manual_wheelchair: | `:man_in_manual_wheelchair:` | :woman_in_manual_wheelchair: | `:woman_in_manual_wheelchair:` | [top](#table-of-contents) | -| [top](#people--body) | :runner: | `:runner:`
`:running:` | :running_man: | `:running_man:` | [top](#table-of-contents) | -| [top](#people--body) | :running_woman: | `:running_woman:` | :dancer: | `:dancer:`
`:woman_dancing:` | [top](#table-of-contents) | +| [top](#people--body) | :runner: | `:runner:` `:running:` | :running_man: | `:running_man:` | [top](#table-of-contents) | +| [top](#people--body) | :running_woman: | `:running_woman:` | :dancer: | `:dancer:` `:woman_dancing:` | [top](#table-of-contents) | | [top](#people--body) | :man_dancing: | `:man_dancing:` | :business_suit_levitating: | `:business_suit_levitating:` | [top](#table-of-contents) | | [top](#people--body) | :dancers: | `:dancers:` | :dancing_men: | `:dancing_men:` | [top](#table-of-contents) | | [top](#people--body) | :dancing_women: | `:dancing_women:` | :sauna_person: | `:sauna_person:` | [top](#table-of-contents) | @@ -497,8 +498,8 @@ Then... | [top](#people--body) | :rowboat: | `:rowboat:` | :rowing_man: | `:rowing_man:` | [top](#table-of-contents) | | [top](#people--body) | :rowing_woman: | `:rowing_woman:` | :swimmer: | `:swimmer:` | [top](#table-of-contents) | | [top](#people--body) | :swimming_man: | `:swimming_man:` | :swimming_woman: | `:swimming_woman:` | [top](#table-of-contents) | -| [top](#people--body) | :bouncing_ball_person: | `:bouncing_ball_person:` | :basketball_man: | `:basketball_man:`
`:bouncing_ball_man:` | [top](#table-of-contents) | -| [top](#people--body) | :basketball_woman: | `:basketball_woman:`
`:bouncing_ball_woman:` | :weight_lifting: | `:weight_lifting:` | [top](#table-of-contents) | +| [top](#people--body) | :bouncing_ball_person: | `:bouncing_ball_person:` | :basketball_man: | `:basketball_man:` `:bouncing_ball_man:` | [top](#table-of-contents) | +| [top](#people--body) | :basketball_woman: | `:basketball_woman:` `:bouncing_ball_woman:` | :weight_lifting: | `:weight_lifting:` | [top](#table-of-contents) | | [top](#people--body) | :weight_lifting_man: | `:weight_lifting_man:` | :weight_lifting_woman: | `:weight_lifting_woman:` | [top](#table-of-contents) | | [top](#people--body) | :bicyclist: | `:bicyclist:` | :biking_man: | `:biking_man:` | [top](#table-of-contents) | | [top](#people--body) | :biking_woman: | `:biking_woman:` | :mountain_bicyclist: | `:mountain_bicyclist:` | [top](#table-of-contents) | @@ -599,7 +600,7 @@ Then... | [top](#animals--nature) | :koala: | `:koala:` | :panda_face: | `:panda_face:` | [top](#table-of-contents) | | [top](#animals--nature) | :sloth: | `:sloth:` | :otter: | `:otter:` | [top](#table-of-contents) | | [top](#animals--nature) | :skunk: | `:skunk:` | :kangaroo: | `:kangaroo:` | [top](#table-of-contents) | -| [top](#animals--nature) | :badger: | `:badger:` | :feet: | `:feet:`
`:paw_prints:` | [top](#table-of-contents) | +| [top](#animals--nature) | :badger: | `:badger:` | :feet: | `:feet:` `:paw_prints:` | [top](#table-of-contents) | ### Animal Bird @@ -637,7 +638,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#animals--nature) | :whale: | `:whale:` | :whale2: | `:whale2:` | [top](#table-of-contents) | -| [top](#animals--nature) | :dolphin: | `:dolphin:`
`:flipper:` | :seal: | `:seal:` | [top](#table-of-contents) | +| [top](#animals--nature) | :dolphin: | `:dolphin:` `:flipper:` | :seal: | `:seal:` | [top](#table-of-contents) | | [top](#animals--nature) | :fish: | `:fish:` | :tropical_fish: | `:tropical_fish:` | [top](#table-of-contents) | | [top](#animals--nature) | :blowfish: | `:blowfish:` | :shark: | `:shark:` | [top](#table-of-contents) | | [top](#animals--nature) | :octopus: | `:octopus:` | :shell: | `:shell:` | [top](#table-of-contents) | @@ -649,7 +650,7 @@ Then... | - | :-: | - | :-: | - | - | | [top](#animals--nature) | :snail: | `:snail:` | :butterfly: | `:butterfly:` | [top](#table-of-contents) | | [top](#animals--nature) | :bug: | `:bug:` | :ant: | `:ant:` | [top](#table-of-contents) | -| [top](#animals--nature) | :bee: | `:bee:`
`:honeybee:` | :beetle: | `:beetle:` | [top](#table-of-contents) | +| [top](#animals--nature) | :bee: | `:bee:` `:honeybee:` | :beetle: | `:beetle:` | [top](#table-of-contents) | | [top](#animals--nature) | :lady_beetle: | `:lady_beetle:` | :cricket: | `:cricket:` | [top](#table-of-contents) | | [top](#animals--nature) | :cockroach: | `:cockroach:` | :spider: | `:spider:` | [top](#table-of-contents) | | [top](#animals--nature) | :spider_web: | `:spider_web:` | :scorpion: | `:scorpion:` | [top](#table-of-contents) | @@ -696,7 +697,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#food--drink) | :grapes: | `:grapes:` | :melon: | `:melon:` | [top](#table-of-contents) | -| [top](#food--drink) | :watermelon: | `:watermelon:` | :mandarin: | `:mandarin:`
`:orange:`
`:tangerine:` | [top](#table-of-contents) | +| [top](#food--drink) | :watermelon: | `:watermelon:` | :mandarin: | `:mandarin:` `:orange:` `:tangerine:` | [top](#table-of-contents) | | [top](#food--drink) | :lemon: | `:lemon:` | :banana: | `:banana:` | [top](#table-of-contents) | | [top](#food--drink) | :pineapple: | `:pineapple:` | :mango: | `:mango:` | [top](#table-of-contents) | | [top](#food--drink) | :apple: | `:apple:` | :green_apple: | `:green_apple:` | [top](#table-of-contents) | @@ -797,7 +798,7 @@ Then... | - | :-: | - | :-: | - | - | | [top](#food--drink) | :chopsticks: | `:chopsticks:` | :plate_with_cutlery: | `:plate_with_cutlery:` | [top](#table-of-contents) | | [top](#food--drink) | :fork_and_knife: | `:fork_and_knife:` | :spoon: | `:spoon:` | [top](#table-of-contents) | -| [top](#food--drink) | :hocho: | `:hocho:`
`:knife:` | :jar: | `:jar:` | [top](#table-of-contents) | +| [top](#food--drink) | :hocho: | `:hocho:` `:knife:` | :jar: | `:jar:` | [top](#table-of-contents) | | [top](#food--drink) | :amphora: | `:amphora:` | | | [top](#table-of-contents) | ## Travel & Places @@ -889,7 +890,7 @@ Then... | [top](#travel--places) | :ambulance: | `:ambulance:` | :fire_engine: | `:fire_engine:` | [top](#table-of-contents) | | [top](#travel--places) | :police_car: | `:police_car:` | :oncoming_police_car: | `:oncoming_police_car:` | [top](#table-of-contents) | | [top](#travel--places) | :taxi: | `:taxi:` | :oncoming_taxi: | `:oncoming_taxi:` | [top](#table-of-contents) | -| [top](#travel--places) | :car: | `:car:`
`:red_car:` | :oncoming_automobile: | `:oncoming_automobile:` | [top](#table-of-contents) | +| [top](#travel--places) | :car: | `:car:` `:red_car:` | :oncoming_automobile: | `:oncoming_automobile:` | [top](#table-of-contents) | | [top](#travel--places) | :blue_car: | `:blue_car:` | :pickup_truck: | `:pickup_truck:` | [top](#table-of-contents) | | [top](#travel--places) | :truck: | `:truck:` | :articulated_lorry: | `:articulated_lorry:` | [top](#table-of-contents) | | [top](#travel--places) | :tractor: | `:tractor:` | :racing_car: | `:racing_car:` | [top](#table-of-contents) | @@ -909,7 +910,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#travel--places) | :anchor: | `:anchor:` | :ring_buoy: | `:ring_buoy:` | [top](#table-of-contents) | -| [top](#travel--places) | :boat: | `:boat:`
`:sailboat:` | :canoe: | `:canoe:` | [top](#table-of-contents) | +| [top](#travel--places) | :boat: | `:boat:` `:sailboat:` | :canoe: | `:canoe:` | [top](#table-of-contents) | | [top](#travel--places) | :speedboat: | `:speedboat:` | :passenger_ship: | `:passenger_ship:` | [top](#table-of-contents) | | [top](#travel--places) | :ferry: | `:ferry:` | :motor_boat: | `:motor_boat:` | [top](#table-of-contents) | | [top](#travel--places) | :ship: | `:ship:` | | | [top](#table-of-contents) | @@ -958,7 +959,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#travel--places) | :new_moon: | `:new_moon:` | :waxing_crescent_moon: | `:waxing_crescent_moon:` | [top](#table-of-contents) | -| [top](#travel--places) | :first_quarter_moon: | `:first_quarter_moon:` | :moon: | `:moon:`
`:waxing_gibbous_moon:` | [top](#table-of-contents) | +| [top](#travel--places) | :first_quarter_moon: | `:first_quarter_moon:` | :moon: | `:moon:` `:waxing_gibbous_moon:` | [top](#table-of-contents) | | [top](#travel--places) | :full_moon: | `:full_moon:` | :waning_gibbous_moon: | `:waning_gibbous_moon:` | [top](#table-of-contents) | | [top](#travel--places) | :last_quarter_moon: | `:last_quarter_moon:` | :waning_crescent_moon: | `:waning_crescent_moon:` | [top](#table-of-contents) | | [top](#travel--places) | :crescent_moon: | `:crescent_moon:` | :new_moon_with_face: | `:new_moon_with_face:` | [top](#table-of-contents) | @@ -1087,7 +1088,7 @@ Then... | [top](#objects) | :eyeglasses: | `:eyeglasses:` | :dark_sunglasses: | `:dark_sunglasses:` | [top](#table-of-contents) | | [top](#objects) | :goggles: | `:goggles:` | :lab_coat: | `:lab_coat:` | [top](#table-of-contents) | | [top](#objects) | :safety_vest: | `:safety_vest:` | :necktie: | `:necktie:` | [top](#table-of-contents) | -| [top](#objects) | :shirt: | `:shirt:`
`:tshirt:` | :jeans: | `:jeans:` | [top](#table-of-contents) | +| [top](#objects) | :shirt: | `:shirt:` `:tshirt:` | :jeans: | `:jeans:` | [top](#table-of-contents) | | [top](#objects) | :scarf: | `:scarf:` | :gloves: | `:gloves:` | [top](#table-of-contents) | | [top](#objects) | :coat: | `:coat:` | :socks: | `:socks:` | [top](#table-of-contents) | | [top](#objects) | :dress: | `:dress:` | :kimono: | `:kimono:` | [top](#table-of-contents) | @@ -1097,7 +1098,7 @@ Then... | [top](#objects) | :folding_hand_fan: | `:folding_hand_fan:` | :purse: | `:purse:` | [top](#table-of-contents) | | [top](#objects) | :handbag: | `:handbag:` | :pouch: | `:pouch:` | [top](#table-of-contents) | | [top](#objects) | :shopping: | `:shopping:` | :school_satchel: | `:school_satchel:` | [top](#table-of-contents) | -| [top](#objects) | :thong_sandal: | `:thong_sandal:` | :mans_shoe: | `:mans_shoe:`
`:shoe:` | [top](#table-of-contents) | +| [top](#objects) | :thong_sandal: | `:thong_sandal:` | :mans_shoe: | `:mans_shoe:` `:shoe:` | [top](#table-of-contents) | | [top](#objects) | :athletic_shoe: | `:athletic_shoe:` | :hiking_boot: | `:hiking_boot:` | [top](#table-of-contents) | | [top](#objects) | :flat_shoe: | `:flat_shoe:` | :high_heel: | `:high_heel:` | [top](#table-of-contents) | | [top](#objects) | :sandal: | `:sandal:` | :ballet_shoes: | `:ballet_shoes:` | [top](#table-of-contents) | @@ -1145,7 +1146,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#objects) | :iphone: | `:iphone:` | :calling: | `:calling:` | [top](#table-of-contents) | -| [top](#objects) | :phone: | `:phone:`
`:telephone:` | :telephone_receiver: | `:telephone_receiver:` | [top](#table-of-contents) | +| [top](#objects) | :phone: | `:phone:` `:telephone:` | :telephone_receiver: | `:telephone_receiver:` | [top](#table-of-contents) | | [top](#objects) | :pager: | `:pager:` | :fax: | `:fax:` | [top](#table-of-contents) | ### Computer @@ -1171,14 +1172,14 @@ Then... | [top](#objects) | :vhs: | `:vhs:` | :mag: | `:mag:` | [top](#table-of-contents) | | [top](#objects) | :mag_right: | `:mag_right:` | :candle: | `:candle:` | [top](#table-of-contents) | | [top](#objects) | :bulb: | `:bulb:` | :flashlight: | `:flashlight:` | [top](#table-of-contents) | -| [top](#objects) | :izakaya_lantern: | `:izakaya_lantern:`
`:lantern:` | :diya_lamp: | `:diya_lamp:` | [top](#table-of-contents) | +| [top](#objects) | :izakaya_lantern: | `:izakaya_lantern:` `:lantern:` | :diya_lamp: | `:diya_lamp:` | [top](#table-of-contents) | ### Book Paper | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | | [top](#objects) | :notebook_with_decorative_cover: | `:notebook_with_decorative_cover:` | :closed_book: | `:closed_book:` | [top](#table-of-contents) | -| [top](#objects) | :book: | `:book:`
`:open_book:` | :green_book: | `:green_book:` | [top](#table-of-contents) | +| [top](#objects) | :book: | `:book:` `:open_book:` | :green_book: | `:green_book:` | [top](#table-of-contents) | | [top](#objects) | :blue_book: | `:blue_book:` | :orange_book: | `:orange_book:` | [top](#table-of-contents) | | [top](#objects) | :books: | `:books:` | :notebook: | `:notebook:` | [top](#table-of-contents) | | [top](#objects) | :ledger: | `:ledger:` | :page_with_curl: | `:page_with_curl:` | [top](#table-of-contents) | @@ -1201,7 +1202,7 @@ Then... | | ico | shortcode | ico | shortcode | | | - | :-: | - | :-: | - | - | -| [top](#objects) | :envelope: | `:envelope:` | :e-mail: | `:e-mail:`
`:email:` | [top](#table-of-contents) | +| [top](#objects) | :envelope: | `:envelope:` | :e-mail: | `:e-mail:` `:email:` | [top](#table-of-contents) | | [top](#objects) | :incoming_envelope: | `:incoming_envelope:` | :envelope_with_arrow: | `:envelope_with_arrow:` | [top](#table-of-contents) | | [top](#objects) | :outbox_tray: | `:outbox_tray:` | :inbox_tray: | `:inbox_tray:` | [top](#table-of-contents) | | [top](#objects) | :package: | `:package:` | :mailbox: | `:mailbox:` | [top](#table-of-contents) | @@ -1216,7 +1217,7 @@ Then... | [top](#objects) | :pencil2: | `:pencil2:` | :black_nib: | `:black_nib:` | [top](#table-of-contents) | | [top](#objects) | :fountain_pen: | `:fountain_pen:` | :pen: | `:pen:` | [top](#table-of-contents) | | [top](#objects) | :paintbrush: | `:paintbrush:` | :crayon: | `:crayon:` | [top](#table-of-contents) | -| [top](#objects) | :memo: | `:memo:`
`:pencil:` | | | [top](#table-of-contents) | +| [top](#objects) | :memo: | `:memo:` `:pencil:` | | | [top](#table-of-contents) | ### Office @@ -1427,7 +1428,7 @@ Then... | - | :-: | - | :-: | - | - | | [top](#symbols) | :bangbang: | `:bangbang:` | :interrobang: | `:interrobang:` | [top](#table-of-contents) | | [top](#symbols) | :question: | `:question:` | :grey_question: | `:grey_question:` | [top](#table-of-contents) | -| [top](#symbols) | :grey_exclamation: | `:grey_exclamation:` | :exclamation: | `:exclamation:`
`:heavy_exclamation_mark:` | [top](#table-of-contents) | +| [top](#symbols) | :grey_exclamation: | `:grey_exclamation:` | :exclamation: | `:exclamation:` `:heavy_exclamation_mark:` | [top](#table-of-contents) | | [top](#symbols) | :wavy_dash: | `:wavy_dash:` | | | [top](#table-of-contents) | ### Currency @@ -1566,11 +1567,11 @@ Then... | [top](#flags) | :ecuador: | `:ecuador:` | :estonia: | `:estonia:` | [top](#table-of-contents) | | [top](#flags) | :egypt: | `:egypt:` | :western_sahara: | `:western_sahara:` | [top](#table-of-contents) | | [top](#flags) | :eritrea: | `:eritrea:` | :es: | `:es:` | [top](#table-of-contents) | -| [top](#flags) | :ethiopia: | `:ethiopia:` | :eu: | `:eu:`
`:european_union:` | [top](#table-of-contents) | +| [top](#flags) | :ethiopia: | `:ethiopia:` | :eu: | `:eu:` `:european_union:` | [top](#table-of-contents) | | [top](#flags) | :finland: | `:finland:` | :fiji: | `:fiji:` | [top](#table-of-contents) | | [top](#flags) | :falkland_islands: | `:falkland_islands:` | :micronesia: | `:micronesia:` | [top](#table-of-contents) | | [top](#flags) | :faroe_islands: | `:faroe_islands:` | :fr: | `:fr:` | [top](#table-of-contents) | -| [top](#flags) | :gabon: | `:gabon:` | :gb: | `:gb:`
`:uk:` | [top](#table-of-contents) | +| [top](#flags) | :gabon: | `:gabon:` | :gb: | `:gb:` `:uk:` | [top](#table-of-contents) | | [top](#flags) | :grenada: | `:grenada:` | :georgia: | `:georgia:` | [top](#table-of-contents) | | [top](#flags) | :french_guiana: | `:french_guiana:` | :guernsey: | `:guernsey:` | [top](#table-of-contents) | | [top](#flags) | :ghana: | `:ghana:` | :gibraltar: | `:gibraltar:` | [top](#table-of-contents) | diff --git a/content/en/render-hooks/passthrough.md b/content/en/render-hooks/passthrough.md index 3b82116e6..f4b954c24 100755 --- a/content/en/render-hooks/passthrough.md +++ b/content/en/render-hooks/passthrough.md @@ -95,7 +95,7 @@ Hugo populates the `Attributes` map for _block_ passthrough elements. Markdown a ###### Type -(`bool`) The passthrough element type, either `block` or `inline`. +(`string`) The passthrough element type, either `block` or `inline`. ## Example diff --git a/content/en/render-hooks/tables.md b/content/en/render-hooks/tables.md index 41eadad7b..b8a792747 100755 --- a/content/en/render-hooks/tables.md +++ b/content/en/render-hooks/tables.md @@ -82,7 +82,11 @@ In its default configuration, Hugo renders Markdown tables according to the [Git {{- range .THead }} {{- range . }} - + {{- .Text -}} {{- end }} @@ -93,7 +97,11 @@ In its default configuration, Hugo renders Markdown tables according to the [Git {{- range .TBody }} {{- range . }} - + {{- .Text -}} {{- end }} diff --git a/content/en/templates/embedded.md b/content/en/templates/embedded.md index 888f4f342..2c386b5df 100644 --- a/content/en/templates/embedded.md +++ b/content/en/templates/embedded.md @@ -82,7 +82,7 @@ Provide your tracking ID in your configuration file: {{< code-toggle file=hugo >}} [services.googleAnalytics] -ID = "G-MEASUREMENT_ID" +id = "G-MEASUREMENT_ID" {{}} To use this value in your own template, access the configured ID with `{{ site.Config.Services.GoogleAnalytics.ID }}`. diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 0a3ff2b0f..e5650149a 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -199,11 +199,11 @@ Remember that the piped value becomes the final argument to the function or meth You can split a template action over two or more lines. For example, these are equivalent: ```go-html-template -{{ $v := or .Site.Language.LanguageName .Site.Language.Lang }} +{{ $v := or $arg1 $arg2 }} {{ $v := or - .Site.Language.LanguageName - .Site.Language.Lang + $arg1 + $arg2 }} ``` diff --git a/content/en/troubleshooting/faq.md b/content/en/troubleshooting/faq.md index 0fd67264c..3fd48c62d 100644 --- a/content/en/troubleshooting/faq.md +++ b/content/en/troubleshooting/faq.md @@ -16,17 +16,17 @@ Hugo’s [forum] is an active community of users and developers who answer quest These are just a few of the questions most frequently asked by new users. -###### An error message indicates that a feature is not available. Why? +###### An error message indicates that a feature is not available. Why? {#feature-not-available} -Hugo is available in two editions: standard and extended. With the extended edition you can (a) encode to the WebP format when processing images, and (b) transpile Sass to CSS using the embedded LibSass transpiler. The extended edition is not required to use the Dart Sass transpiler. +{{% include "installation/_common/01-editions.md" %}} -When you attempt to perform either of the operations above with the standard edition, Hugo throws this error: +When you attempt to use a feature that is not available in the edition that you installed, Hugo throws this error: ```go-html-template -Error: this feature is not available in your current Hugo version +this feature is not available in this edition of Hugo ``` -To resolve, uninstall the standard edition, then install the extended edition. See the [installation] section for details. +To resolve, install a different edition based on the feature table above. See the [installation] section for details. ###### Why do I see "Page Not Found" when visiting the home page? @@ -61,7 +61,7 @@ A directory with an index.md file is a [leaf bundle]. A directory with an _index [branch bundle]: /getting-started/glossary/#branch-bundle [leaf bundle]: /getting-started/glossary/#leaf-bundle -###### Why is my partial template not rendered as expected? {#foo} +###### Why is my partial template not rendered as expected? You may have neglected to pass the required [context] when calling the partial. For example: @@ -126,7 +126,7 @@ You can trigger content rendering with other methods as well. See next FAQ. ###### Which page methods trigger content rendering? -The following methods on a `Page` object trigger content rendering: `Content`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`. +The following methods on a `Page` object trigger content rendering: `Content`, `ContentWithoutSummary`, `FuzzyWordCount`, `Len`, `Plain`, `PlainWords`, `ReadingTime`, `Summary`, `Truncated`, and `WordCount`. {{% note %}} For other questions please visit the [forum]. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question. diff --git a/data/embedded_template_urls.toml b/data/embedded_template_urls.toml index 7bb2e4eee..38b437fe1 100644 --- a/data/embedded_template_urls.toml +++ b/data/embedded_template_urls.toml @@ -24,6 +24,7 @@ 'render-codeblock-goat' = '_default/_markup/render-codeblock-goat.html' # Shortcodes +'comment' = 'shortcodes/comment.html' 'figure' = 'shortcodes/figure.html' 'gist' = 'shortcodes/gist.html' 'highlight' = 'shortcodes/highlight.html' diff --git a/go.mod b/go.mod index 7fd269069..a9d63af19 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-20240815082608-66ccd383a90f // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20241105120803-6c6e5fb8f8af // indirect diff --git a/go.sum b/go.sum index 4e5e32477..5c0e10736 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,4 @@ -github.com/gohugoio/gohugoioTheme v0.0.0-20240426212330-f38e99e0d88d h1:EaFz80Aqh3Ej20VmUSNe3K+F0NbT8UueXLP/VqkK9Dw= -github.com/gohugoio/gohugoioTheme v0.0.0-20240426212330-f38e99e0d88d/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= -github.com/gohugoio/gohugoioTheme v0.0.0-20240508091825-b23e8e2d2419 h1:cQ/44eDHK0tVImTtSx/9sWWZv+RynH/oB4R7ASbQNAE= -github.com/gohugoio/gohugoioTheme v0.0.0-20240508091825-b23e8e2d2419/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= -github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52 h1:dPJxUU4SevIZ7OS1DIVOrJ7p8I/QM00pXGRfAtKgQmU= -github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= -github.com/gohugoio/gohugoioTheme v0.0.0-20240622143740-53a4bdb8c0fb h1:gOIE1eFXILxCio/QOm3oLYcYmsis2CD099dXbXpjprA= -github.com/gohugoio/gohugoioTheme v0.0.0-20240622143740-53a4bdb8c0fb/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= -github.com/gohugoio/gohugoioTheme v0.0.0-20240623150114-cc7096eab3fd h1:I8X7c0oBRWXy83BL2ODSk7v0xPXDnp2hcFWpCcN+Kyc= -github.com/gohugoio/gohugoioTheme v0.0.0-20240623150114-cc7096eab3fd/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= -github.com/gohugoio/gohugoioTheme v0.0.0-20240728210410-d42c342ce472 h1:AYZUibKKFRBp2VCQpDHW+JmQKvCvyhX7z7/SOLUSCcw= -github.com/gohugoio/gohugoioTheme v0.0.0-20240728210410-d42c342ce472/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= -github.com/gohugoio/gohugoioTheme v0.0.0-20240812175901-cc0ef8e4a14a h1:E3JbZo69eqFBz6B+meQlKyy/ZBZQ73ldVDw8TADiIrQ= -github.com/gohugoio/gohugoioTheme v0.0.0-20240812175901-cc0ef8e4a14a/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= -github.com/gohugoio/gohugoioTheme v0.0.0-20240815082608-66ccd383a90f h1:Eo5z3uUYfmrtIxQvHm388dFOERZwWGTjLuUO6vobzLc= -github.com/gohugoio/gohugoioTheme v0.0.0-20240815082608-66ccd383a90f/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= +github.com/gohugoio/gohugoioTheme v0.0.0-20241105040910-e9dac9458255 h1:kaSc7cVAifWPRzmECr7il0YXgXBM+H2ZrGcNnb03S8k= +github.com/gohugoio/gohugoioTheme v0.0.0-20241105040910-e9dac9458255/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= +github.com/gohugoio/gohugoioTheme v0.0.0-20241105120803-6c6e5fb8f8af h1:H8Oa4AEJs2yz8w1Gq9hEGBJNukkKo05OAaIEsHMd63k= +github.com/gohugoio/gohugoioTheme v0.0.0-20241105120803-6c6e5fb8f8af/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html deleted file mode 100644 index 34476b3d8..000000000 --- a/layouts/shortcodes/img.html +++ /dev/null @@ -1,381 +0,0 @@ -{{- /* -Renders the given image using the given filter, if any. - -@param {string} src The path to the image which must be a remote, page, or global resource. -@param {string} [filter] The filter to apply to the image (case-insensitive). -@param {string} [filterArgs] A comma-delimited list of arguments to pass to the filter. -@param {bool} [example=false] If true, renders a before/after example. -@param {int} [exampleWidth=384] Image width, in pixels, when rendering a before/after example. - -@returns {template.HTML} - -@examples - - {{< img src="zion-national-park.jpg" >}} - - {{< img src="zion-national-park.jpg" alt="Zion National Park" >}} - - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="grayscale" - >}} - - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="process" - filterArgs="resize 400x webp" - >}} - - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="colorize" - filterArgs="180,50,20" - >}} - - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="grayscale" - example=true - >}} - - {{< img - src="zion-national-park.jpg" - alt="Zion National Park" - filter="grayscale" - example=true - exampleWidth=400 - >}} - - When using the text filter, provide the arguments in this order: - - 0. The text - 1. The horizontal offset, in pixels, relative to the left of the image (default 20) - 2. The vertical offset, in pixels, relative to the top of the image (default 20) - 3. The font size in pixels (default 64) - 4. The line height (default 1.2) - 5. The font color (default #ffffff) - - {{< img - src="images/examples/zion-national-park.jpg" - alt="Zion National Park" - filter="Text" - filterArgs="Zion National Park,25,250,56" - example=true - >}} - - When using the padding filter, provide all arguments in this order: - - 0. Padding top - 1. Padding right - 2. Padding bottom - 3. Padding right - 4. Canvas color - - {{< img - src="images/examples/zion-national-park.jpg" - alt="Zion National Park" - filter="Padding" - filterArgs="20,50,20,50,#0705" - example=true - >}} - -*/}} - -{{- /* Initialize. */}} -{{- $alt := "" }} -{{- $src := "" }} -{{- $filter := "" }} -{{- $filterArgs := slice }} -{{- $example := false }} -{{- $exampleWidth := 384 }} - -{{- /* Default values to use with the text filter. */}} -{{ $textFilterOpts := dict - "xOffset" 20 - "yOffset" 20 - "fontSize" 64 - "lineHeight" 1.2 - "fontColor" "#ffffff" - "fontPath" "https://github.com/google/fonts/raw/main/ofl/lato/Lato-Regular.ttf" -}} - -{{- /* Get and validate parameters. */}} -{{- with .Get "alt" }} - {{- $alt = .}} -{{- end }} - -{{- with .Get "src" }} - {{- $src = . }} -{{- else }} - {{- errorf "The %q shortcode requires a file parameter. See %s" .Name .Position }} -{{- end }} - -{{- with .Get "filter" }} - {{- $filter = . | lower }} -{{- end }} - -{{- $validFilters := slice - "autoorient" "brightness" "colorbalance" "colorize" "contrast" "dither" - "gamma" "gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay" - "padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text" - "unsharpmask" -}} - -{{- with $filter }} - {{- if not (in $validFilters .) }} - {{- errorf "The filter passed to the %q shortcode is invalid. The filter must be one of %s. See %s" $.Name (delimit $validFilters ", " ", or ") $.Position }} - {{- end }} -{{- end }} - -{{- with .Get "filterArgs" }} - {{- $filterArgs = split . "," }} - {{- $filterArgs = apply $filterArgs "trim" "." " " }} -{{- end }} - -{{- if in (slice "false" false 0) (.Get "example") }} - {{- $example = false }} -{{- else if in (slice "true" true 1) (.Get "example")}} - {{- $example = true }} -{{- end }} - -{{- with .Get "exampleWidth" }} - {{- $exampleWidth = . | int }} -{{- end }} - -{{- /* Get image. */}} -{{- $ctx := dict "page" .Page "src" $src "name" .Name "position" .Position }} -{{- $i := partial "inline/get-resource.html" $ctx }} - -{{- /* Resize if rendering before/after examples. */}} -{{- if $example }} - {{- $i = $i.Resize (printf "%dx" $exampleWidth) }} -{{- end }} - -{{- /* Create filter. */}} -{{- $f := "" }} -{{- $ctx := dict "filter" $filter "args" $filterArgs "name" .Name "position" .Position }} -{{- if eq $filter "autoorient" }} - {{- $ctx = merge $ctx (dict "argsRequired" 0) }} - {{- template "validate-arg-count" $ctx }} - {{- $f = images.AutoOrient }} -{{- else if eq $filter "brightness" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Brightness (index $filterArgs 0) }} -{{- else if eq $filter "colorbalance" }} - {{- $ctx = merge $ctx (dict "argsRequired" 3) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "percentage red" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }} - {{- template "validate-arg-value" $ctx }} - {{- $ctx = merge $ctx (dict "argName" "percentage green" "argValue" (index $filterArgs 1) "min" -100 "max" 500) }} - {{- template "validate-arg-value" $ctx }} - {{- $ctx = merge $ctx (dict "argName" "percentage blue" "argValue" (index $filterArgs 2) "min" -100 "max" 500) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.ColorBalance (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }} -{{- else if eq $filter "colorize" }} - {{- $ctx = merge $ctx (dict "argsRequired" 3) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "hue" "argValue" (index $filterArgs 0) "min" 0 "max" 360) }} - {{- template "validate-arg-value" $ctx }} - {{- $ctx = merge $ctx (dict "argName" "saturation" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }} - {{- template "validate-arg-value" $ctx }} - {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 2) "min" 0 "max" 100) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Colorize (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }} -{{- else if eq $filter "contrast" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 100) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Contrast (index $filterArgs 0) }} -{{- else if eq $filter "dither" }} - {{- $f = images.Dither }} -{{- else if eq $filter "gamma" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "gamma" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Gamma (index $filterArgs 0) }} -{{- else if eq $filter "gaussianblur" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.GaussianBlur (index $filterArgs 0) }} -{{- else if eq $filter "grayscale" }} - {{- $ctx = merge $ctx (dict "argsRequired" 0) }} - {{- template "validate-arg-count" $ctx }} - {{- $f = images.Grayscale }} -{{- else if eq $filter "hue" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "shift" "argValue" (index $filterArgs 0) "min" -180 "max" 180) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Hue (index $filterArgs 0) }} -{{- else if eq $filter "invert" }} - {{- $ctx = merge $ctx (dict "argsRequired" 0) }} - {{- template "validate-arg-count" $ctx }} - {{- $f = images.Invert }} -{{- else if eq $filter "opacity" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "opacity" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Opacity (index $filterArgs 0) }} -{{- else if eq $filter "overlay" }} - {{- $ctx = merge $ctx (dict "argsRequired" 3) }} - {{- template "validate-arg-count" $ctx }} - {{- $ctx := dict "src" (index $filterArgs 0) "name" .Name "position" .Position }} - {{- $overlayImg := partial "inline/get-resource.html" $ctx }} - {{- $f = images.Overlay $overlayImg (index $filterArgs 1 | float ) (index $filterArgs 2 | float) }} -{{- else if eq $filter "padding" }} - {{- $ctx = merge $ctx (dict "argsRequired" 5) }} - {{- template "validate-arg-count" $ctx }} - {{- $f = images.Padding - (index $filterArgs 0 | int) - (index $filterArgs 1 | int) - (index $filterArgs 2 | int) - (index $filterArgs 3 | int) - (index $filterArgs 4) - }} -{{- else if eq $filter "pixelate" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "size" "argValue" (index $filterArgs 0) "min" 0 "max" 1000) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Pixelate (index $filterArgs 0) }} -{{- else if eq $filter "process" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $f = images.Process (index $filterArgs 0) }} -{{- else if eq $filter "saturation" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" -100 "max" 500) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Saturation (index $filterArgs 0) }} -{{- else if eq $filter "sepia" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "percentage" "argValue" (index $filterArgs 0) "min" 0 "max" 100) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Sepia (index $filterArgs 0) }} -{{- else if eq $filter "sigmoid" }} - {{- $ctx = merge $ctx (dict "argsRequired" 2) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "midpoint" "argValue" (index $filterArgs 0) "min" 0 "max" 1) }} - {{- template "validate-arg-value" $ctx }} - {{- $ctx = merge $ctx (dict "argName" "factor" "argValue" (index $filterArgs 1) "min" -10 "max" 10) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.Sigmoid (index $filterArgs 0) (index $filterArgs 1) }} -{{- else if eq $filter "text" }} - {{- $ctx = merge $ctx (dict "argsRequired" 1) }} - {{- template "validate-arg-count" $ctx }} - {{- $ctx := dict "src" $textFilterOpts.fontPath "name" .Name "position" .Position }} - {{- $font := or (partial "inline/get-resource.html" $ctx) }} - {{- $fontSize := or (index $filterArgs 3 | int) $textFilterOpts.fontSize }} - {{- $lineHeight := math.Max (or (index $filterArgs 4 | float) $textFilterOpts.lineHeight) 1 }} - {{- $opts := dict - "x" (or (index $filterArgs 1 | int) $textFilterOpts.xOffset) - "y" (or (index $filterArgs 2 | int) $textFilterOpts.yOffset) - "size" $fontSize - "linespacing" (mul (sub $lineHeight 1) $fontSize) - "color" (or (index $filterArgs 5) $textFilterOpts.fontColor) - "font" $font - }} - {{- $f = images.Text (index $filterArgs 0) $opts }} -{{- else if eq $filter "unsharpmask" }} - {{- $ctx = merge $ctx (dict "argsRequired" 3) }} - {{- template "validate-arg-count" $ctx }} - {{- $filterArgs = apply $filterArgs "float" "." }} - {{- $ctx = merge $ctx (dict "argName" "sigma" "argValue" (index $filterArgs 0) "min" 0 "max" 500) }} - {{- template "validate-arg-value" $ctx }} - {{- $ctx = merge $ctx (dict "argName" "amount" "argValue" (index $filterArgs 1) "min" 0 "max" 100) }} - {{- template "validate-arg-value" $ctx }} - {{- $ctx = merge $ctx (dict "argName" "threshold" "argValue" (index $filterArgs 2) "min" 0 "max" 1) }} - {{- template "validate-arg-value" $ctx }} - {{- $f = images.UnsharpMask (index $filterArgs 0) (index $filterArgs 1) (index $filterArgs 2) }} -{{- end }} - -{{- /* Apply filter. */}} -{{- $fi := $i }} -{{- with $f }} - {{- $fi = $i.Filter . }} -{{- end }} - -{{- /* Render. */}} -{{- if $example }} -

Original

- {{ $alt }} -

Processed

- {{ $alt }} -{{- else -}} - {{ $alt }} -{{- end }} - -{{- define "validate-arg-count" }} - {{- $msg := "When using the %q filter, the %q shortcode requires an args parameter with %d %s. See %s" }} - {{- if lt (len .args) .argsRequired }} - {{- $text := "values" }} - {{- if eq 1 .argsRequired }} - {{- $text = "value" }} - {{- end }} - {{- errorf $msg .filter .name .argsRequired $text .position }} - {{- end }} -{{- end }} - -{{- define "validate-arg-value" }} - {{- $msg := "The %q argument passed to the %q shortcode is invalid. Expected a value in the range [%v,%v], but received %v. See %s" }} - {{- if or (lt .argValue .min) (gt .argValue .max) }} - {{- errorf $msg .argName .name .min .max .argValue .position }} - {{- end }} -{{- end }} - -{{- define "partials/inline/get-resource.html" }} - {{- $r := "" }} - {{- $u := urls.Parse .src }} - {{- $msg := "The %q shortcode was unable to resolve %s. See %s" }} - {{- if $u.IsAbs }} - {{- with resources.GetRemote $u.String }} - {{- with .Err }} - {{- errorf "%s" }} - {{- else }} - {{- /* This is a remote resource. */}} - {{- $r = . }} - {{- end }} - {{- else }} - {{- errorf $msg $.name $u.String $.position }} - {{- end }} - {{- else }} - {{- with .page.Resources.Get (strings.TrimPrefix "./" $u.Path) }} - {{- /* This is a page resource. */}} - {{- $r = . }} - {{- else }} - {{- with resources.Get $u.Path }} - {{- /* This is a global resource. */}} - {{- $r = . }} - {{- else }} - {{- errorf $msg $.name $u.Path $.position }} - {{- end }} - {{- end }} - {{- end }} - {{- return $r}} -{{- end -}} diff --git a/netlify.toml b/netlify.toml index 2780fe747..5079ac44d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ command = "hugo --gc --minify" [build.environment] - HUGO_VERSION = "0.134.0" + HUGO_VERSION = "0.138.0" [context.production.environment] HUGO_ENV = "production"