diff --git a/_config.yml b/_config.yml index 7725077b..5ba8eb0b 100644 --- a/_config.yml +++ b/_config.yml @@ -48,6 +48,7 @@ collections: feed: categories: - general + - security show_excerpts: true # set to true to show excerpts on posts @@ -102,6 +103,12 @@ defaults: values: category: packages + - + scope: + path: "_posts/*/security" + values: + category: security + # Set page.lang for all posts files under respective languages and permalink with /en/:collection prefix - diff --git a/_data/posts/t/cn/views.yml b/_data/posts/t/cn/views.yml index a048ccaf..01e37899 100644 --- a/_data/posts/t/cn/views.yml +++ b/_data/posts/t/cn/views.yml @@ -3,7 +3,9 @@ index: apps: 应用 general: 常规 packages: 包 + security: 安全 apps_posts: 关于应用的文章 general_posts: 常规文章 packages_posts: 关于软件包的文章 + security_posts: 安全类文章 subscribe_to_rss_feed: 订阅RSS源 diff --git a/_data/posts/t/en/views.yml b/_data/posts/t/en/views.yml index 4ed5c09c..61170286 100644 --- a/_data/posts/t/en/views.yml +++ b/_data/posts/t/en/views.yml @@ -3,7 +3,9 @@ index: apps: Apps general: General packages: Packages + security: Security apps_posts: Apps Posts general_posts: General Posts packages_posts: Packages Posts + security_posts: Security Posts subscribe_to_rss_feed: Subscribe to RSS feed diff --git a/_data/sitemap.yml b/_data/sitemap.yml index 493793ba..a5be1945 100644 --- a/_data/sitemap.yml +++ b/_data/sitemap.yml @@ -2,4 +2,6 @@ excludes: - /redirects.json - /feed.xml - /general/2022/02/15/termux-apps-vulnerability-disclosures.html + - /en/posts/general/2022/02/15/termux-apps-vulnerability-disclosures.html + - /cn/posts/general/2022/02/15/termux-apps-vulnerability-disclosures.html - /apps/2022/02/25/termux-tasker-v0.6.0-release.html diff --git a/_data/t/cn/views/navigation.yml b/_data/t/cn/views/navigation.yml index f7d14b04..d01164b1 100644 --- a/_data/t/cn/views/navigation.yml +++ b/_data/t/cn/views/navigation.yml @@ -4,6 +4,7 @@ docs: 文档 posts: 文章 packages: 软件包 donate: 捐赠 +security: 安全 privacy_policy: 隐私政策 # Footer diff --git a/_includes/header.html b/_includes/header.html index c9a0e833..7735b63c 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -23,7 +23,7 @@ {%- if file_exists.size != 0 -%} {%- include t.html key="views.navigation.docs" -%} {%- else -%} - {%- include t.html key="views.navigation.docs" lang=site.lang -%} + {%- include t.html key="views.navigation.docs" -%} {%- endif -%} {%- assign path = page.lang | append: "/posts/index.md" -%} @@ -31,7 +31,7 @@ {%- if file_exists.size != 0 -%} {%- include t.html key="views.navigation.posts" -%} {%- else -%} - {%- include t.html key="views.navigation.posts" lang=site.lang -%} + {%- include t.html key="views.navigation.posts" -%} {%- endif -%} {%- include t.html key="views.navigation.packages" -%} @@ -41,7 +41,7 @@ {%- if file_exists.size != 0 -%} {%- include t.html key="views.navigation.donate" -%} {%- else -%} - {%- include t.html key="views.navigation.donate" lang=site.lang -%} + {%- include t.html key="views.navigation.donate" -%} {%- endif -%} {%- assign path = page.lang | append: "/security.md" -%} @@ -49,7 +49,7 @@ {%- if file_exists.size != 0 -%} {%- include t.html key="views.navigation.security" -%} {%- else -%} - {%- include t.html key="views.navigation.security" lang=site.lang -%} + {%- include t.html key="views.navigation.security" -%} {%- endif -%} {%- assign path = page.lang | append: "/privacy-policy.md" -%} @@ -57,7 +57,7 @@ {%- if file_exists.size != 0 -%} {%- include t.html key="views.navigation.privacy_policy" -%} {%- else -%} - {%- include t.html key="views.navigation.privacy_policy" lang=site.lang -%} + {%- include t.html key="views.navigation.privacy_policy" -%} {%- endif -%} {%- if page.page_ref and page.lang -%} diff --git a/_includes/posts/category.html b/_includes/posts/category.html index a3e5a8e1..d7d01883 100644 --- a/_includes/posts/category.html +++ b/_includes/posts/category.html @@ -3,7 +3,7 @@ {%- assign category_posts = site.categories[page.category_name] | where: "lang", page.lang -%} {%- assign category_translate_key = "views.index." | append: page.category_name | append: "_posts" -%} -

{%- include t.html root="posts" key=category_translate_key -%} ({{- category_posts.size | default: "0" -}})

+

{%- include t.html root="posts" key=category_translate_key %} ({{- category_posts.size | default: "0" -}})

{%- if category_posts.size > 0 -%}