Document soft deprecation of PAGE.Scratch

This commit is contained in:
Joe Mooring 2024-11-05 13:05:36 -08:00 committed by Bjørn Erik Pedersen
parent cdead97856
commit c3a476a198
5 changed files with 17 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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