Skip to content

Commit

Permalink
Improve new-in shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Feb 1, 2025
1 parent 1a7413a commit 367d3a7
Show file tree
Hide file tree
Showing 82 changed files with 172 additions and 112 deletions.
2 changes: 1 addition & 1 deletion content/en/content-management/content-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ weight: 290
toc: true
---

{{< new-in 0.126.0 >}}
{{< new-in 0.126.0 />}}

## Overview

Expand Down
4 changes: 2 additions & 2 deletions content/en/content-management/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ path

###### params

{{< new-in 0.123.0 >}}
{{< new-in 0.123.0 />}}

(`map`) A map of custom [page parameters].

Expand Down Expand Up @@ -258,7 +258,7 @@ Alias to [expirydate](#expirydate).

## Parameters

{{< new-in 0.123.0 >}}
{{< new-in 0.123.0 />}}

Specify custom page parameters under the `params` key in front matter:

Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/image-processing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. U

### Process

{{< new-in 0.119.0 >}}
{{< new-in 0.119.0 />}}

{{% note %}}
The `Process` method is also available as a filter, which is more effective if you need to apply multiple filters to an image. See [Process filter](/functions/images/process).
Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/mathematics.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ toc: true
math: true
---

{{< new-in 0.122.0 >}}
{{< new-in 0.122.0 />}}

## Overview

Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/page-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ the `Name` and `Title` will be assigned to the resource files as follows:

## Multilingual

{{< new-in 0.123.0 >}}
{{< new-in 0.123.0 />}}

By default, with a multilingual single-host site, Hugo does not duplicate shared page resources when building the site.

Expand Down
4 changes: 2 additions & 2 deletions content/en/content-management/urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ If you set both `slug` and `url` in front matter, the `url` value takes preceden

#### Include a colon

{{< new-in 0.136.0 >}}
{{< new-in 0.136.0 />}}

If you need to include a colon in the `url` front matter field, escape it with backslash characters. Use one backslash if you wrap the string within single quotes, or use two backslashes if you wrap the string within double quotes. With YAML front matter, use a single backslash if you omit quotation marks.

Expand Down Expand Up @@ -118,7 +118,7 @@ multilingual|`about`|`https://example.org/de/about/`

#### Permalinks tokens in front matter

{{< new-in "0.131.0" >}}
{{< new-in 0.131.0 />}}

You can also use [tokens](#tokens) when setting the `url` value. This is typically used in `cascade` sections:

Expand Down
2 changes: 1 addition & 1 deletion content/en/contribute/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ Use the `new-in` shortcode to indicate a new feature:
{{</* new-in 0.127.0 */>}}
```

{{< new-in 0.127.0 >}}
{{< new-in 0.127.0 />}}

### note

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/_common/highlighting-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tabWidth
: (`int`) Substitute this number of spaces for each tab character in your highlighted code. Irrelevant if `noClasses` is `false`. Default is `4`.

wrapperClass
{{< new-in 0.140.2 >}}
{{< new-in 0.140.2 />}}
: (`string`) The class or classes to use for the outermost element of the highlighted code. Default is `highlight`.

{{% note %}}
Expand Down
4 changes: 2 additions & 2 deletions content/en/functions/collections/Where.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,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&nbsp;[details](/functions/collections/intersect).

`like` {{< new-in 0.116.0 >}}
`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 @@ -168,7 +168,7 @@ For example, to return a collection of pages where any of the terms in the "genr

## Regular expression comparison

{{< new-in 0.116.0 >}}
{{< new-in 0.116.0 />}}

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

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/css/PostCSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ action:
toc: true
---

{{< new-in 0.128.0 >}}
{{< new-in 0.128.0 />}}

```go-html-template
{{ with resources.Get "css/main.css" | postCSS }}
Expand Down
4 changes: 2 additions & 2 deletions content/en/functions/css/Sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ action:
toc: true
---

{{< new-in 0.128.0 >}}
{{< new-in 0.128.0 />}}

```go-html-template
{{ with resources.Get "sass/main.scss" }}
Expand Down Expand Up @@ -92,7 +92,7 @@ includePaths
```

silenceDeprecations
: (`slice`) {{< new-in 0.139.0 >}} A slice of deprecation IDs to silence. The deprecation IDs are printed to in the warning message, e.g "import" in `WARN Dart Sass: DEPRECATED [import] ...`. This is for Dart Sass only.
: (`slice`) {{< new-in 0.139.0 />}} A slice of deprecation IDs to silence. The deprecation IDs are printed to in the warning message, e.g "import" in `WARN Dart Sass: DEPRECATED [import] ...`. This is for Dart Sass only.

## Dart Sass

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/css/TailwindCSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ action:
toc: true
---

{{< new-in 0.128.0 >}}
{{< new-in 0.128.0 />}}

## Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/debug/Timer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ action:
signatures: [debug.Timer NAME]
---

{{< new-in 0.120.0 >}}
{{< new-in 0.120.0 />}}

Use the `debug.Timer` function to determine execution time for a block of code, useful for finding performance bottlenecks in templates.

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/fmt/Warnidf.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ action:
aliases: [/functions/warnidf]
---

{{< new-in 0.123.0 >}}
{{< new-in 0.123.0 />}}

{{% include "functions/fmt/_common/fmt-layout.md" %}}

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/go-template/try.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ action:
toc: true
---

{{< new-in 0.141.0 >}}
{{< new-in 0.141.0 />}}

The `try` statement is a non-standard extension to Go's [text/template] package. It introduces a mechanism for handling errors within templates, mimicking the `try-catch` constructs found in other programming languages.

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/hugo/IsDevelopment.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ action:
signatures: [hugo.IsDevelopment]
---

{{< new-in 0.120.0 >}}
{{< new-in 0.120.0 />}}

```go-html-template
{{ hugo.IsDevelopment }} → true/false
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/hugo/IsMultihost.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ action:
signatures: [hugo.IsMultihost]
---

{{< new-in v0.124.0 >}}
{{< new-in 0.124.0 />}}

Site configuration:

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/hugo/IsMultilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ action:
signatures: [hugo.IsMultilingual]
---

{{< new-in v0.124.0 >}}
{{< new-in 0.124.0 />}}

Site configuration:

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/hugo/IsServer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ action:
signatures: [hugo.IsServer]
---

{{< new-in 0.120.0 >}}
{{< new-in 0.120.0 />}}

```go-html-template
{{ hugo.IsServer }} → true/false
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/hugo/Store.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ action:
toc: true
---

{{< new-in 0.139.0 >}}
{{< new-in 0.139.0 />}}

Use the `hugo.Store` function to create a globally scoped [scratch pad](g) to store and manipulate data. To create a scratch pad with a different [scope](g), refer to the [scope](#scope) section below.

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/AutoOrient.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ action:
toc: true
---

{{< new-in 0.121.2 >}}
{{< new-in 0.121.2 />}}

## Usage

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/Dither.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ action:
toc: true
---

{{< new-in 0.123.0 >}}
{{< new-in 0.123.0 />}}

## Options

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/Mask.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ action:
toc: true
---

{{< new-in 0.141.0 >}}
{{< new-in 0.141.0 />}}

The `images.Mask` filter applies a mask to an image. Black pixels in the mask make the corresponding areas of the base image transparent, while white pixels keep them opaque. Color images are converted to grayscale for masking purposes. The mask is automatically resized to match the dimensions of the base image.

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/Opacity.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ action:
toc: true
---

{{< new-in 0.119.0 >}}
{{< 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).

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/Padding.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ action:
toc: true
---

{{< new-in 0.120.0 >}}
{{< new-in 0.120.0 />}}

The last argument is the canvas color, expressed as an RGB or RGBA [hexadecimal color]. The default value is `ffffffff` (opaque white). The preceding arguments are the padding values, in pixels, using the CSS [shorthand property] syntax. Negative padding values will crop the image.

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ action:
toc: true
---

{{< new-in 0.119.0 >}}
{{< 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.

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/QR.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ toc: true
math: true
---

{{< new-in 0.141.0 >}}
{{< new-in 0.141.0 />}}

The `images.QR` function encodes the given text into a [QR code] using the specified options, returning an image resource. The size of the generated image depends on three factors:

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/images/Text.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ toc: true
Although none of the options are required, at a minimum you will want to set the `size` to be some reasonable percentage of the image height.

alignx

Check warning on line 20 in content/en/functions/images/Text.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (alignx)
{{< new-in 0.141.0 >}}
{{< new-in 0.141.0 />}}
: (`string`) The horizontal alignment of the text relative to the horizontal offset, one of `left`, `center`, or `right`. Default is `left`.

color
Expand Down
10 changes: 5 additions & 5 deletions content/en/functions/js/_common/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Note that this is meant for small data sets, e.g. configuration settings. For la

###### loaders

{{< new-in "0.140.0" >}}
{{< new-in 0.140.0 />}}

(`map`) Configuring a loader for a given file type lets you load that file type with an import statement or a require call. For example configuring the .png file extension to use the data URL loader means importing a .png file gives you a data URLcontaining the contents of that image. Loaders available are `none`, `base64`, `binary`, `copy`, `css`, `dataurl`, `default`, `empty`, `file`, `global-css`, `js`, `json`, `jsx`, `local-css`, `text`, `ts`, `tsx`. See https://esbuild.github.io/api/#loader.

Expand Down Expand Up @@ -65,7 +65,7 @@ import * as ReactDOM from 'react-dom/client';

###### platform

{{< new-in 0.140.0 >}}
{{< new-in 0.140.0 />}}

(`string`) One of `browser`, `node`, `neutral`. Default is `browser`. See https://esbuild.github.io/api/#platform.

Expand All @@ -87,19 +87,19 @@ import * as ReactDOM from 'react-dom/client';

###### sourcesContent

{{< new-in 0.140.0 >}}
{{< new-in 0.140.0 />}}

(`bool`) Whether to include the content of the source files in the source map. By default, this is `true`.

###### JSX

{{< new-in 0.124.0 >}}
{{< new-in 0.124.0 />}}

(`string`) How to handle/transform JSX syntax. One of: `transform`, `preserve`, `automatic`. Default is `transform`. Notably, the `automatic` transform was introduced in React 17+ and will cause the necessary JSX helper functions to be imported automatically. See https://esbuild.github.io/api/#jsx.

###### JSXImportSource

{{< new-in 0.124.0 >}}
{{< new-in 0.124.0 />}}

(`string`) Which library to use to automatically import its JSX helper functions from. This only works if `JSX` is set to `automatic`. The specified library needs to be installed through npm and expose certain exports. See https://esbuild.github.io/api/#jsx-import-source.

Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/math/Acos.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ action:
signatures: [math.Acos VALUE]
---

{{< new-in 0.130.0 >}}
{{< new-in 0.130.0 />}}

```go-html-template
{{ math.Acos 1 }} → 0
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/math/Asin.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ action:
signatures: [math.Asin VALUE]
---

{{< new-in 0.130.0 >}}
{{< new-in 0.130.0 />}}

```go-html-template
{{ math.Asin 1 }} → 1.5707963267948966
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/math/Atan.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ action:
signatures: [math.Atan VALUE]
---

{{< new-in 0.130.0 >}}
{{< new-in 0.130.0 />}}

```go-html-template
{{ math.Atan 1 }} → 0.7853981633974483
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/math/Atan2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ action:
signatures: [math.Atan2 VALUE VALUE]
---

{{< new-in 0.130.0 >}}
{{< new-in 0.130.0 />}}

```go-html-template
{{ math.Atan2 1 2 }} → 0.4636476090008061
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/math/Cos.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ action:
signatures: [math.Cos VALUE]
---

{{< new-in 0.130.0 >}}
{{< new-in 0.130.0 />}}

```go-html-template
{{ math.Cos 1 }} → 0.5403023058681398
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/math/Pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ action:
signatures: [math.Pi]
---

{{< new-in 0.130.0 >}}
{{< new-in 0.130.0 />}}

```go-html-template
{{ math.Pi }} → 3.141592653589793
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/math/Product.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ action:
signatures: [math.Product VALUE...]
---

{{< new-in 0.114.0 >}}
{{< new-in 0.114.0 />}}

```go-html-template
{{ math.Product 1 (slice 2 3) 4 }} → 24
Expand Down
Loading

0 comments on commit 367d3a7

Please sign in to comment.