features

Taxonomies and Tags

Taxonomies in Kiln let you organize and cross-reference your content through tags, categories, or any custom dimension.

What are Taxonomies?

A taxonomy is a classification system applied to collection items via Frontmatter. Common examples:

Defining Taxonomies

Taxonomies are configured in site.yaml:

taxonomies:
                  tags:
                    permalink: /tags/:slug/
                    paginate: 20
                  categories:
                    permalink: /categories/:slug/
                    paginate: 10
                

And applied to collections:

collections:
                  posts:
                    taxonomies:
                      - tags
                      - categories
                

Using Tags in Frontmatter

Simply add a list to your Frontmatter:

---
                title: My Post
                tags:
                  - kiln
                  - getting-started
                  - documentation
                categories:
                  - tutorial
                ---
                

Generated Pages

Kiln automatically generates:

Paginated at the configured limit.

In templates, display tags and categories:

<div class="post-tags">
                  {% for tag in page.tags %}
                    <a href="/tags/{{ tag | slugify }}/" class="tag">{{ tag }}</a>
                  {% endfor %}
                </div>
                
                <div class="post-categories">
                  {% for cat in page.categories %}
                    <span class="category">{{ cat }}</span>
                  {% endfor %}
                </div>
                

Benefits

Taxonomies are a powerful way to organize and surface your content!