Skip to content

Commit

Permalink
Fix missing css in category and tag lists
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskyfung committed Feb 20, 2021
1 parent 297bf77 commit da0c4a6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,29 @@ This theme includes Jekyll plugins that are not in the whitelist of Github Pages
1. Deploy disqus-amp.html to another domain or subdoamin.
2. Copy the external URL link as the value of `amp_disqus_url` in _config.yml.

### Enabling Lists of Categories and Tags
1. In your root directory, create a folder named __category__ and __tag__, respectively.
2. New a file and name it to **index.html** in your __category__ and/or __tag__ folder(s).
3. Copy the following front matters to the corresponding **index.html**:

- For __category/index.html__,

```html
---
layout: category-list
title: List of Categories
---
```

- For __tag/index.html__

```html
---
layout: tag-list
title: List of Tags
---
```

* * *

## Writing Posts
Expand Down
1 change: 0 additions & 1 deletion _layouts/category-list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
layout: page-right-sidebar
title: List of Categories
comments: false
css:
badge: true
Expand Down
7 changes: 5 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@
{% include amp-bs4.css %}
{% include amp-theme.css %}
{% include amp-custom.css %}
{% if page.css.badge == true %}
{% if layout.css.badge == true or page.css.badge == true %}
{% include amp-bs4-badge.css %}
{% endif %}
{% if page.css.syntax == true %}
{% if layout.css.syntax == true or page.css.syntax == true %}
{% include amp-syntax-highlight.css %}
{% endif %}
{% if layout.css.custom %}
{{ layout.css.custom }}
{% endif %}
{% if page.css.custom %}
{{ page.css.custom }}
{% endif %}
Expand Down
1 change: 0 additions & 1 deletion _layouts/tag-list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
layout: page-right-sidebar
title: List of Tags
comments: false
css:
badge: true
Expand Down

0 comments on commit da0c4a6

Please sign in to comment.