Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ category_archive:
tag_archive:
type: liquid
path: /tags/
# show_taxonomy: false # set to false to hide tag/category lists on posts
# https://github.com/jekyll/jekyll-archives
# jekyll-archives:
# enabled:
Expand Down
14 changes: 8 additions & 6 deletions _includes/page__taxonomy.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{% assign locale = include.locale | default: site.locale %}
{% if site.tag_archive.type and page.tags[0] %}
{% include tag-list.html locale=locale %}
{% endif %}
{% unless site.show_taxonomy == false %}
{% if site.tag_archive.type and page.tags[0] %}
{% include tag-list.html locale=locale %}
{% endif %}

{% if site.category_archive.type and page.categories[0] %}
{% include category-list.html locale=locale %}
{% endif %}
{% if site.category_archive.type and page.categories[0] %}
{% include category-list.html locale=locale %}
{% endif %}
{% endunless %}
6 changes: 6 additions & 0 deletions docs/_docs/05-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,12 @@ tag_archive:
path: /tags/
```

To hide the tag and category lists displayed on each post, set `show_taxonomy: false` in `_config.yml`. The taxonomy archive pages themselves are unaffected — only the per-post lists are suppressed.

```yaml
show_taxonomy: false
```

Which would create category and tag links in the breadcrumbs and page meta like: `/categories/#foo` and `/tags/#foo`.

**Note:** these are simply hash (fragment) links into the full taxonomy index pages. For them to resolve properly, the category and tag index pages need to exist at [`/categories/index.html`](https://github.com/{{ site.repository }}/blob/master/docs/_pages/category-archive.md) (copy to `_pages/category-archive.md`) and [`/tags/index.html`](https://github.com/{{ site.repository }}/blob/master/docs/_pages/tag-archive.md) (copy to `_pages/tag-archive.md`).
Expand Down