No use of slug for categories and tags

Unsure if that intentional, but I found a bit of discrepency.

I got site

that contain with

title: "About"
url: '/about/'

for English language.

Than I got to add Polish translation.

In it I got:

title: "O Nas"
slug: '/o-nas/'

Main is using url the other is using slug

English will be
where Polish will become

All working well, however this idea cannot be used in /categories/ and /tags/ pages that agregating list of categories and list of tags.

For each indivudual category and tag, I can use hugo.toml to specify using

      tags = "/tag/:slug/"
      categories = "/:slug/"

However slug doesn’t seams to be used in categories and tags.

I created /categories/ folder and placed and there.

To make it working in I need to specify it as

url: "/pl/kategorie/"
aliases: "/pl/categories/"

only because slug

slug: `/kategorie/`

is not working.

Is that intentional?

ps. its not a big issue.

Is this a typo? These should be files, not files.

I’ve read through your post a few times, and I don’t understand the objective or problem. Maybe we can start with a simple test site and go from there…

git clone --single-branch -b hugo-forum-topic-50038 hugo-forum-topic-50038
cd hugo-forum-topic-50038
hugo server
1 Like

Yes, corrected.

I will play with test repot that you set and will come back to you with feedback.

I just force pushed a change. Please re-clone if you have already cloned it. I won’t force push again.

No problem, will look on that in few hours.

1 Like

Thank you for your example.

There were some things

categories = "categories"

categories = "/:slug"

categories = "kategorie"

categories = "/:slug"

that I didn’t know and use here :slight_smile:

Will try in my environment.

always learning.

1 Like

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