mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 19:24:49 -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
|
||||
|
||||
{{< code file=content/example.md >}}
|
||||
{{< code file=content/example.md lang=go >}}
|
||||
Today is
|
||||
{{</* date.inline ":date_medium" */>}}
|
||||
{{- now | time.Format (.Get 0) -}}
|
||||
{{</* /date.inline */>}}.
|
||||
|
||||
Today is {{</* date.inline ":date_full" */>}}.
|
||||
Today is {{</* date.inline ":date_full" /*/>}}.
|
||||
{{< /code >}}
|
||||
|
||||
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