/
githubmirror
/
hugo
Обзор
Документация
Войти
/
githubmirror
/
hugo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/layouts/_shortcodes/quick-reference.html
38 строк
1 KB
Bjørn Erik Pedersen
Merge commit 'c86d9f4aa8a58931f52df6516f10b67c807505fb'
18 июн 2026, 17:28
18 июн 2026, 17:28
e8988c3
Код
Авторство
О чём код?
{{/* gotmplfmt-ignore-all */ -}} {{/* Renders the child sections of the given top-level section, listing each child's immediate descendants. @param {string} section The top-level section to render. @example {{% quick-reference section="/functions" %}} */}} {{ $section := "" }} {{ with .Get "section" }} {{ $section = . }} {{ else }} {{ errorf "The %q shortcode requires a 'section' parameter. See %s" .Name .Position }} {{ end }} {{ with site.GetPage $section }} {{ range .Sections }} ## {{ .LinkTitle }}{{/* Do not indent. */}} {{ .Description }}{{/* Do not indent. */}} {{ .Content }} {{ with .Pages }} {{ range . }} {{/* Use page Path as the link destination for render hook to resolve correctly. */}} {{ if .Params.isFunctionOrMethod }} [`{{ .LinkTitle }}`]({{ .Path }}){{/* Do not indent. */}} {{ else }} [{{ .LinkTitle }}]({{ .Path }}){{/* Do not indent. */}} {{ end }} : {{ .Description }}{{/* Do not indent. */}} {{ end }} {{ end }} {{ end }} {{ else }} {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Position }} {{ end }}