mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Merge commit 'e509cac533600cf4fa8382c9cdab78ddd82db688'
This commit is contained in:
12
docs/layouts/partials/docs/functions-aliases.html
Normal file
12
docs/layouts/partials/docs/functions-aliases.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- with .Params.function.aliases }}
|
||||
{{- $label := "Alias" }}
|
||||
{{- if gt (len .) 1 }}
|
||||
{{- $label = "Aliases" }}
|
||||
{{- end }}
|
||||
<h2 class="minor mb1 primary-color-dark">{{ $label }}</h2>
|
||||
{{- range . }}
|
||||
<pre class="f5 mb4 ph3 pv2 bg-light-gray" style="border-left:4px solid #0594CB;">
|
||||
{{- . -}}
|
||||
</pre>
|
||||
{{- end }}
|
||||
{{- end -}}
|
12
docs/layouts/partials/docs/functions-signatures.html
Normal file
12
docs/layouts/partials/docs/functions-signatures.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- with .Params.function.signatures }}
|
||||
<h2 class="minor mb1 pt4 primary-color-dark">Syntax</h2>
|
||||
{{- range . }}
|
||||
{{- $signature := . }}
|
||||
{{- if $.Params.function.returnType }}
|
||||
{{- $signature = printf "%s ⟼ %s" . $.Params.function.returnType }}
|
||||
{{- end }}
|
||||
<pre class="f5 mb4 ph3 pv2 bg-light-gray" style="border-left:4px solid #0594CB;">
|
||||
{{- $signature -}}
|
||||
</pre>
|
||||
{{- end }}
|
||||
{{- end -}}
|
17
docs/layouts/partials/related.html
Normal file
17
docs/layouts/partials/related.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{{- $heading := "See also" }}
|
||||
{{- $related := site.RegularPages.Related . | first 5 }}
|
||||
|
||||
{{- if eq .Type "functions" }}
|
||||
{{- $heading = "Related functions" }}
|
||||
{{- $opts := dict "document" . "indices" (slice "relatedFunctions") }}
|
||||
{{- $related = site.RegularPages.Related $opts | first 7 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with $related }}
|
||||
<h2>{{ $heading }}</h2>
|
||||
<ul>
|
||||
{{- range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
Reference in New Issue
Block a user