Skip to content

Commit

Permalink
Document soft deprecation of PAGE.Scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Nov 5, 2024
1 parent 9169b4d commit d0d4d35
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions content/en/functions/resources/Babel.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ expiryDate: 2025-06-24 # deprecated 2024-06-24
---

{{% deprecated-in 0.128.0 %}}
Use [js.Babel] instead.
Use [`js.Babel`] instead.

[js.Babel]: /functions/js/babel/
[`js.Babel`]: /functions/js/babel/
{{% /deprecated-in %}}

```go-html-template
Expand Down
4 changes: 2 additions & 2 deletions content/en/functions/resources/PostCSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ expiryDate: 2025-06-24 # deprecated 2024-06-24
---

{{% deprecated-in 0.128.0 %}}
Use [css.PostCSS] instead.
Use [`css.PostCSS`] instead.

[css.PostCSS]: /functions/css/postcss/
[`css.PostCSS`]: /functions/css/postcss/
{{% /deprecated-in %}}

```go-html-template
Expand Down
4 changes: 2 additions & 2 deletions content/en/functions/resources/ToCSS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ expiryDate: 2025-06-24 # deprecated 2024-06-24
---

{{% deprecated-in 0.128.0 %}}
Use [css.Sass] instead.
Use [`css.Sass`] instead.

[css.Sass]: /functions/css/sass/
[`css.Sass`]: /functions/css/sass/
{{% /deprecated-in %}}

```go-html-template
Expand Down
10 changes: 10 additions & 0 deletions content/en/methods/page/Scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ toc: true
aliases: [/extras/scratch/,/doc/scratch/,/functions/scratch]
---

{{% deprecated-in 0.138.0 %}}
Use the [`PAGE.Store`] method instead.

This is a soft deprecation. This method will be removed in a future release, but the removal date has not been established. Although Hugo will not emit a warning if you continue to use this method, you should begin using `PAGE.Store` as soon as possible.

Beginning with v0.138.0 the `PAGE.Scratch` method is aliased to `PAGE.Store`.

[`PAGE.Store`]: /methods/page/store/
{{% /deprecated-in %}}

The `Scratch` method on a `Page` object creates a [scratch pad] to store and manipulate data. To create a scratch pad that is not reset on server rebuilds, use the [`Store`] method instead.

To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function.
Expand Down
4 changes: 1 addition & 3 deletions content/en/methods/page/Store.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ toc: true
aliases: [/functions/store]
---

The `Store` method on a `Page` object creates a persistent [scratch pad] to store and manipulate data. In contrast with the [`Scratch`] method, the scratch pad created by the `Store` method is not reset on server rebuilds.

To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function.
The `Store` method on a `Page` object creates a persistent [scratch pad] to store and manipulate data. To create a locally scoped scratch pad that is not attached to a `Page` object, use the [`newScratch`] function.

[`Scratch`]: /methods/page/scratch/
[`newScratch`]: /functions/collections/newscratch/
Expand Down

0 comments on commit d0d4d35

Please sign in to comment.