treefmt: fix config, add prettier-plugin-go-template
This commit is contained in:
parent
6ccec6f792
commit
9e8f680c52
10 changed files with 137 additions and 85 deletions
|
|
@ -1,13 +1,17 @@
|
|||
{{- /* For a given taxonomy, renders a list of terms assigned to the page.
|
||||
@context {page} page The current page. @context {string} taxonomy The taxonony.
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} */}} {{-
|
||||
$page := .page }} {{- $taxonomy := .taxonomy }} {{- with $page.GetTerms
|
||||
$taxonomy }} {{- $label := (index . 0).Parent.LinkTitle }}
|
||||
<div class="tags">
|
||||
<ul>
|
||||
{{- range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
@context {page} page The current page. @context {string} taxonomy The taxonony.
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .)
|
||||
}}
|
||||
*/}} {{- $page := .page }} {{- $taxonomy := .taxonomy }}
|
||||
{{- with $page.GetTerms
|
||||
$taxonomy
|
||||
}}
|
||||
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||
<div class="tags">
|
||||
<ul>
|
||||
{{- range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue