Improved the page recognition.

Useful for label localization
This commit is contained in:
Cotes Chung 2020-06-28 23:11:46 +08:00
parent cc4f18a5a2
commit 46c2cfe64e
5 changed files with 7 additions and 7 deletions

View file

@ -12,17 +12,17 @@
{% elsif page.layout == 'page' %}
{% if page.title == 'Categories' %}
{% if page.type == 'categories' %}
<link rel="preload" href="{{ '/assets/css/categories.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/categories.css' | relative_url }}">
{% elsif page.title == 'Tags' %}
{% elsif page.type == 'tags' %}
<link rel="preload" href="{{ '/assets/css/tags.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/tags.css' | relative_url }}">
{% elsif page.title == 'Archives' %}
{% elsif page.type == 'archives' %}
<link rel="preload" href="{{ '/assets/css/archives.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/archives.css' | relative_url }}">

View file

@ -30,7 +30,7 @@
{% elsif page.layout == 'page' %}
{% if page.title == 'Categories' %}
{% if page.type == 'categories' %}
<script src="{{ '/assets/js/categories.min.js' | relative_url }}" async></script>
{% else %}
<script src="{{ '/assets/js/page.min.js' | relative_url }}" async></script>

View file

@ -1,6 +1,6 @@
---
title: Archives
type: archives
# The Archives of posts.
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy

View file

@ -1,6 +1,6 @@
---
title: Categories
type: categories
# All the Categories of posts
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy

View file

@ -1,6 +1,6 @@
---
title: Tags
type: tags
# All the Tags of posts.
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy