How to add pages to category pages

I have a website with tutorial for Windows, Linux, Android and Internet.

I have the following 4 category pages:


How can I make Hugo automatically add pages to correct category pages?

Is there a way to add front matter to the articles (tutorial pages)?

Should I use Related Content feature of Hugo?

Or include something like categories: android in the front matter of the pages and then something on the category pages?

How exactly can I apply it to my website?


Have a read about the Taxonomies feature:

Hugo by default already has a categories taxonomy, so you could just add the correct categories to the posts’ front matter:

Assuming you have the correct layouts in place, Hugo would then generate a page at and etc.

Is there a way to change the /categories/ folder name to something like /t/ or /c/ ?

@mickel1982, you need to read through the docs. That is required to use Hugo. Your questions are answered in the docs. I suggest you refer to Requesting Help for further resources. But you need to understand how Hugo is configured first. :slight_smile:

You’re right. I found the solution. But I cannot find the way to change the /categories/ folder name to something like /t/ or /c/. Or am I missing something in the docs?



{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
{{ range .Pages }}
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ partial "footer.html" . }}

config.toml file:

  category = "t"

And the following in the front matter of the pages:

t: ["Windows"]
t: ["Linux"]
t: ["Android"]
t: ["Internet"]