From e098a77164921590bb4e7c8cd7ba517421e01487 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 17 Feb 2025 09:38:41 -0800 Subject: [PATCH] content: Miscellaneous edits --- content/en/functions/js/_common/options.md | 2 +- content/en/functions/math/Product.md | 2 -- content/en/functions/math/Sum.md | 2 -- layouts/shortcodes/deprecated-in.html | 2 +- layouts/shortcodes/new-in.html | 2 +- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/content/en/functions/js/_common/options.md b/content/en/functions/js/_common/options.md index 0d6138a7b..cea0b5304 100644 --- a/content/en/functions/js/_common/options.md +++ b/content/en/functions/js/_common/options.md @@ -81,7 +81,7 @@ import * as ReactDOM from 'react-dom/client'; {{ $defines := dict "process.env.NODE_ENV" `"development"` }} ``` -##### drop +###### drop Edit your source code before building to drop certain constructs: One of `debugger` or `console`. diff --git a/content/en/functions/math/Product.md b/content/en/functions/math/Product.md index 1809c560d..343e9f73d 100644 --- a/content/en/functions/math/Product.md +++ b/content/en/functions/math/Product.md @@ -15,8 +15,6 @@ action: signatures: [math.Product VALUE...] --- -{{< new-in 0.114.0 />}} - ```go-html-template {{ math.Product 1 (slice 2 3) 4 }} → 24 ``` diff --git a/content/en/functions/math/Sum.md b/content/en/functions/math/Sum.md index 5cf882bee..ae1419fb3 100644 --- a/content/en/functions/math/Sum.md +++ b/content/en/functions/math/Sum.md @@ -14,8 +14,6 @@ action: signatures: [math.Sum VALUE...] --- -{{< new-in 0.114.0 />}} - ```go-html-template {{ math.Sum 1 (slice 2 3) 4 }} → 10 ``` diff --git a/layouts/shortcodes/deprecated-in.html b/layouts/shortcodes/deprecated-in.html index c30d20cf0..e168b8a0f 100644 --- a/layouts/shortcodes/deprecated-in.html +++ b/layouts/shortcodes/deprecated-in.html @@ -16,7 +16,7 @@ {{< /new-in >}} */}} -{{- with $version := .Get 0 | strings.TrimPrefix "vV" }} +{{- with $version := .Get 0 | strings.TrimLeft "vV" }} {{- $href := printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }} {{- $inner := strings.TrimSpace $.Inner }} {{- $text := printf "Deprecated in [v%s](%s)\n\n%s" $version $href $inner | $.Page.RenderString (dict "display" "block") }} diff --git a/layouts/shortcodes/new-in.html b/layouts/shortcodes/new-in.html index 823e1d174..744873c24 100644 --- a/layouts/shortcodes/new-in.html +++ b/layouts/shortcodes/new-in.html @@ -26,7 +26,7 @@ {{- $minorVersionDiffThreshold := 30 }} {{- $displayExpirationWarning := true }} -{{- with $version := .Get 0 | strings.TrimPrefix "vV" }} +{{- with $version := .Get 0 | strings.TrimLeft "vV" }} {{- $majorVersionDiff := sub (index (split hugo.Version ".") 0 | int) (index (split $version ".") 0 | int) }} {{- $minorVersionDiff := sub (index (split hugo.Version ".") 1 | int) (index (split $version ".") 1 | int) }} {{- if or (gt $majorVersionDiff $majorVersionDiffThreshold) (gt $minorVersionDiff $minorVersionDiffThreshold) }}