Skip to content

Commit b5543d5

Browse files
committed
content: Updates for v0.155.0
Closes gohugoio#3347
1 parent 301fa20 commit b5543d5

File tree

57 files changed

+702
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+702
-276
lines changed

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
"dring",
182182
"fleqn",
183183
"inor",
184+
"iptc",
184185
"jausten",
185186
"jdoe",
186187
"jsmith",

.markdownlint-cli2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ config:
8080
url_inline: false
8181
MD055:
8282
style: consistent
83-
MD056: true
83+
MD056: false # interferes with Markdown attributes
8484
# MD057 deprecated
8585
MD058: true
8686
MD059:

content/en/_common/methods/resource/processing-spec.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ action
1010
: Specify one of `crop`, `fill`, `fit`, or `resize`. This is applicable to the [`Process`][] method and the [`images.Process`][] filter. If you specify an action, you must also provide dimensions.
1111

1212
anchor
13-
: The focal point of the crop box when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. This defaults to the [`anchor`][] parameter in your site configuration. The `Smart` option identifies the most interesting area of the image based on the smart cropping algorithm implemented in the [`smartcrop.js`][] library.
13+
: The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`smartcrop.js`][] library to identify the most interesting area of the image. This defaults to the [`anchor`][] parameter in your site configuration.
1414

1515
background color
16-
: The background color of the resulting image. This applies when converting an image with transparency to a format that does not support it, such as when converting from PNG to JPEG, or when rotating an image by a non-orthogonal angle into a non-transparent format. In these cases, this color fills the empty space created as the image extents increase to fit the rotated corners. The value must be an RGB [hexadecimal color][], defaulting to the [`bgColor`][] parameter in your site configuration.
16+
: The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the processing specification. The value must be an RGB [hexadecimal color][]. This defaults to the [`bgColor`][] parameter in your site configuration.
1717

1818
compression
1919
: {{< new-in 0.153.5 />}}
20-
: The compression method used when encoding an image. Valid options include `lossless` or `lossy`. The `lossless` method is only applicable to WebP images. This defaults to the [`compression`][] parameter in your site configuration.
20+
: The encoding strategy used for the image. Options are `lossy` or `lossless`. Note that `lossless` is only supported by the WebP format. This defaults to the [`compression`][] parameter in your site configuration.
2121

2222
dimensions
2323
: The dimensions of the resulting image, in pixels. The format is `WIDTHxHEIGHT` where `WIDTH` and `HEIGHT` are whole numbers. When resizing an image, you may specify only the width (such as `600x`) or only the height (such as `x400`) for proportional scaling. Specifying both width and height when resizing an image may result in non-proportional scaling. When cropping, fitting, or filling, you must provide both width and height such as `600x400`.
@@ -26,7 +26,7 @@ format
2626
: The format of the resulting image. Valid options include `bmp`, `gif`, `jpeg`, `png`, `tiff`, or `webp`. This defaults to the format of the source image.
2727

2828
hint
29-
: The encoding preset used when processing WebP images, equivalent to the `-preset` flag for the [`cwebp`][] encoder. Valid options include `drawing`, `icon`, `photo`, `picture`, or `text`. This defaults to the [`hint`][] parameter in your site configuration.
29+
: The encoding preset used when processing WebP images, equivalent to the `-preset` flag for the [`cwebp`][] CLI. Valid options include `drawing`, `icon`, `photo`, `picture`, or `text`. This defaults to the [`hint`][] parameter in your site configuration.
3030

3131
Value|Example
3232
:--|:--
@@ -37,10 +37,10 @@ hint
3737
`text`|Image that is primarily text
3838

3939
quality
40-
: The quality of the resulting image, applicable to JPEG and WebP images when using lossy [compression](#compression). The format is `qQUALITY` where `QUALITY` is a whole number between `1` and `100`, inclusive. This defaults to the [`quality`][] parameter in your site configuration.
40+
: The visual fidelity of the image, applicable to JPEG and WebP formats when using `lossy` compression. The format is `qQUALITY` where `QUALITY` is a whole number between `1` and `100`, inclusive. Lower numbers prioritize smaller file size, while higher numbers prioritize visual clarity. This defaults to the [`quality`][] parameter in your site configuration.
4141

4242
resampling filter
43-
: The filter used to calculate new pixels when resizing, fitting, or filling an image. Common options include `box`, `lanczos`, `catmullRom`, `mitchellNetravali`, `linear`, or `nearestNeighbor`. This defaults to the [`resampleFilter`][] parameter in your site configuration.
43+
: The algorithm used to calculate new pixels when resizing, fitting, or filling an image. Common options include `box`, `lanczos`, `catmullRom`, `mitchellNetravali`, `linear`, or `nearestNeighbor`. This defaults to the [`resampleFilter`][] parameter in your site configuration.
4444

4545
Filter|Description
4646
:--|:--
@@ -54,20 +54,20 @@ resampling filter
5454
Refer to the [source documentation][] for a complete list of available resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters.
5555

5656
rotation
57-
: The number of whole degrees to rotate an image counter-clockwise. The format is `rDEGREES` where `DEGREES` is a whole number. Hugo performs rotation before any other transformations, so your target dimensions and any anchor point should refer to the image orientation after rotation. Use `r90`, `r180`, or `r270` for orthogonal rotations, or arbitrary angles such as `r45`. To rotate clockwise, use a negative number such as `r-45`. To automatically rotate an image based on its EXIF orientation tag, use the [`images.AutoOrient`][] filter instead of manual rotation.
57+
: The number of whole degrees to rotate an image counter-clockwise. The format is `rDEGREES` where `DEGREES` is a whole number. Hugo performs rotation before any other transformations, so your [target dimensions](#dimensions) and any [anchor](#anchor) should refer to the image orientation after rotation. Use `r90`, `r180`, or `r270` for orthogonal rotations, or arbitrary angles such as `r45`. To rotate clockwise, use a negative number such as `r-45`. To automatically rotate an image based on its Exif orientation tag, use the [`images.AutoOrient`][] filter instead of manual rotation.
5858

59-
Rotating by non-orthogonal values increases the image extents to fit the rotated corners; the resulting empty space is transparent for formats supporting alpha channels, or filled with a background color. This background color defaults to the [`bgColor`][] parameter in your site configuration unless you include a [background color](#background-color)
59+
Rotating by non-orthogonal values increases the image extents to fit the rotated corners. For formats supporting alpha channels such as PNG or WebP, this resulting empty space is transparent by default. If the target format does not support transparency such as JPEG, or if you explicitly specify a [background color](#background-color) in the processing specification, the space is filled. If a color is required but not specified in the processing string, it defaults to the [`bgColor`][] parameter in your site configuration.
6060

61-
[`anchor`]: /configuration/imaging/#processing-options
62-
[`bgcolor`]: /configuration/imaging/#processing-options
63-
[`compression`]: /configuration/imaging/#processing-options
61+
[`anchor`]: /configuration/imaging/#anchor
62+
[`bgcolor`]: /configuration/imaging/#bgcolor
63+
[`compression`]: /configuration/imaging/#compression
6464
[`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
65-
[`hint`]: /configuration/imaging/#processing-options
65+
[`hint`]: /configuration/imaging/#hint
6666
[`images.AutoOrient`]: /functions/images/autoorient/
6767
[`images.Process`]: /functions/images/process/
6868
[`Process`]: /methods/resource/process
69-
[`quality`]: /configuration/imaging/#processing-options
70-
[`resampleFilter`]: /configuration/imaging/#processing-options
69+
[`quality`]: /configuration/imaging/#quality
70+
[`resampleFilter`]: /configuration/imaging/#resamplefilter
7171
[`smartcrop.js`]: https://github.com/jwagner/smartcrop.js
7272
[hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
7373
[source documentation]: https://github.com/disintegration/imaging#image-resizing

content/en/about/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ weight: 20
8181
## Asset pipelines
8282

8383
[Image processing]
84-
: Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data.
84+
: Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract metadata.
8585

8686
[JavaScript bundling]
8787
: Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing.

content/en/configuration/all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ ignoreLogs
148148
: (`[]string`) A slice of message identifiers corresponding to warnings and errors you wish to suppress. See [`erroridf`][] and [`warnidf`][].
149149

150150
ignoreVendorPaths
151-
: (`string`) A [glob](g) pattern matching the module paths to exclude from the `_vendor` directory.
151+
: (`string`) A [glob pattern](g) matching the module paths to exclude from the `_vendor` directory.
152152

153153
imaging
154154
: See [configure imaging][].

content/en/configuration/caches.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,57 @@ This is the default configuration:
1010

1111
{{< code-toggle config=caches />}}
1212

13+
## Purpose
14+
15+
Hugo uses file caches to store data on disk, avoiding repeated operations within the same build and persisting data from one build to the next.
16+
17+
assets
18+
: Caches processed CSS and Sass resources.
19+
20+
getcsv
21+
: Caches the results of the [`data.GetCSV`][] function. Note that the `data.GetCSV` function was deprecated in v0.123.0 in favor of the [`resources.GetRemote`][] function.
22+
23+
getjson
24+
: Caches the results of the [`data.GetJSON`][] function. Note that the `data.GetJSON` function was deprecated in v0.123.0 in favor of the [`resources.GetRemote`][] function.
25+
26+
getresource
27+
: Caches files fetched from remote URLs via the [`resources.GetRemote`][] function.
28+
29+
images
30+
: Caches processed images.
31+
32+
misc
33+
: Caches miscellaneous data.
34+
35+
modulequeries
36+
: Caches the results of module resolution queries.
37+
38+
modules
39+
: Caches downloaded modules.
40+
1341
## Keys
1442

1543
dir
16-
: (`string`) The absolute file system path where the cached files will be stored. You can begin the path with the `:cacheDir` or `:resourceDir` token. These tokens will be replaced with the actual configured cache directory and resource directory paths, respectively.
44+
: (`string`) The absolute file system path where Hugo stores the cached files. You can begin the path with the `:cacheDir` or `:resourceDir` [tokens](#tokens) to anchor the cache to specific system or project locations.
1745

1846
maxAge
19-
: (`string`) The [duration](g) a cached entry remains valid before being evicted. A value of `0` disables the cache. A value of `-1` means the cache entry never expires (the default).
47+
: (`string`) The duration a cached entry remains valid before being evicted, expressed as a [duration](g). A value of `0` disables the cache for that key, and a value of `-1` means the cache entry never expires. Default is `-1`.
2048

2149
## Tokens
2250

2351
`:cacheDir`
24-
: (`string`) The designated cache directory. See&nbsp;[details](/configuration/all/#cachedir).
52+
: (`string`) The designated cache directory. See [details](/configuration/all/#cachedir).
2553

2654
`:project`
27-
: (`string`) The base directory name of the current Hugo project. By default, this ensures each project has isolated file caches, so running `hugo --gc` will only affect the current project's cache and not those of other Hugo projects on the same machine.
55+
: (`string`) The base directory name of the current Hugo project. This ensures isolated file caches for each project, preventing the `hugo --gc` command from affecting other projects on the same machine.
2856

2957
`:resourceDir`
30-
: (`string`) The designated directory for caching output from [asset pipelines](g). See&nbsp;[details](/configuration/all/#resourcedir).
58+
: (`string`) The designated directory for caching output from [asset pipelines](g). See [details](/configuration/all/#resourcedir).
59+
60+
## Garbage collection
61+
62+
As you modify your site or change your configuration, cached files from previous builds may remain on disk, consuming unnecessary space. Use the `hugo --gc` command to remove these expired or unused entries from the file cache.
63+
64+
[`data.GetJSON`]: /functions/data/getjson/
65+
[`data.GetCSV`]: /functions/data/getcsv/
66+
[`resources.GetRemote`]: /functions/resources/getremote/

content/en/configuration/cascade.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ path = '{/articles,/articles/**}'
4040
Use any combination of these keywords to target pages and/or environments:
4141

4242
environment
43-
: (`string`) A [glob](g) pattern matching the build [environment](g). For example: `{staging,production}`.
43+
: (`string`) A [glob pattern](g) matching the build [environment](g). For example: `{staging,production}`.
4444

4545
kind
46-
: (`string`) A [glob](g) pattern matching the [page kind](g). For example: `{taxonomy,term}`.
46+
: (`string`) A [glob pattern](g) matching the [page kind](g). For example: `{taxonomy,term}`.
4747

4848
lang
49-
: (`string`) A [glob](g) pattern matching the [page language]. For example: `{en,de}`.
49+
: (`string`) A [glob pattern](g) matching the [page language]. For example: `{en,de}`.
5050

5151
path
52-
: (`string`) A [glob](g) pattern matching the page's [logical path](g). For example: `{/books,/books/**}`.
52+
: (`string`) A [glob pattern](g) matching the page's [logical path](g). For example: `{/books,/books/**}`.
5353

5454
## Array
5555

content/en/configuration/deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ cloudFrontDistributionID
5353
: (`string`) The CloudFront Distribution ID, applicable if you are using the Amazon Web Services CloudFront CDN. Hugo will invalidate the CDN when deploying this target.
5454

5555
exclude
56-
: (`string`) A [glob](g) pattern matching files to exclude when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted.
56+
: (`string`) A [glob pattern](g) matching files to exclude when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted.
5757

5858
googleCloudCDNOrigin
5959
: (`string`) The Google Cloud project and CDN origin to invalidate when deploying this target, specified as `<project>/<origin>`.
6060

6161
include
62-
: (`string`) A [glob](g) pattern matching files to include when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted.
62+
: (`string`) A [glob pattern](g) matching files to include when deploying to this target. Local files failing the include/exclude filters are not uploaded, and remote files failing these filters are not deleted.
6363

6464
name
6565
: (`string`) An arbitrary name for this target.

content/en/configuration/http-cache.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ respectCacheControlNoStoreInResponse
5757
: (`bool`) Whether to respect the `no-store` directive in the server's `Cache-Control` response header when fetching remote resources via the [`resources.GetRemote`][] function. Default is `false`.
5858

5959
cache.for.excludes
60-
: (`string`) A list of [glob](g) patterns to exclude from caching. In its default configuration HTTP caching excludes all files.
60+
: (`[]string`) A slice of [glob patterns](g) to exclude from caching. In its default configuration HTTP caching excludes all files.
6161

6262
cache.for.includes
63-
: (`string`) A list of [glob](g) patterns to cache.
63+
: (`[]string`) A slice of [glob patterns](g) to cache.
6464

6565
polls
6666
: A slice of polling configurations.
@@ -75,10 +75,10 @@ polls.low
7575
: (`string`) The minimum polling interval expressed as a [duration](g). This is used after a recent change and gradually increases towards `polls.high`. Default is `0s`.
7676

7777
polls.for.excludes
78-
: (`string`) A list of [glob](g) patterns to exclude from polling for this configuration.
78+
: (`[]string`) A slice of [glob patterns](g) to exclude from polling for this configuration.
7979

8080
polls.for.includes
81-
: (`string`) A list of [glob](g) patterns to include in polling for this configuration.
81+
: (`[]string`) A slice of [glob patterns](g) to include in polling for this configuration.
8282

8383
## HTTP polling
8484

@@ -109,10 +109,10 @@ polls.low
109109
: (`string`) The minimum polling interval expressed as a [duration](g). This is used after a recent change and gradually increases towards `polls.high`. Default is `0s`.
110110

111111
polls.for.excludes
112-
: (`string`) A list of [glob](g) patterns to exclude from polling for this configuration.
112+
: (`[]string`) A list of [glob patterns](g) to exclude from polling for this configuration.
113113

114114
polls.for.includes
115-
: (`string`) A list of [glob](g) patterns to include in polling for this configuration.
115+
: (`[]string`) A list of [glob patterns](g) to include in polling for this configuration.
116116

117117
## Behavior
118118

0 commit comments

Comments
 (0)