Merge commit 'e7afabb927a79b179ae57013fd5f49e32829671e'

This commit is contained in:
Bjørn Erik Pedersen
2026-03-23 18:25:55 +01:00
162 changed files with 1870 additions and 1742 deletions
+52 -26
View File
@@ -1038,7 +1038,6 @@ chroma:
- zig
Name: Zig
styles:
- RPGLE
- abap
- algol
- algol_nu
@@ -1091,6 +1090,7 @@ chroma:
- rose-pine
- rose-pine-dawn
- rose-pine-moon
- rpgle
- rrt
- solarized-dark
- solarized-dark256
@@ -2208,12 +2208,12 @@ tpl:
Description: |-
Append appends args up to the last one to the slice in the last argument.
This construct allows template constructs like this:
{{ $pages = $pages | append $p2 $p1 }}
Note that with 2 arguments where both are slices of the same type,
the first slice will be appended to the second:
{{ $pages = $pages | append .Site.RegularPages }}
Examples: []
Apply:
@@ -2234,11 +2234,11 @@ tpl:
Description: |-
Complement gives the elements in the last element of ls that are not in
any of the others.
All elements of ls must be slices or arrays of comparable types.
The reasoning behind this rather clumsy API is so we can do this in the templates:
{{ $c := .Pages | complement $last4 }}
Examples:
- - '{{ slice "a" "b" "c" "d" "e" "f" | complement (slice "b" "c") (slice "d" "e") }}'
@@ -2313,9 +2313,9 @@ tpl:
Index returns the result of indexing its first argument by the following
arguments. Thus "index x 1 2 3" is, in Go syntax, x[1][2][3]. Each
indexed item must be a map, slice, or array.
Adapted from Go stdlib src/text/template/funcs.go.
We deviate from the stdlib mostly because of https://github.com/golang/go/issues/14751.
Examples: []
Intersect:
@@ -2365,7 +2365,7 @@ tpl:
Description: |-
Merge creates a copy of the final parameter in params and merges the preceding
parameters into it in reverse order.
Currently only maps are supported. Key handling is case insensitive.
Examples:
- - '{{ dict "title" "Hugo Rocks!" | collections.Merge (dict "title" "Default Title" "description" "Yes, Hugo Rocks!") | sort }}'
@@ -2412,9 +2412,9 @@ tpl:
- args
Description: |-
Seq creates a sequence of integers from args. It's named and used as GNU's seq.
Examples:
3 => 1, 2, 3
1 2 4 => 1, 3
-3 => -1, -2, -3
@@ -2503,7 +2503,7 @@ tpl:
- v2
Description: |-
Conditional can be used as a ternary operator.
It returns v1 if cond is true, else v2.
Examples:
- - '{{ cond (eq (add 2 2) 4) "2+2 is 4" "what?" | safeHTML }}'
@@ -2630,6 +2630,14 @@ tpl:
- - '{{ sha256 "Hello world, gophers!" }}'
- 6ec43b78da9669f50e4e422575c54bf87536954ccd58280219c393f2ce352b46
css:
Build:
Aliases: null
Args:
- args
Description: |-
Build processes the given CSS Resource with ESBuild.
Note that this method is identical to the one in the js Namespace.
Examples: []
PostCSS:
Aliases:
- postCSS
@@ -2671,10 +2679,10 @@ tpl:
Dump returns a object dump of val as a string.
Note that not every value passed to Dump will print so nicely, but
we'll improve on that.
We recommend using the "go" Chroma lexer to format the output
nicely.
Also note that the output from Dump may change from Hugo version to the next,
so don't depend on a specific output.
Examples:
@@ -2889,6 +2897,11 @@ tpl:
Args: null
Description: ''
Examples: null
ForEeachIdentityByName:
Aliases: null
Args: null
Description: ''
Examples: null
Generator:
Aliases: null
Args: null
@@ -3091,7 +3104,7 @@ tpl:
- v
Description: |-
Humanize returns the humanized form of v.
If v is either an integer or a string containing an integer
value, the behavior is to add the appropriate ordinal.
Examples:
@@ -3143,7 +3156,7 @@ tpl:
Aliases: null
Args:
- args
Description: Build processes the given Resource with ESBuild.
Description: Build processes the given JavaScript Resource with ESBuild.
Examples: []
lang:
FormatAccounting:
@@ -3155,7 +3168,7 @@ tpl:
Description: |-
FormatAccounting returns the currency representation of number for the given currency and precision
for the current language in accounting notation.
The return value is formatted with at least two decimal places.
Examples:
- - '{{ 512.5032 | lang.FormatAccounting 2 "NOK" }}'
@@ -3169,7 +3182,7 @@ tpl:
Description: |-
FormatCurrency returns the currency representation of number for the given currency and precision
for the current language.
The return value is formatted with at least two decimal places.
Examples:
- - '{{ 512.5032 | lang.FormatCurrency 2 "USD" }}'
@@ -3777,16 +3790,16 @@ tpl:
so if you organize your resources in sub-folders, you need to be explicit about it, e.g.:
"images/*.png". To match any PNG image anywhere in the bundle you can do "**.png", and
to match all PNG images below the images folder, use "images/**.jpg".
The matching is case insensitive.
Match matches by using the files name with path relative to the file system root
with Unix style slashes (/) and no leading slash, e.g. "images/logo.png".
See https://github.com/gobwas/glob for the full rules set.
It looks for files in the assets file system.
See Match for a more complete explanation about the rules used.
Examples: []
Minify:
@@ -4132,7 +4145,7 @@ tpl:
expression in content. Each element is a slice of strings holding the text
of the leftmost match of the regular expression and the matches, if any, of
its subexpressions.
By default all matches will be included. The number of matches can be
limited with the optional limit parameter. A return value of nil indicates
no match.
@@ -4197,6 +4210,19 @@ tpl:
- Batman and Catwoman
- - '{{ replace "aabbaabb" "a" "z" 2 }}'
- zzbbaabb
ReplacePairs:
Aliases: null
Args:
- args
Description: |-
ReplacePairs returns a copy of a string with multiple replacements performed
in a single pass. The last argument is the source string. Preceding arguments
are old/new string pairs, either as a slice or as individual arguments.
Examples:
- - '{{ "aab" | strings.ReplacePairs "a" "b" "b" "c" }}'
- bbc
- - '{{ "aab" | strings.ReplacePairs (slice "a" "b" "b" "c") }}'
- bbc
ReplaceRE:
Aliases:
- replaceRE
@@ -4492,7 +4518,7 @@ tpl:
- s
Description: |-
Emojify returns a copy of s with all emoji codes replaced with actual emojis.
See http://www.emoji-cheat-sheet.com/
Examples:
- - '{{ "I :heart: Hugo" | emojify }}'
+13 -8
View File
@@ -1,12 +1,10 @@
# Do not delete. Required for layouts/_shortcodes/list-pages-in-section.html.
# Do not delete. This file defines filters that can be applied to lists of
# pages when rendering. The filters are defined as lists of page paths. A
# filter can be applied to a list of pages by specifying the filter name and
# filter type (include or exclude). Used by:
#
# When calling the list-pages-in-section shortcode, you can specify a page
# filter, and whether the pages in the filter should be included or excluded
# from the list.
#
# For example:
#
# {{% list-pages-in-section path=/functions/images filter=functions_images_no_filters filterType=exclude %}}
# - layouts/_shortcodes/render-list-of-pages-in-section.html
# - layouts/_shortcodes/render-table-of-pages-in-section.html
functions_fmt_logging:
- /functions/fmt/errorf
@@ -86,3 +84,10 @@ methods_page_navigation:
- /methods/page/nextinsection
- /methods/page/prev
- /methods/page/previnsection
methods_resource_image_processing:
- /methods/resource/crop
- /methods/resource/fill
- /methods/resource/filter
- /methods/resource/fit
- /methods/resource/fit
- /methods/resource/resize