From c7a03ea847411f4defea5013f294778e0f80280c Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Wed, 6 Dec 2023 11:26:08 +0800 Subject: [PATCH] :tada: Feat: add taxonomy collections --- hugo.toml | 11 +++++++++ i18n/de.toml | 6 +++++ i18n/en.toml | 14 ++++++++---- i18n/es.toml | 6 +++++ i18n/fr.toml | 6 +++++ i18n/it.toml | 6 +++++ i18n/pl.toml | 6 +++++ i18n/pt-BR.toml | 6 +++++ i18n/ro.toml | 6 +++++ i18n/ru.toml | 6 +++++ i18n/sr.toml | 6 +++++ i18n/vi.toml | 6 +++++ i18n/zh-CN.toml | 6 +++++ i18n/zh-TW.toml | 6 +++++ layouts/taxonomy/list.html | 28 ++++++++++++++--------- layouts/taxonomy/terms/collections.html | 30 +++++++++++++++++++++++++ 16 files changed, 140 insertions(+), 15 deletions(-) create mode 100644 layouts/taxonomy/terms/collections.html diff --git a/hugo.toml b/hugo.toml index 16c3ac8b..fad26691 100644 --- a/hugo.toml +++ b/hugo.toml @@ -991,3 +991,14 @@ enableEmoji = true section = ["HTML", "RSS"] taxonomy = ["HTML"] term = ["HTML", "RSS"] + +# ------------------------------------------------------------------------------------- +# Taxonomies Configuration +# See: https://gohugo.io/content-management/taxonomies/#configure-taxonomies +# ------------------------------------------------------------------------------------- + +[taxonomies] + # series = "series" + category = "categories" + tag = "tags" + collections = "collections" diff --git a/i18n/de.toml b/i18n/de.toml index be2f4fb1..7530ae9a 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -29,6 +29,12 @@ other = "Kategorie" [categories] other = "Kategorien" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Tag" diff --git a/i18n/en.toml b/i18n/en.toml index 2e37c7c5..0fbaa52a 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -27,6 +27,12 @@ other = "Category" [categories] other = "Categories" +[collection] +other = "Collection" + +[collections] +other = "Collections" + [tag] other = "Tag" @@ -96,10 +102,10 @@ other = "Share on" # === posts/single.html === [single] -contents= "Contents" -repost= "Repost" -publishedOnDate= "published on {{ .Date }}" -includedInCategories= "included in {{ .Categories }}" +contents = "Contents" +repost = "Repost" +publishedOnDate = "published on {{ .Date }}" +includedInCategories = "included in {{ .Categories }}" views = "views" comments = "comments" author = "Author" diff --git a/i18n/es.toml b/i18n/es.toml index 8e32430e..f76800d9 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -29,6 +29,12 @@ other = "Categoría" [categories] other = "Categorías" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Etiqueta" diff --git a/i18n/fr.toml b/i18n/fr.toml index fb8763d2..bfa28cc3 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -28,6 +28,12 @@ other = "Catégorie" [categories] other = "Catégories" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Tag" diff --git a/i18n/it.toml b/i18n/it.toml index ba3baf74..6d4b20df 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -29,6 +29,12 @@ other = "Categoria" [categories] other = "Categorie" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Etichetta" diff --git a/i18n/pl.toml b/i18n/pl.toml index e6e67083..ddca26fb 100644 --- a/i18n/pl.toml +++ b/i18n/pl.toml @@ -29,6 +29,12 @@ other = "Kategoria" [categories] other = "Kategorie" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Tag" diff --git a/i18n/pt-BR.toml b/i18n/pt-BR.toml index 27f09f68..d5c55ad7 100644 --- a/i18n/pt-BR.toml +++ b/i18n/pt-BR.toml @@ -29,6 +29,12 @@ other = "Categoria" [categories] other = "Categorias" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Tag" diff --git a/i18n/ro.toml b/i18n/ro.toml index 93089ac8..e3981b8a 100644 --- a/i18n/ro.toml +++ b/i18n/ro.toml @@ -29,6 +29,12 @@ other = "Categorie" [categories] other = "Categorii" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Etichetă" diff --git a/i18n/ru.toml b/i18n/ru.toml index 47a853ef..2d8cf6e7 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -29,6 +29,12 @@ other = "Категория" [categories] other = "Категории" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Тэг" diff --git a/i18n/sr.toml b/i18n/sr.toml index 07b86a99..0c171693 100644 --- a/i18n/sr.toml +++ b/i18n/sr.toml @@ -29,6 +29,12 @@ other = "Категорија" [categories] other = "Категорије" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Таг" diff --git a/i18n/vi.toml b/i18n/vi.toml index c5025ad0..378cedd4 100644 --- a/i18n/vi.toml +++ b/i18n/vi.toml @@ -28,6 +28,12 @@ other = "Danh mục" [categories] other = "Danh mục" +[collection] +other = "" + +[collections] +other = "" + [tag] other = "Nhãn" diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml index bb795b7d..084fd398 100644 --- a/i18n/zh-CN.toml +++ b/i18n/zh-CN.toml @@ -28,6 +28,12 @@ other = "分类" [categories] other = "分类" +[collection] +other = "合集" + +[collections] +other = "合集" + [tag] other = "标签" diff --git a/i18n/zh-TW.toml b/i18n/zh-TW.toml index c9e421f5..3732c671 100644 --- a/i18n/zh-TW.toml +++ b/i18n/zh-TW.toml @@ -28,6 +28,12 @@ other = "分類" [categories] other = "分類" +[collection] +other = "合集" + +[collections] +other = "合集" + [tag] other = "標籤" diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html index ff187160..1b0d59b1 100644 --- a/layouts/taxonomy/list.html +++ b/layouts/taxonomy/list.html @@ -5,18 +5,24 @@ {{- define "content" -}}