# Working with Taxonomies by Hand

Create and manage taxonomies and terms by hand in YAML when the Control Panel is not your vibe.

## Creating Taxonomies

Taxonomies are kept in `content/taxonomies`, each with their own YAML file, and their entries in a matching subdirectory.

```
taxonomies/
|-- tags.yaml
|-- tags/
    |-- good.yaml
    |-- great.yaml
    |-- best.yaml
```

Each Taxonomy's YAML file can contain its title, as well as any data that should be injected into all its terms.

``` yaml
title: Tags
inject:
  foo: bar
```

## Assigning to Collections

A taxonomy (or multiple taxonomies) can be assigned to a collection.

``` yaml
# content/collections/blog.yaml

title: Blog
taxonomies:
  - tags
```

When editing an entry in that collection, taxonomy fields will be automatically added.


## Taxonomizing Entries

To taxonomize an entry, you can add [term values](#term-values-and-slug) to a field named **exactly** the same as the taxonomy's handle.

``` yaml
title: My Entry
tags:
  - foo
  - bar
  - baz
```

Now when listing entries that belong to the `foo`, `bar`, or `baz` terms, the entry will appear.

:::tip
Make sure that the field is named exactly the same as the taxonomy handle, otherwise it will not be considered part of that taxonomy term.
:::

## Additional Term Data

Additional data (custom fields) can be added to a term by creating a yaml file matching the term’s [slug](/taxonomies.md#term-values-and-slugs).

```
site/content/taxonomies
|-- tags.yaml
`-- tags
    |-- foo.yaml
    `-- bar.yaml
```

In the YAML file, add data like so:

``` yaml
food: bacon
drink: whisky
```

Whenever referencing the Terms in your templates, now `{{ food }}` and `{{ drink }}` would output `bacon` and `whiskey` respectively.

Just like entries, these values will be augmented automatically in your templates depending on the blueprint.
