content: Fix inline shortcode example

This commit is contained in:
Joe Mooring 2025-02-13 20:57:15 -08:00 committed by GitHub
parent 0a74210e2b
commit f6ec83533e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: