2013-10-31 09:51:13 -04:00
|
|
|
|
---
|
2014-04-23 03:00:11 -04:00
|
|
|
|
title: "Taxonomy Overview"
|
2014-05-27 18:32:57 -04:00
|
|
|
|
linktitle: "Overview"
|
2013-10-31 09:51:13 -04:00
|
|
|
|
date: "2013-07-01"
|
2014-04-23 03:00:11 -04:00
|
|
|
|
aliases: ["/indexes/overview/","/doc/indexes/", "/extras/indexes"]
|
|
|
|
|
weight: 10
|
|
|
|
|
menu:
|
|
|
|
|
main:
|
|
|
|
|
parent: 'taxonomy'
|
2014-05-27 18:32:57 -04:00
|
|
|
|
identifier: 'taxonomy overview'
|
|
|
|
|
prev: "/templates/404"
|
|
|
|
|
next: "/taxonomies/usage"
|
2013-10-31 09:51:13 -04:00
|
|
|
|
---
|
|
|
|
|
|
2014-05-27 18:32:57 -04:00
|
|
|
|
Hugo includes support for user defined groupings of content called
|
|
|
|
|
taxonomies. Taxonomies give us a way to classify our content so we can
|
|
|
|
|
demonstrate relationships in a variety of logical ways.
|
|
|
|
|
|
|
|
|
|
The default taxonomies for Hugo are tags and categories. These
|
|
|
|
|
taxonomies are common to many websites systems (Wordpress, Drupal,
|
|
|
|
|
Jekyll). Unlike all of those Systems, Hugo makes it trivial to customize
|
|
|
|
|
the taxonomies you will be using for your site however you wish. Another
|
|
|
|
|
good use for taxonomies is to group a set of posts into a series. Other
|
|
|
|
|
common uses would include categories, tags, groups, series and many
|
|
|
|
|
more.
|
|
|
|
|
|
|
|
|
|
When taxonomies are used (and templates are provided) Hugo will
|
|
|
|
|
automatically create pages listing all of the taxonomies, their terms
|
|
|
|
|
and all of the content attached to those terms.
|
|
|
|
|
|
|
|
|
|
## Definitions
|
|
|
|
|
|
|
|
|
|
**Taxonomy:** A categorization that can be used to classify content
|
|
|
|
|
|
|
|
|
|
**Term:** A key within that taxonomy
|
|
|
|
|
|
|
|
|
|
**Value:** A piece of content assigned to that Term
|
|
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
|
|
For example if I was writing about movies I may want the following
|
|
|
|
|
taxonomies:
|
|
|
|
|
|
|
|
|
|
* Actors
|
|
|
|
|
* Directors
|
|
|
|
|
* Studios
|
|
|
|
|
* Genre
|
|
|
|
|
* Year
|
|
|
|
|
* Awards
|
|
|
|
|
|
|
|
|
|
I would then specify in each movies front-matter the specific terms for
|
|
|
|
|
each of those taxonomies. Hugo would then automatically create pages for
|
|
|
|
|
each Actor, Director, Studio, Genre, Year and Award listing all of the
|
|
|
|
|
Movies that matched that specific Actor, Director, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Taxonomy Organization
|
|
|
|
|
|
|
|
|
|
Let’s use an example to demonstrate the different labels in action.
|
|
|
|
|
From the perspective of the taxonomy it could be visualized as:
|
|
|
|
|
|
|
|
|
|
Actor <- Taxonomy
|
|
|
|
|
Bruce Willis <- Term
|
|
|
|
|
The Six Sense <- Content
|
|
|
|
|
Unbreakable <- Content
|
|
|
|
|
Moonrise Kingdom <- Content
|
|
|
|
|
Samuel L. Jackson <- Term
|
|
|
|
|
Unbreakable <- Content
|
|
|
|
|
The Avengers <- Content
|
|
|
|
|
xXx <- Content
|
|
|
|
|
|
|
|
|
|
From the perspective of the content if would appear differently, though
|
|
|
|
|
the data and labels used are the same:
|
|
|
|
|
|
|
|
|
|
Unbreakable <- Content
|
|
|
|
|
Actors <- Taxonomy
|
|
|
|
|
Bruce Willis <- Term
|
|
|
|
|
Samuel L. Jackson <- Term
|
|
|
|
|
Director <- Taxonomy
|
|
|
|
|
M. Night Shyamalan <- Term
|
|
|
|
|
...
|
|
|
|
|
Moonrise Kingdom <- Content
|
|
|
|
|
Actors <- Taxonomy
|
|
|
|
|
Bruce Willis <- Term
|
|
|
|
|
Bill Murray <- Term
|
|
|
|
|
Director <- Taxonomy
|
|
|
|
|
Wes Anderson <- Term
|
|
|
|
|
...
|
2013-10-31 09:51:13 -04:00
|
|
|
|
|