diff --git a/content/en/content-management/comments.md b/content/en/content-management/comments.md index 9985dd1e69..e819ce7d66 100644 --- a/content/en/content-management/comments.md +++ b/content/en/content-management/comments.md @@ -24,7 +24,7 @@ Hugo comes with all the code you need to load Disqus into your templates. Before Disqus comments require you set a single value in your [site's configuration file][configuration] like so: -{{< code-toggle file="hugo" >}} +{{< code-toggle file=hugo >}} [services.disqus] shortname = 'your-disqus-shortname' {{}} diff --git a/content/en/functions/resources/ToCSS.md b/content/en/functions/resources/ToCSS.md index 872bf996b8..d226f26880 100644 --- a/content/en/functions/resources/ToCSS.md +++ b/content/en/functions/resources/ToCSS.md @@ -139,8 +139,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file ```yaml variables: - HUGO_VERSION: 0.115.1 - DART_SASS_VERSION: 1.63.6 + HUGO_VERSION: 0.121.0 + DART_SASS_VERSION: 1.69.5 GIT_DEPTH: 0 GIT_STRATEGY: clone GIT_SUBMODULE_STRATEGY: recursive @@ -173,8 +173,8 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should ```toml [build.environment] -HUGO_VERSION = "0.115.1" -DART_SASS_VERSION = "1.63.6" +HUGO_VERSION = "0.121.0" +DART_SASS_VERSION = "1.69.5" TZ = "America/Los_Angeles" [build] diff --git a/content/en/functions/transform/XMLEscape.md b/content/en/functions/transform/XMLEscape.md index 17ed2a13d1..d0aafc4bde 100644 --- a/content/en/functions/transform/XMLEscape.md +++ b/content/en/functions/transform/XMLEscape.md @@ -10,6 +10,8 @@ action: signatures: [transform.XMLEscape INPUT] --- +{{< new-in 0.121.0 >}} + The `transform.XMLEscape` function removes [disallowed characters] as defined in the XML specification, then escapes the result by replacing the following characters with [HTML entities]: - `"` → `"` @@ -24,7 +26,7 @@ The `transform.XMLEscape` function removes [disallowed characters] as defined in For example: ```go-html-template -transform.XMLEscape "

abc

" → <p>abc</p> +{{ transform.XMLEscape "

abc

" }} → <p>abc</p> ``` When using `transform.XMLEscape` in a template rendered by Go's [html/template] package, declare the string to be safe HTML to avoid double escaping. For example, in an RSS template: diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index d1bea2e769..13aa926ca4 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -44,13 +44,13 @@ In addition to using a single site configuration file, one can use the `configDi - Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc... - Each file's content must be top-level, for example: -{{< code-toggle file="hugo" copy=false >}} +{{< code-toggle file=hugo >}} [Params] - foo = "bar" +foo = 'bar' {{< /code-toggle >}} -{{< code-toggle file="params" copy=false >}} -foo = "bar" +{{< code-toggle file=params >}} +foo = 'bar' {{< /code-toggle >}} - Each directory holds a group of files containing settings unique to an environment. @@ -78,7 +78,7 @@ Let's take an example to understand this better. Let's say you are using Google [Google tag ID]: https://support.google.com/tagmanager/answer/12326985?hl=en -{{< code-toggle file=hugo copy=false >}} +{{< code-toggle file=hugo >}} [services.googleAnalytics] ID = 'G-XXXXXXXXX' {{< /code-toggle >}} @@ -103,7 +103,7 @@ To satisfy these requirements, configure your site as follows: Include this section only: - {{< code-toggle file=hugo copy=false >}} + {{< code-toggle file=hugo >}} [services.googleAnalytics] ID = 'G-PPPPPPPPP' {{< /code-toggle >}} @@ -116,7 +116,7 @@ To satisfy these requirements, configure your site as follows: Include this section only: - {{< code-toggle file=hugo copy=false >}} + {{< code-toggle file=hugo >}} [services.googleAnalytics] ID = 'G-SSSSSSSSS' {{< /code-toggle >}} @@ -789,6 +789,10 @@ Hugo v0.20 introduced the ability to render your content to multiple output form ## Configure minify +See the [tdewolff/minify] project page for details. + +[tdewolff/minify]: https://github.com/tdewolff/minify + Default configuration: {{< code-toggle config=minify />}} 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 a7e57a0915..24bd31a257 100644 --- a/content/en/hosting-and-deployment/hosting-on-github/index.md +++ b/content/en/hosting-and-deployment/hosting-on-github/index.md @@ -99,7 +99,7 @@ jobs: build: runs-on: ubuntu-latest env: - HUGO_VERSION: 0.120.4 + HUGO_VERSION: 0.121.0 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 dce306253c..74b1fa1544 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.64.1 - HUGO_VERSION: 0.115.4 + DART_SASS_VERSION: 1.69.5 + HUGO_VERSION: 0.121.0 NODE_VERSION: 20.x GIT_DEPTH: 0 GIT_STRATEGY: clone diff --git a/content/en/hosting-and-deployment/hosting-on-netlify.md b/content/en/hosting-and-deployment/hosting-on-netlify.md index 9b01f4cd87..ac62027004 100644 --- a/content/en/hosting-and-deployment/hosting-on-netlify.md +++ b/content/en/hosting-and-deployment/hosting-on-netlify.md @@ -57,14 +57,14 @@ For production: {{< code file=netlify.toml >}} [context.production.environment] - HUGO_VERSION = "0.115.4" + HUGO_VERSION = "0.121.0" {{< /code >}} For testing: {{< code file=netlify.toml >}} [context.deploy-preview.environment] - HUGO_VERSION = "0.115.4" + HUGO_VERSION = "0.121.0" {{< /code >}} The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`: diff --git a/content/en/methods/page/Fragments.md b/content/en/methods/page/Fragments.md index bae1c7d039..89f82d2ce1 100644 --- a/content/en/methods/page/Fragments.md +++ b/content/en/methods/page/Fragments.md @@ -28,14 +28,14 @@ Use the `Fragments` method on a `Page` object to create a table of contents with ## Methods Headings -: (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Title` and `Headings`. To inspect the data structure: +: (`map`) A nested map of all headings on the page. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure: ```go-html-template
{{ .Fragments.Headings | jsonify (dict "indent" "  ") }}
``` HeadingsMap -: (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Title` and `Headings`. To inspect the data structure: +: (`slice`) A slice of maps of all headings on the page, with first-level keys for each heading. Each map contains the following keys: `ID`, `Level`, `Title` and `Headings`. To inspect the data structure: ```go-html-template
{{ .Fragments.HeadingsMap | jsonify (dict "indent" "  ") }}
diff --git a/content/en/templates/internal.md b/content/en/templates/internal.md index 0785318ab3..cc7fe155ef 100644 --- a/content/en/templates/internal.md +++ b/content/en/templates/internal.md @@ -26,7 +26,7 @@ Hugo ships with an internal template supporting [Google Analytics 4]. Provide your tracking ID in your configuration file: **Google Analytics 4 (gtag.js)** -{{< code-toggle file="hugo" >}} +{{< code-toggle file=hugo >}} [services.googleAnalytics] ID = "G-MEASUREMENT_ID" {{}} @@ -49,7 +49,7 @@ Hugo also ships with an internal template for [Disqus comments][disqus], a popul To use Hugo's Disqus template, first set up a single configuration value: -{{< code-toggle file="hugo" >}} +{{< code-toggle file=hugo >}} [services.disqus] shortname = 'your-disqus-shortname' {{}} @@ -187,7 +187,7 @@ Hugo uses the page title and description for the card's title and description fi Set the value of `twitter:site` in your site configuration: -{{< code-toggle file="hugo" copy=false >}} +{{< code-toggle file=hugo >}} [params.social] twitter = "GoHugoIO" {{}}