From 1f798bf84ad23c2680c7e49ba07b0914da856048 Mon Sep 17 00:00:00 2001 From: Saman Saadi Date: Mon, 8 Jun 2020 01:52:29 -0400 Subject: [PATCH] Separate taxonomy tags based on the language. Thanks to https://github.com/getgrav/grav-plugin-taxonomylist/issues/22 --- config/plugins/taxonomylist.yaml | 7 +++++++ config/site.yaml | 3 +++ pages/02.blog/credit_cards_and_rewards/item.en.md | 2 +- pages/02.blog/persian_decimal_separator/item.fa.md | 2 +- pages/02.blog/phone_numbers/item.en.md | 2 +- pages/02.blog/time_zones/item.en.md | 2 +- 6 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 config/plugins/taxonomylist.yaml diff --git a/config/plugins/taxonomylist.yaml b/config/plugins/taxonomylist.yaml new file mode 100644 index 0000000..945290e --- /dev/null +++ b/config/plugins/taxonomylist.yaml @@ -0,0 +1,7 @@ +enabled: true +route: '/blog' +language: + en: + taxonomy: en_tag + fa: + taxonomy: fa_tag diff --git a/config/site.yaml b/config/site.yaml index 4e10e85..7d5c282 100644 --- a/config/site.yaml +++ b/config/site.yaml @@ -6,6 +6,9 @@ metadata: description: 'Welcome to Saman Saadi Website' blog: hero_image: 'user://pages/files/images/my-header.jpg' + +taxonomies: [category,en_tag, fa_tag] + #menu: # - text: Blog # icon: pencil diff --git a/pages/02.blog/credit_cards_and_rewards/item.en.md b/pages/02.blog/credit_cards_and_rewards/item.en.md index 083ba05..a338b12 100644 --- a/pages/02.blog/credit_cards_and_rewards/item.en.md +++ b/pages/02.blog/credit_cards_and_rewards/item.en.md @@ -10,7 +10,7 @@ hero_image: header.png taxonomy: category: blog - tag: [credit card, finance, money] + en_tag: [credit card, finance, money] --- You can find a lot of Credit Cards with different Rewards Programs. Basically we have two rewards category: cash-based cards and point-based cards. diff --git a/pages/02.blog/persian_decimal_separator/item.fa.md b/pages/02.blog/persian_decimal_separator/item.fa.md index 0df1371..d0d15f9 100644 --- a/pages/02.blog/persian_decimal_separator/item.fa.md +++ b/pages/02.blog/persian_decimal_separator/item.fa.md @@ -10,7 +10,7 @@ hero_image: Farsi_fonts_2020-03-22_2035_close.png taxonomy: category: blog - tag: [فونت فارسی, ممیز] + fa_tag: [فونت فارسی, ممیز] --- متأسفانه خیلی‌ها از جمله کسایی که کارشون ویرایش مطالب فارسی هست چیز زیادی از ممیز فارسی نمی‌دونن. ممیز فارسی ٫ هست نه /. مهم‌ترین کاربردش هم توی سایت‌های خبرگزاری هست. حتماً دیدین که مثلاً اگه خبری در مورد زلزله می‌گن آدم نمی‌دونه که زلزله‌ی ۳٫۷ اومده یا ۷٫۳. علتش این هست که چون از ممیز انگلیسی استفاده می‌کنن، ممکن هست که برعکس نشون داده بشه. diff --git a/pages/02.blog/phone_numbers/item.en.md b/pages/02.blog/phone_numbers/item.en.md index 7149e97..f3c5d29 100644 --- a/pages/02.blog/phone_numbers/item.en.md +++ b/pages/02.blog/phone_numbers/item.en.md @@ -8,7 +8,7 @@ hero_image: header.jpg taxonomy: category: blog - tag: [travel, phone, cellphone, city] + en_tag: [travel, phone, cellphone, city] --- diff --git a/pages/02.blog/time_zones/item.en.md b/pages/02.blog/time_zones/item.en.md index b592d5e..55efddf 100644 --- a/pages/02.blog/time_zones/item.en.md +++ b/pages/02.blog/time_zones/item.en.md @@ -8,7 +8,7 @@ hero_image: header.png taxonomy: category: blog - tag: [travel, city, linux, date, time zone] + en_tag: [travel, city, linux, date, time zone] --- There is an independent database of different zones named tz database. Basically they named each zone start with the continent or ocean name then follows slash and finally the city or region name. For example `America/Montreal`, `America/New_York`, `Asia/Tehran`, `Europe/London`.