From 46c2cfe64e3815c2bc505ef364a5e69c119410ea Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 28 Jun 2020 23:11:46 +0800 Subject: [PATCH] Improved the page recognition. Useful for label localization --- _includes/css-selector.html | 6 +++--- _includes/js-selector.html | 2 +- tabs/archives.md | 2 +- tabs/categories.md | 2 +- tabs/tags.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_includes/css-selector.html b/_includes/css-selector.html index da7e668..53e53db 100644 --- a/_includes/css-selector.html +++ b/_includes/css-selector.html @@ -12,17 +12,17 @@ {% elsif page.layout == 'page' %} - {% if page.title == 'Categories' %} + {% if page.type == 'categories' %} - {% elsif page.title == 'Tags' %} + {% elsif page.type == 'tags' %} - {% elsif page.title == 'Archives' %} + {% elsif page.type == 'archives' %} diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 3f8a873..83afe3c 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -30,7 +30,7 @@ {% elsif page.layout == 'page' %} - {% if page.title == 'Categories' %} + {% if page.type == 'categories' %} {% else %} diff --git a/tabs/archives.md b/tabs/archives.md index b7a2d90..e4d4348 100644 --- a/tabs/archives.md +++ b/tabs/archives.md @@ -1,6 +1,6 @@ --- title: Archives - +type: archives # The Archives of posts. # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy diff --git a/tabs/categories.md b/tabs/categories.md index fed6b98..d621bfb 100644 --- a/tabs/categories.md +++ b/tabs/categories.md @@ -1,6 +1,6 @@ --- title: Categories - +type: categories # All the Categories of posts # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy diff --git a/tabs/tags.md b/tabs/tags.md index 0627190..6a2152a 100644 --- a/tabs/tags.md +++ b/tabs/tags.md @@ -1,6 +1,6 @@ --- title: Tags - +type: tags # All the Tags of posts. # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy