Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'

```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
This commit is contained in:
Bjørn Erik Pedersen
2024-01-27 10:48:33 +01:00
1158 changed files with 64103 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
---
title: Scratch
description: Creates a "scratch pad" on the given page to store and manipulate data.
categories: []
keywords: []
action:
related:
- methods/page/Store
- functions/collections/NewScratch
returnType: maps.Scratch
signatures: [PAGE.Scratch]
aliases: [/extras/scratch/,/doc/scratch/,/functions/scratch]
---
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.
[`Store`]: /methods/page/store
[`newScratch`]: functions/collections/newscratch
[scratch pad]: /getting-started/glossary/#scratch-pad
{{% include "methods/page/_common/scratch-methods.md" %}}