Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/utils/list-keywords.html')
-rw-r--r--layouts/partials/utils/list-keywords.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/partials/utils/list-keywords.html b/layouts/partials/utils/list-keywords.html
new file mode 100644
index 0000000..61fb522
--- /dev/null
+++ b/layouts/partials/utils/list-keywords.html
@@ -0,0 +1,16 @@
+{{/*
+ Parameters:
+ - type: "tags" or "categories"
+ - context: (.)
+ - scratch: (Scratch)
+ - removeDuplicates: BOOL
+*/}}
+
+{{ .scratch.Delete .type }}
+{{ partial "utils/get-keywords.html" (dict "type" .type "context" .context "scratch" .scratch "removeDuplicates" .removeDuplicates) }}
+{{ range (.scratch.Get .type) }}
+ <a href="{{ (print "/" $.type "/") | relLangURL }}{{ . | urlize }}" title="{{ . }}">
+ {{ . }}
+ </a>
+{{ end }}
+{{ .scratch.Delete .type }}