# Which taxonomy configuration means what?

**URL:** <https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863>\
**Category:** support\
**Tags:** taxonomy\
**Created:** [May 30, 2022, 6:43pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863 "2022-05-30T18:43:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WoJWoJWoJ](https://avatars.discourse-cdn.com/v4/letter/w/87869e/32.png) [@WoJWoJWoJ](https://discourse.gohugo.io/u/WoJWoJWoJ)\
**Post date:** [May 30, 2022, 6:43pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863/1 "2022-05-30T18:43:51Z")

</div>

I think I finally wrapped my head around how Hugo manages taxonomies.

I created my own taxonomy `topic` via the `config.toml` configuration

```nohighlight
[taxonomies]
  tags = 'tags'
  topic = 'topic'

```

I also created a page `layouts/-default_topics.html` and, behold, it works! 🤸 I get a page with all posts having a `topic` of “france” via `http://localhost:1313/topic/france`

There is one last thing I am missing: how are the three `topic` instances related: `topic=` and `=topic` in `config.toml` and the `topic.html` file. What drives what?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 30, 2022, 8:57pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863/2 "2022-05-30T20:57:54Z")

</div>

I’m not sure I understand your question.

In site config, define a taxonomy using the `singular = 'plural'` convention:

```nohighlight
[taxonomies]
author = 'authors'

```

Add terms to content front matter using the plural form:

```nohighlight
+++
title = 'Post 1'
date = 2022-05-30T13:32:19-07:00
draft = false
authors = ['John Doe','Jane Doe']
+++

```

Access the taxonomy object using the plural form:

```auto
{{ site.Taxonomies.authors }}

```

The URL of the taxonomy and term pages uses the plural form:

```nohighlight
https://example.org/authors/
https://example.org/authors/jane-doe/

```

In taxonomy and term templates\[1\], access the [singular and plural forms](https://gohugo.io/variables/taxonomy/#taxonomy-terms-page-variables) with:

```auto
{{ .Data.Singular }}
{{ .Data.Plural }}

```

* * *

1. Example: layouts/\_default/taxonomy.html and layouts/\_default/term.html

---

<div class="post-metadata">

**Author:** ![WoJWoJWoJ](https://avatars.discourse-cdn.com/v4/letter/w/87869e/32.png) [@WoJWoJWoJ](https://discourse.gohugo.io/u/WoJWoJWoJ)\
**Post date:** [May 30, 2022, 9:15pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863/3 "2022-05-30T21:15:53Z")

</div>

> [@jmooring](#):
>
> I’m not sure I understand your question.

Your answer was **perfect** - thank you very much. It exactly answered my question (I still do not understand why this is so overengineered but there must be a reason for singular and plural forms).

I think that your answer should actually go into the docs - it is really precise.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 30, 2022, 9:19pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863/4 "2022-05-30T21:19:03Z")

</div>

> [@WoJWoJWoJ](#):
>
> there must be a reason for singular and plural forms

When visiting `https://example.org/authors/jane-doe/` you might want to display the text:

```plaintext
These are the books where the author is Jane Doe:

```

Note the singular use in the sentence above.

---

<div class="post-metadata">

**Author:** ![WoJWoJWoJ](https://avatars.discourse-cdn.com/v4/letter/w/87869e/32.png) [@WoJWoJWoJ](https://discourse.gohugo.io/u/WoJWoJWoJ)\
**Post date:** [May 30, 2022, 9:25pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863/5 "2022-05-30T21:25:59Z")

</div>

Thank you but I still do not understand why not use only the singular form and have links such as `https://example.org/author/`(singular) even if there may be more than one. Is it just an aesthetical reason?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 30, 2022, 9:27pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863/6 "2022-05-30T21:27:57Z")

</div>

Sometimes you may want to render the plural form, and sometimes you may want to render the singular form. If you don’t think you will ever need to render the plural form of the taxonomy, use the same value for both in site config:

```nohighlight
[taxonomies]
author = 'author'

```

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [June 1, 2022, 9:28pm UTC](https://discourse.gohugo.io/t/which-taxonomy-configuration-means-what/38863/7 "2022-06-01T21:28:14Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
