diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-12-11 09:53:33 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-12-11 09:53:33 +0100 |
commit | b47376586a50753c2ee1f02961d0b0c2280bbc9c (patch) | |
tree | 0b12e4ebdbd20570e6da9dd5ba36694a1377f2ff /docs/content/en/methods/shortcode/Scratch.md | |
parent | 5ab38de36387062a8ca6c1d18c6a773fa248519c (diff) | |
parent | e477373487abcccdbed95688e37aa74b9b8fc198 (diff) | |
download | hugo-b47376586a50753c2ee1f02961d0b0c2280bbc9c.tar.gz hugo-b47376586a50753c2ee1f02961d0b0c2280bbc9c.zip |
Merge commit 'e477373487abcccdbed95688e37aa74b9b8fc198'
Diffstat (limited to 'docs/content/en/methods/shortcode/Scratch.md')
-rw-r--r-- | docs/content/en/methods/shortcode/Scratch.md | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/content/en/methods/shortcode/Scratch.md b/docs/content/en/methods/shortcode/Scratch.md index fcfc99d53..811d9f9ee 100644 --- a/docs/content/en/methods/shortcode/Scratch.md +++ b/docs/content/en/methods/shortcode/Scratch.md @@ -10,7 +10,17 @@ action: signatures: [SHORTCODE.Scratch] --- -The `Scratch` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode, and is reset on server rebuilds. +{{% deprecated-in 0.139.0 %}} +Use the [`SHORTCODE.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 `SHORTCODE.Store` as soon as possible. + +Beginning with v0.139.0 the `SHORTCODE.Scratch` method is aliased to `SHORTCODE.Store`. + +[`SHORTCODE.Store`]: /methods/shortcode/store/ +{{% /deprecated-in %}} + +The `Scratch` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode. {{% note %}} With the introduction of the [`newScratch`] function, and the ability to [assign values to template variables] after initialization, the `Scratch` method within a shortcode is obsolete. |