Skip to content

Commit

Permalink
Add new-in tags to select functions and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Nov 22, 2023
1 parent 5c41f0b commit 657f345
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/en/functions/collections/Where.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Use any of the following logical operators:
`intersect`
: (`bool`) Reports whether the given field value (a slice) contains one or more elements in common with `VALUE`. See [details](/functions/collections/intersect).

`like`
`like` {{< new-in 0.116.0 >}}
: (`bool`) Reports whether the given field value matches the regular expression specified in `VALUE`. Use the `like` operator to compare `string` values. The `like` operator returns `false` when comparing other data types to the regular expression.

{{% note %}}
Expand Down Expand Up @@ -188,6 +188,8 @@ For example, to return a collection of pages where any of the terms in the "genr

## Regular expression comparison

{{< new-in 0.116.0 >}}

To return a collection of pages where the "author" page parameter begins with either "victor" or "Victor":

```go-html-template
Expand Down
2 changes: 2 additions & 0 deletions content/en/functions/global/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ toc: true
aliases: [/functions/page]
---

{{< new-in 0.111.0 >}}

At the top level of a template that receives a `Page` object in context, these are equivalent:

```go-html-template
Expand Down
2 changes: 2 additions & 0 deletions content/en/functions/hugo/GoVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ action:
signatures: [hugo.GoVersion]
---

{{< new-in 0.101.0 >}}

```go-html-template
{{ hugo.GoVersion }} → go1.21.1
```
2 changes: 2 additions & 0 deletions content/en/functions/images/Opacity.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ action:
toc: true
---

{{< new-in 0.119.0 >}}

The opacity value must be in the range [0, 1]. A value of `0` produces a transparent image, and a value of `1` produces an opaque image (no transparency).

## Usage
Expand Down
2 changes: 2 additions & 0 deletions content/en/functions/images/Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ action:
toc: true
---

{{< new-in 0.119.0 >}}

This filter has the same options as the [`Process`] method on a `Resource` object, but using it as a filter may be more effective if you need to apply multiple filters to an image.

[`Process`]: /methods/resource/process
Expand Down
2 changes: 2 additions & 0 deletions content/en/functions/math/Abs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ action:
signatures: [math.Abs VALUE]
---

{{< new-in 0.112.0 >}}

```go-html-template
{{ math.Abs -2.1 }} → 2.1
```
2 changes: 2 additions & 0 deletions content/en/functions/math/Product.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ action:
signatures: [math.Product VALUE...]
---

{{< new-in 0.114.0 >}}

```go-html-template
{{ math.Product 1 (slice 2 3) 4 }} → 24
```
2 changes: 2 additions & 0 deletions content/en/functions/math/Sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ action:
signatures: [math.Sum VALUE...]
---

{{< new-in 0.114.0 >}}

```go-html-template
{{ math.Sum 1 (slice 2 3) 4 }} → 10
```
2 changes: 2 additions & 0 deletions content/en/functions/path/BaseName.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ action:
aliases: [/functions/path.basename]
---

{{< new-in 0.101.0 >}}

```go-html-template
{{ path.BaseName "a/news.html" }} → news
{{ path.BaseName "news.html" }} → news
Expand Down
2 changes: 2 additions & 0 deletions content/en/functions/resources/Copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ action:
signatures: [resources.Copy TARGETPATH RESOURCE]
---

{{< new-in 0.100.0 >}}

```go-html-template
{{ with resources.Get "images/a.jpg" }}
{{ with resources.Copy "img/new-image-name.jpg" . }}
Expand Down
2 changes: 2 additions & 0 deletions content/en/functions/strings/ContainsNonSpace.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ action:
aliases: [/functions/strings.containsnonspace]
---

{{< new-in 0.111.0 >}}

```go-html-template
{{ strings.ContainsNonSpace "\n" }} → false
{{ strings.ContainsNonSpace " " }} → false
Expand Down
2 changes: 2 additions & 0 deletions content/en/functions/urls/JoinPath.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ action:
aliases: [/functions/urls.joinpath]
---

{{< new-in 0.112.0 >}}

```go-html-template
{{ urls.JoinPath }} → "" (empty string)
{{ urls.JoinPath "" }} → /
Expand Down
2 changes: 2 additions & 0 deletions content/en/methods/page/Fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ action:
toc: true
---

{{< new-in 0.111.0 >}}

In a URL, whether absolute or relative, the [fragment] links to an `id` attribute of an HTML element on the page.

```text
Expand Down
2 changes: 2 additions & 0 deletions content/en/methods/page/RenderShortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ action:
toc: true
---

{{< new-in 0.117.0 >}}

Use this method in shortcode templates to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents.

For example:
Expand Down
2 changes: 2 additions & 0 deletions content/en/methods/resource/Colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ action:
signatures: [RESOURCE.Colors]
---

{{< new-in 0.104.0 >}}

```go-html-template
{{ with resources.Get "images/a.jpg" }}
{{ .Colors }} → [#bebebd #514947 #768a9a #647789 #90725e #a48974]
Expand Down

0 comments on commit 657f345

Please sign in to comment.