mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 13:14:41 -04:00
content: Fix inline shortcode example
This commit is contained in:
parent
0a74210e2b
commit
f6ec83533e
@ -61,13 +61,13 @@ The following example demonstrates an inline shortcode, `date.inline`, that acce
|
|||||||
|
|
||||||
[layout string]: /functions/time/format/#layout-string
|
[layout string]: /functions/time/format/#layout-string
|
||||||
|
|
||||||
{{< code file=content/example.md >}}
|
{{< code file=content/example.md lang=go >}}
|
||||||
Today is
|
Today is
|
||||||
{{</* date.inline ":date_medium" */>}}
|
{{</* date.inline ":date_medium" */>}}
|
||||||
{{- now | time.Format (.Get 0) -}}
|
{{- now | time.Format (.Get 0) -}}
|
||||||
{{</* /date.inline */>}}.
|
{{</* /date.inline */>}}.
|
||||||
|
|
||||||
Today is {{</* date.inline ":date_full" */>}}.
|
Today is {{</* date.inline ":date_full" /*/>}}.
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
In the example above, the inline shortcode is executed twice: once upon definition and again when subsequently called. Hugo renders this to:
|
In the example above, the inline shortcode is executed twice: once upon definition and again when subsequently called. Hugo renders this to:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user