From 63dd8879b3baaef7988ec70614f4c7e0e6d557f0 Mon Sep 17 00:00:00 2001 From: m9810223 Date: Wed, 19 May 2021 23:05:21 +0800 Subject: [PATCH] move categories to components --- layouts/partials/article/components/categories.html | 9 +++++++++ layouts/partials/article/components/details.html | 10 +--------- 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 layouts/partials/article/components/categories.html diff --git a/layouts/partials/article/components/categories.html b/layouts/partials/article/components/categories.html new file mode 100644 index 0000000..c296f35 --- /dev/null +++ b/layouts/partials/article/components/categories.html @@ -0,0 +1,9 @@ +{{ if .Params.categories }} +
+ {{ range (.GetTerms "categories") }} + + {{ .LinkTitle }} + + {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 5c5397b..382e310 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -1,13 +1,5 @@
- {{ if .Params.categories }} - - {{ end }} + {{ partial "article/components/categories" . }}