Skip to content

Commit 46c2cfe

Browse files
committed
Improved the page recognition.
Useful for label localization
1 parent cc4f18a commit 46c2cfe

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

_includes/css-selector.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212

1313
{% elsif page.layout == 'page' %}
1414

15-
{% if page.title == 'Categories' %}
15+
{% if page.type == 'categories' %}
1616

1717
<link rel="preload" href="{{ '/assets/css/categories.css' | relative_url }}" as="style">
1818
<link rel="stylesheet" href="{{ '/assets/css/categories.css' | relative_url }}">
1919

20-
{% elsif page.title == 'Tags' %}
20+
{% elsif page.type == 'tags' %}
2121

2222
<link rel="preload" href="{{ '/assets/css/tags.css' | relative_url }}" as="style">
2323
<link rel="stylesheet" href="{{ '/assets/css/tags.css' | relative_url }}">
2424

25-
{% elsif page.title == 'Archives' %}
25+
{% elsif page.type == 'archives' %}
2626

2727
<link rel="preload" href="{{ '/assets/css/archives.css' | relative_url }}" as="style">
2828
<link rel="stylesheet" href="{{ '/assets/css/archives.css' | relative_url }}">

_includes/js-selector.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
{% elsif page.layout == 'page' %}
3232

33-
{% if page.title == 'Categories' %}
33+
{% if page.type == 'categories' %}
3434
<script src="{{ '/assets/js/categories.min.js' | relative_url }}" async></script>
3535
{% else %}
3636
<script src="{{ '/assets/js/page.min.js' | relative_url }}" async></script>

tabs/archives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Archives
3-
3+
type: archives
44
# The Archives of posts.
55
# v2.0
66
# https://github.com/cotes2020/jekyll-theme-chirpy

tabs/categories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Categories
3-
3+
type: categories
44
# All the Categories of posts
55
# v2.0
66
# https://github.com/cotes2020/jekyll-theme-chirpy

tabs/tags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Tags
3-
3+
type: tags
44
# All the Tags of posts.
55
# v2.0
66
# https://github.com/cotes2020/jekyll-theme-chirpy

0 commit comments

Comments
 (0)