content: Miscellaneous edits

This commit is contained in:
Joe Mooring 2025-02-17 09:38:41 -08:00 committed by GitHub
parent 8e1e104aac
commit e098a77164
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 7 deletions

View File

@ -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`.

View File

@ -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
```

View File

@ -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
```

View File

@ -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") }}

View File

@ -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) }}