mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'
This commit is contained in:
@@ -56,7 +56,6 @@ Content between opening and closing shortcode tags may include leading and/or tr
|
||||
In the example above, the value returned by `Inner` is Markdown, but it was rendered as plain text. Use either of the following approaches to render Markdown to HTML.
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
## Use RenderString
|
||||
|
||||
Let's modify the example above to pass the value returned by `Inner` through the [`RenderString`] method on the `Page` object:
|
||||
|
@@ -46,5 +46,5 @@ Welcome. Today is {{</* now */>}}.
|
||||
The "now" shortcode formats the current time using:
|
||||
|
||||
1. The `dateFormat` argument passed to the "now" shortcode, if present
|
||||
2. The `dateFormat` argument passed to the "greeting" shortcode, if present
|
||||
3. The default layout string defined at the top of the shortcode
|
||||
1. The `dateFormat` argument passed to the "greeting" shortcode, if present
|
||||
1. The default layout string defined at the top of the shortcode
|
||||
|
@@ -15,7 +15,7 @@ action:
|
||||
The map of option contains:
|
||||
|
||||
path
|
||||
: (`string`) The path to the page, relative to the content directory. Required.
|
||||
: (`string`) The path to the page, relative to the `content` directory. Required.
|
||||
|
||||
lang
|
||||
: (`string`) The language (site) to search for the page. Default is the current language. Optional.
|
||||
|
@@ -15,7 +15,7 @@ action:
|
||||
The map of option contains:
|
||||
|
||||
path
|
||||
: (`string`) The path to the page, relative to the content directory. Required.
|
||||
: (`string`) The path to the page, relative to the `content` directory. Required.
|
||||
|
||||
lang
|
||||
: (`string`) The language (site) to search for the page. Default is the current language. Optional.
|
||||
|
@@ -8,6 +8,7 @@ action:
|
||||
- functions/collections/NewScratch
|
||||
returnType: maps.Scratch
|
||||
signatures: [SHORTCODE.Scratch]
|
||||
expiryDate: 2025-11-18 # deprecated 2024-11-18
|
||||
---
|
||||
|
||||
{{% deprecated-in 0.139.0 %}}
|
||||
@@ -20,7 +21,7 @@ Beginning with v0.139.0 the `SHORTCODE.Scratch` method is aliased to `SHORTCODE.
|
||||
[`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.
|
||||
The `Scratch` method within a shortcode creates a [scratch pad](g) 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.
|
||||
@@ -29,6 +30,4 @@ With the introduction of the [`newScratch`] function, and the ability to [assign
|
||||
[`newScratch`]: /functions/collections/newscratch/
|
||||
{{% /note %}}
|
||||
|
||||
[scratch pad]: /getting-started/glossary/#scratch-pad
|
||||
|
||||
{{% include "methods/page/_common/scratch-methods.md" %}}
|
||||
|
@@ -15,7 +15,7 @@ action:
|
||||
|
||||
{{< new-in 0.139.0 >}}
|
||||
|
||||
The `Store` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode.
|
||||
The `Store` method within a shortcode creates a [scratch pad](g) 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 `Store` method within a shortcode is mostly obsolete.
|
||||
@@ -24,6 +24,4 @@ With the introduction of the [`newScratch`] function, and the ability to [assign
|
||||
[`newScratch`]: /functions/collections/newScratch/
|
||||
{{% /note %}}
|
||||
|
||||
[Store pad]: /getting-started/glossary/#scratch-pad
|
||||
|
||||
{{% include "methods/page/_common/scratch-methods.md" %}}
|
||||
|
Reference in New Issue
Block a user