From ae477ab224489c9a5ff56705da5f84296ca82bb1 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Fri, 1 Jan 2021 13:04:37 +0100 Subject: [PATCH] refactor(archives): remove archive.categories i18n item (#108) It's possible in the future to display another kind of taxonomy. To translate that title, create _index.md under content/categories, with the following content: --- title: Category --- --- i18n/en.yaml | 4 ---- i18n/ja.yaml | 4 ---- i18n/pt-BR.yaml | 4 ---- i18n/ru.yaml | 4 ---- i18n/tr.yaml | 4 ---- i18n/zh-CN.yaml | 4 ---- layouts/_default/archives.html | 9 +++++---- 7 files changed, 5 insertions(+), 28 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index e131b61..99d34ce 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -16,10 +16,6 @@ list: one: Subsection other: Subsections -archives: - categories: - other: Categories - article: relatedContents: other: Related contents diff --git a/i18n/ja.yaml b/i18n/ja.yaml index e83e531..e9744c2 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -4,10 +4,6 @@ toggleMenu: darkMode: other: ダークモード -archives: - categories: - other: 分類 - article: relatedContents: other: 関連するコンテンツ diff --git a/i18n/pt-BR.yaml b/i18n/pt-BR.yaml index 5380c68..33f14f8 100644 --- a/i18n/pt-BR.yaml +++ b/i18n/pt-BR.yaml @@ -1,10 +1,6 @@ toggleMenu: other: Alternar Menu -archives: - categories: - other: Categorias - article: relatedContents: other: Conteúdos Relacionados diff --git a/i18n/ru.yaml b/i18n/ru.yaml index f606ffa..284c45c 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -20,10 +20,6 @@ list: many: Подразделов other: Подразделов -archives: - categories: - other: Категории - article: relatedContents: other: Также рекомендуем diff --git a/i18n/tr.yaml b/i18n/tr.yaml index fbcb7b0..fe9269b 100644 --- a/i18n/tr.yaml +++ b/i18n/tr.yaml @@ -16,10 +16,6 @@ list: one: Alt bölüm other: Alt bölümler -archives: - categories: - other: Kategoriler - article: relatedContents: other: Alakalı içerikler diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index 0583bf7..9f1ac94 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -4,10 +4,6 @@ toggleMenu: darkMode: other: 暗色模式 -archives: - categories: - other: 分类 - article: relatedContents: other: 相关文章 diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 49c0ddf..321aa6d 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -1,11 +1,12 @@ {{ define "body-class" }}template-archives{{ end }} {{ define "main" }} - {{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }} - {{ if $categories }} -

{{ T "archives.categories" }}

+ {{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}} + {{- $terms := $taxonomy.Pages -}} + {{ if $terms }} +

{{ $taxonomy.Title }}

- {{ range $categories }} + {{ range $terms }} {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }} {{ end }}