Debian Codegraph @

docs/layouts/_shortcodes/glossary-term.html

raw
1 {{/* gotmplfmt-ignore-all */ -}}
2
3 {{/*
4 Renders the definition of the given glossary term.
5
6 @param {string} (.Get 0) The glossary term.
7
8 @example {{% glossary-term float %}}
9 @example {{% glossary-term "floating point" %}}
10 */}}
11
12 {{- with .Get 0 }}
13 {{- $path := printf "/quick-reference/glossary/%s" (urlize .) }}
14 {{- with site.GetPage $path }}
15 {{ .RenderShortcodes }}{{/* Do not indent. */}}
16 {{- else }}
17 {{- errorf "The glossary term (%s) shortcode was unable to find %s: see %s" $.Name $path $.Position }}
18 {{- end }}
19 {{- else }}
20 {{- errorf "The glossary term (%s) shortcode requires one positional parameter: see %s" $.Name $.Position }}
21 {{- end -}}