mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
22 lines
656 B
HTML
22 lines
656 B
HTML
{{/* gotmplfmt-ignore-all */ -}}
|
|
|
|
{{/*
|
|
Renders the definition of the given glossary term.
|
|
|
|
@param {string} (.Get 0) The glossary term.
|
|
|
|
@example {{% glossary-term float %}}
|
|
@example {{% glossary-term "floating point" %}}
|
|
*/}}
|
|
|
|
{{- with .Get 0 }}
|
|
{{- $path := printf "/quick-reference/glossary/%s" (urlize .) }}
|
|
{{- with site.GetPage $path }}
|
|
{{ .RenderShortcodes }}{{/* Do not indent. */}}
|
|
{{- else }}
|
|
{{- errorf "The glossary term (%s) shortcode was unable to find %s: see %s" $.Name $path $.Position }}
|
|
{{- end }}
|
|
{{- else }}
|
|
{{- errorf "The glossary term (%s) shortcode requires one positional parameter: see %s" $.Name $.Position }}
|
|
{{- end -}}
|