Custom category permalink?

Hi everyone,

I’m currently trying to host a blog using GitHub Pages and I’ve uploaded it to my GitHub page, but I have an issue that requires assistance.

My problem lies in the article category section. I have categories such as:

social and culture
history and culture

and so on. For example: and culture and culture

All these categories result in an HTTP status 404.

It seems that Hugo automatically creates permalink URLs based on the categories we have created, and in my case, there are spaces.

My questions are:

1.How can I solve this issue?

  1. Can I change the permalink for these categories? For example, change and culture to

blog on github pages are :

Anton Nb

Thank you.

With this front matter:

title = 'Post 1'
date = 2023-01-01T00:00:00-00:00
draft = false
categories = ['social and culture']

Hugo publishes the term page to:


To publish the term page to…


… you need to create a content page for the term:

hugo new content content/categories/social-and-culture/

… and set the url parameter in front matter:

title = 'Social and culture'
date = 2024-06-17T07:11:13-07:00
draft = false
url = 'categories/social'

allright @jmooring thank you for your help

the same logic also can be implemented on tags correct?

Yes, it can.

1 Like

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