mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -1,37 +1,28 @@
|
||||
{{/*
|
||||
Renders the child sections of the given top-level section, listing each child's immediate descendants.
|
||||
{{- /*
|
||||
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.
|
||||
@returns template.HTML
|
||||
|
||||
@example {{% quick-reference section="functions" %}}
|
||||
*/}}
|
||||
|
||||
@example {{% quick-reference section="/functions" %}}
|
||||
*/ -}}
|
||||
{{ $section := "" }}
|
||||
{{ with .Get "section" }}
|
||||
{{ $section = . }}
|
||||
{{ else }}
|
||||
{{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Position }}
|
||||
{{ errorf "The %q shortcode requires a 'section' parameter. See %s" .Name .Position }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Do not change the markdown indentation, and do not remove blank lines. */}}
|
||||
{{ with site.GetPage $section }}
|
||||
{{ range .Sections }}
|
||||
|
||||
## {{ .LinkTitle }}
|
||||
{{ .RawContent }}
|
||||
|
||||
{{ range .Pages }}
|
||||
{{ $aliases := "" }}
|
||||
{{ if eq .Section "functions" }}
|
||||
{{ with .Params.action.aliases }}
|
||||
{{ $aliases = delimit . " or " }}
|
||||
{{ end }}
|
||||
## {{ .LinkTitle }}{{/* Do not indent. */}}
|
||||
{{ .Description }}{{/* Do not indent. */}}
|
||||
{{ .Content }}
|
||||
{{ with .Pages }}
|
||||
{{ range . }}
|
||||
[{{ .LinkTitle }}]({{ .RelPermalink }}){{/* Do not indent. */}}
|
||||
: {{ .Description }}{{/* Do not indent. */}}
|
||||
{{ end }}
|
||||
|
||||
[{{ .LinkTitle }}]({{ .RelPermalink }}) {{ with $aliases }}({{ . }}){{ end }}
|
||||
: {{ .Description }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
|
Reference in New Issue
Block a user