Skip to content

Commit

Permalink
Miscellaneous edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Dec 5, 2023
1 parent 8c3700d commit e4eb484
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion content/en/content-management/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
{{</ code-toggle >}}
Expand Down
8 changes: 4 additions & 4 deletions content/en/functions/resources/ToCSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion content/en/functions/transform/XMLEscape.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]:

- `"``&#34;`
Expand All @@ -24,7 +26,7 @@ The `transform.XMLEscape` function removes [disallowed characters] as defined in
For example:

```go-html-template
transform.XMLEscape "<p>abc</p>" → &lt;p&gt;abc&lt;/p&gt;
{{ transform.XMLEscape "<p>abc</p>" }} → &lt;p&gt;abc&lt;/p&gt;
```

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:
Expand Down
18 changes: 11 additions & 7 deletions content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 >}}
Expand All @@ -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 >}}
Expand All @@ -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 >}}
Expand Down Expand Up @@ -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 />}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions content/en/hosting-and-deployment/hosting-on-gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions content/en/hosting-and-deployment/hosting-on-netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down
4 changes: 2 additions & 2 deletions content/en/methods/page/Fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<pre>{{ .Fragments.Headings | jsonify (dict "indent" " ") }}</pre>
```

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
<pre>{{ .Fragments.HeadingsMap | jsonify (dict "indent" " ") }}</pre>
Expand Down
6 changes: 3 additions & 3 deletions content/en/templates/internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
{{</ code-toggle >}}
Expand All @@ -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'
{{</ code-toggle >}}
Expand Down Expand Up @@ -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"
{{</ code-toggle >}}
Expand Down

0 comments on commit e4eb484

Please sign in to comment.