Skip to content

Commit

Permalink
content: Miscellaneous edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Feb 17, 2025
1 parent 8e1e104 commit e098a77
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion content/en/functions/js/_common/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 0 additions & 2 deletions content/en/functions/math/Product.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 0 additions & 2 deletions content/en/functions/math/Sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion layouts/shortcodes/deprecated-in.html
Original file line number Diff line number Diff line change
Expand Up @@ -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") }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/new-in.html
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down

0 comments on commit e098a77

Please sign in to comment.