content: Replace calls to the code shortcode with fenced code blocks

This commit is contained in:
Joe Mooring authored and GitHub committed 2025-03-06 02:49:11 -08:00
1 parent b23c9a583a
commit fd628be6ed
110 files changed
+483 -555

No files matched your search

@@ -13,17 +13,17 @@ To support both positional and named arguments when calling a shortcode, use the
With this shortcode template:
{{< code file=layouts/shortcodes/myshortcode.html >}}
```go-html-template {file="layouts/shortcodes/myshortcode.html"}
{{ if .IsNamedParams }}
{{ printf "%s %s." (.Get "greeting") (.Get "firstName") }}
{{ else }}
{{ printf "%s %s." (.Get 0) (.Get 1) }}
{{ end }}
{{< /code >}}
```
Both of these calls return the same value:
{{< code file=content/about.md lang=text >}}
```text {file="content/about.md"}
{{</* myshortcode greeting="Hello" firstName="world" */>}}
{{</* myshortcode "Hello" "world" */>}}
{{< /code >}}
```