# Tags minimal example

**URL:** <https://discourse.gohugo.io/t/tags-minimal-example/29040>\
**Category:** support\
**Created:** [October 26, 2020, 6:30am UTC](https://discourse.gohugo.io/t/tags-minimal-example/29040 "2020-10-26T06:30:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendry](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hendry/32/7037_2.png) [@hendry](https://discourse.gohugo.io/u/hendry)\
**Post date:** [October 26, 2020, 6:30am UTC](https://discourse.gohugo.io/t/tags-minimal-example/29040/1 "2020-10-26T06:30:26Z")

</div>

I want to get into taxonomies, but I must say I have stumbled with the [documentation](https://gohugo.io/content-management/taxonomies#default-taxonomies).

![image](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/c/c94af9e922efdf007c110f9e536c9a09b462f739.png)

- `layouts/tags/list.html` I assumed listed/rendered `/tags/index.html` but it’s not! It’s actually `/tags/$tagname/index.html` … aka the term!
- `layouts/tags/terms.html` I assumed was `/tags/$tagname/index.html` as I assumed **$tagname** was a term, but it’s not! It’s actually `/tags/index.html`… the listing of taxonomy! i.e. `layouts/tags/terms.html` renders `/tags/`!

The example template here: [https://gohugo.io/templates/taxonomy-templates/#order-alphabetically-example](https://gohugo.io/templates/taxonomy-templates/#order-alphabetically-example) … what is it for? list.html or terms.html? It’s not clear. 😕

I think I have a minimal tag site produced with this shell:

```
hugo new site ${1:-"testing"}
cd ${1:-"testing"}
mkdir layouts/_default layouts/tags
echo -e "<h1>Hello from layouts - single</h1>\n{{ .Content }}" > layouts/_default/single.html

cat << EOL > layouts/tags/terms.html
<h1>In tags/terms!!!</h1>
<ul>
{{ range .Data.Terms.Alphabetical }}
<!-- RelPermalink does not work in this context -->
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
{{ end }}
</ul>
EOL

cat << EOL > layouts/tags/list.html
<h1>In tags/list!!!</h1>

{{ range .Pages }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}

EOL

cat << EOL > content/foo.md
---
Title: Mr Foo
tags:
- foo
---

Hello from **Foo**
EOL

cat << EOL > content/bar.md
---
Title: Mr Bar
tags:
- bar
---

Hello from **Bar**
EOL

cat << EOL > content/curveball.md
---
Title: Curve ball
tags:
- bar
---

Hello from **Curveball**
EOL

hugo --disableKinds=RSS,sitemap

```

Could it be improved? Please let me know!

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [October 26, 2020, 2:40pm UTC](https://discourse.gohugo.io/t/tags-minimal-example/29040/2 "2020-10-26T14:40:27Z")

</div>

> [@hendry](#):
>
> `layouts/tags/list.html` I assumed listed/rendered `/tags/index.html`

`layouts/tags/section.html` is rendering `/tags/index.html` because that is a section page.

I don’t understand your “shell”, that’s too abstract for my simple mind, hehe, but maybe the info above helps you achieve what you are going for?

---

<div class="post-metadata">

**Author:** ![hendry](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hendry/32/7037_2.png) [@hendry](https://discourse.gohugo.io/u/hendry)\
**Post date:** [October 27, 2020, 9:43am UTC](https://discourse.gohugo.io/t/tags-minimal-example/29040/3 "2020-10-27T09:43:36Z")

</div>

Sorry this is quite confusing. **layouts/tags/section.html** does nothing for me in my testing!

[https://s.natalian.org/2020-10-27/confusing.mp4](https://s.natalian.org/2020-10-27/confusing.mp4)
