Tags
Make it easier for readers to browse content by using tags to categorise posts
The NHS.UK Eleventy Plugin lets you use tags to categorise pages. Each post can display its list of tags, which link to a page that lists other posts with the same tag. Follow these instructions to enable this feature.
Create a page that lists all tags used
To include a list of all tags used on your website, create a page that uses the tags
layout:
layout: tags
title: Tags
permalink: "/tags/"
Create a page for each tag
To generate a page for each tag used on your website, create a page that uses the tag
layout and paginates collections.tags
data:
layout: tag
pagination:
addAllPagesToCollections: true
alias: tag
data: collections.tags
size: 1
permalink: "/tags/{{ tag | slug }}/"
eleventyComputed:
title: "Posts tagged ‘{{ tag }}’"
eleventyNavigation:
parent: Tags