Replace erroneous use of nocopy shortcode param

This commit is contained in:
Joe Mooring 2023-03-27 13:31:27 -07:00 committed by Joe Mooring
parent 064896c06e
commit ac333c7954

View File

@ -51,7 +51,7 @@ Both of the above `default` function calls return `Roboto`.
A `default` value, however, does not need to be hard coded like the previous example. The `default` value can be a variable or pulled directly from the front matter using dot notation:
{{< code file="variable-as-default-value.html" nocopy="true" >}}
{{< code file="variable-as-default-value.html" copy="false" >}}
{{$old := .Params.oldparam }}
<p>{{ .Params.newparam | default $old }}</p>
{{< /code >}}
@ -78,14 +78,14 @@ The following have equivalent return values but are far less terse. This demonst
Using `if`:
{{< code file="if-instead-of-default.html" nocopy="true" >}}
{{< code file="if-instead-of-default.html" copy="false" >}}
<title>{{if .Params.seo_title}}{{.Params.seo_title}}{{else}}{{.Title}}{{end}}</title>
=> Sane Defaults
{{< /code >}}
Using `with`:
{{< code file="with-instead-of-default.html" nocopy="true" >}}
{{< code file="with-instead-of-default.html" copy="false" >}}
<title>{{with .Params.seo_title}}{{.}}{{else}}{{.Title}}{{end}}</title>
=> Sane Defaults
{{< /code >}}