diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-07-06 14:12:10 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-07-06 17:51:38 +0200 |
commit | 2b8d907ab731627f4e2a30442cd729064516c8bb (patch) | |
tree | 2f9235dfbcf116c463b75d59c8be1be53d55b05a /docs/content/en/functions | |
parent | 43338c3a99769eb7d0df0c12559b8b3d42b67dba (diff) |
Add a newScratch template func
Fixes #4685
Diffstat (limited to 'docs/content/en/functions')
-rw-r--r-- | docs/content/en/functions/scratch.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/content/en/functions/scratch.md b/docs/content/en/functions/scratch.md index 9df78fe43..93a1e426a 100644 --- a/docs/content/en/functions/scratch.md +++ b/docs/content/en/functions/scratch.md @@ -22,6 +22,9 @@ aliases: [/extras/scratch/,/doc/scratch/] In most cases you can do okay without `Scratch`, but due to scoping issues, there are many use cases that aren't solvable in Go Templates without `Scratch`'s help. +`.Scratch` is available as methods on `Page` and `Shortcode`. Since Hugo 0.43 you can also create a locally scoped `Scratch` using the template func `newScratch`. + + {{% note %}} See [this Go issue](https://github.com/golang/go/issues/10608) for the main motivation behind Scratch. {{% /note %}} |