blob: 952225ef1943153f9b037653af3f502c37e2f90d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{{/*
Parameters:
- type: "tags" or "categories"
- context: (project_sections)
- site: (Site)
- scratch: (Scratch)
- removeDuplicates: BOOL
*/}}
{{ .scratch.Delete .type }}
{{ range .context }}
{{ with $.site.GetPage "section" . }}
{{ $params := (dict "type" $.type "context" . "scratch" $.scratch "removeDuplicates" $.removeDuplicates) }}
{{ partial "utils/get-keywords.html" $params }}
{{ end }}
{{ end }}
{{ .scratch.Set .type (uniq (.scratch.Get .type)) }}
{{ range (.scratch.Get .type) }}
{{/* HACK: (replace . "#" "%23/") is a special case for "#" character */}}
<a href="{{ (print "/" $.type "/") | relLangURL }}{{ replace . "#" "%23/" | urlize }}" title="{{ . }}">
{{ . }}
</a>
{{ end }}
{{ .scratch.Delete .type }}
|