From 7337312533a37711e4b4078158e826aab5dd6a80 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 7 Feb 2025 11:06:29 -0800 Subject: [PATCH 1/5] helpers: Add Chroma styles to docs.yaml Closes #13360 --- data/docs.yaml | 71 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/data/docs.yaml b/data/docs.yaml index dc61df0e8..6fc02c63a 100644 --- a/data/docs.yaml +++ b/data/docs.yaml @@ -958,6 +958,73 @@ chroma: - Aliases: - zig Name: Zig + styles: + - abap + - algol + - algol_nu + - arduino + - autumn + - average + - base16-snazzy + - borland + - bw + - catppuccin-frappe + - catppuccin-latte + - catppuccin-macchiato + - catppuccin-mocha + - colorful + - doom-one + - doom-one2 + - dracula + - emacs + - evergarden + - friendly + - fruity + - github + - github-dark + - gruvbox + - gruvbox-light + - hr_high_contrast + - hrdark + - igor + - lovelace + - manni + - modus-operandi + - modus-vivendi + - monokai + - monokailight + - murphy + - native + - nord + - nordic + - onedark + - onesenterprise + - paraiso-dark + - paraiso-light + - pastie + - perldoc + - pygments + - rainbow_dash + - rose-pine + - rose-pine-dawn + - rose-pine-moon + - rrt + - solarized-dark + - solarized-dark256 + - solarized-light + - swapoff + - tango + - tokyonight-day + - tokyonight-moon + - tokyonight-night + - tokyonight-storm + - trac + - vim + - vs + - vulcan + - witchhazel + - xcode + - xcode-dark config: HTTPCache: cache: @@ -1737,7 +1804,9 @@ config: headers: null redirects: - force: false - from: '**' + from: /** + fromHeaders: null + fromRe: "" status: 404 to: /404.html services: From 9f06a3b9cb4618a4efc0058bccf0fd56ca6ce796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 13 Feb 2025 10:44:44 +0100 Subject: [PATCH 2/5] js/esbuild: Add drop option Fixes #13362 --- content/en/functions/js/_common/options.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/en/functions/js/_common/options.md b/content/en/functions/js/_common/options.md index e2b6566ad..0d6138a7b 100644 --- a/content/en/functions/js/_common/options.md +++ b/content/en/functions/js/_common/options.md @@ -81,6 +81,14 @@ import * as ReactDOM from 'react-dom/client'; {{ $defines := dict "process.env.NODE_ENV" `"development"` }} ``` +##### drop + +Edit your source code before building to drop certain constructs: One of `debugger` or `console`. + +{{< new-in 0.144.0 />}} + +See https://esbuild.github.io/api/#drop + ###### sourceMap (`string`) Whether to generate `inline`, `linked` or `external` source maps from esbuild. Linked and external source maps will be written to the target with the output file name + ".map". When `linked` a `sourceMappingURL` will also be written to the output file. By default, source maps are not created. Note that the `linked` option was added in Hugo 0.140.0. From 03e54683f519045f3fd0f7d2e75fc851609f0f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 13 Feb 2025 11:00:02 +0100 Subject: [PATCH 3/5] modules: Add GOAUTH to module config Closes #13385 --- content/en/hugo-modules/configuration.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/hugo-modules/configuration.md b/content/en/hugo-modules/configuration.md index 0bc1b47d8..58a3e36f1 100644 --- a/content/en/hugo-modules/configuration.md +++ b/content/en/hugo-modules/configuration.md @@ -22,6 +22,7 @@ proxy = 'direct' replacements = '' vendorClosest = false workspace = 'off' +auth = '' {{< /code-toggle >}} noProxy @@ -36,6 +37,9 @@ private proxy : (`string`) Defines the proxy server to use to download remote modules. Default is `direct`, which means "git clone" and similar. +auth +: (`string`) {{< new-in 0.144.0 >}} Configures `GOAUTH` when running the Go command for module operations. This is a semicolon-separated list of authentication commands for go-import and HTTPS module mirror interactions. This is useful for private repositories. See `go help goauth` for more information. + vendorClosest : (`bool`) When enabled, we will pick the vendored module closest to the module using it. The default behavior is to pick the first. Note that there can still be only one dependency of a given module path, so once it is in use it cannot be redefined. Default is `false`. From 901adb07b74068a2fcc1b34dd28ff96863819f3b Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 12 Feb 2025 14:13:17 +0100 Subject: [PATCH 4/5] resources/page: Add :contentbasename and :contentbasenameorslug permalink tokens See #11722 --- content/en/content-management/urls.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index ab0c7148a..62ccfb666 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -317,6 +317,14 @@ Use these tokens when defining the URL pattern. You can also use these tokens wh `:slugorfilename` : The slug as defined in front matter, else the content's file name without extension, applicable to the `page` page kind. +`:contentbasename` +: The content base name, as defined in [`File.ContentBaseName`], applicable to pages backed by a file. + +`:contentbasenameorslug` +: The content base name, else the slug as defined above. + +[`File.ContentBaseName`]: /methods/page/file/#contentbasename + For time-related values, you can also use the layout string components defined in Go's [time package]. For example: [time package]: https://pkg.go.dev/time#pkg-constants From ef8bf89d8b01bb250a5aa13ed56316736f27be85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 12 Feb 2025 22:36:24 +0100 Subject: [PATCH 5/5] resources/page: Revise the new contentbasename permalinks tokens * Make it work for all pages, including those created from content adapters and not backed by a file. * Allow the `slug` to win, so the new tokens are: `:contentbasename`: 1. ContentBaseName `:slugorcontentbasename`: 1. Slug 2. ContentBaseName Note that a page will always have a `ContentBaseName`, so no need to fall back to e.g. the title. Closes #11722 --- content/en/content-management/urls.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index 62ccfb666..ab0c7148a 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -317,14 +317,6 @@ Use these tokens when defining the URL pattern. You can also use these tokens wh `:slugorfilename` : The slug as defined in front matter, else the content's file name without extension, applicable to the `page` page kind. -`:contentbasename` -: The content base name, as defined in [`File.ContentBaseName`], applicable to pages backed by a file. - -`:contentbasenameorslug` -: The content base name, else the slug as defined above. - -[`File.ContentBaseName`]: /methods/page/file/#contentbasename - For time-related values, you can also use the layout string components defined in Go's [time package]. For example: [time package]: https://pkg.go.dev/time#pkg-constants