Continuing the discussion from Understanding Hugo taxonomy permalinks settings:
in my Hugo site I have
Page front matter is like this
<!-- content/en/properties/property1.md -->
title = "Property 1"
date = 2023-08-01T00:00:00Z
properties = ["sale"]
This is the content of Property 1 for sale.
Hugo generate multiple duplicates and when I click the generated url I see
Page Not Found error.
My question is how can I setup so I have normal urls such as /properties/property1/ which I can filter based on the category “properties” without actually generating additional duplicate urls etc.
Seems like Hugo generate url/ for each category which is not under the parent category such as
Should I better use page params such as
title: "Property 1"
A taxonomy may not have the same name as a top-level content directory. We’ve been through this before.
I understand this but I am kind of forced to keep the url
/properties/ how can I work around this.
I want to have the
What else can I do to make this work are there headless categories which let me filter without generating duplicate pages.
how will you approach this can you please provide an example. I will really appreciate this.
I suggest you spend some time thinking about your content model.
- How many content types are there? Maybe just one (properties), but maybe not.
- Which descriptors should be taxonomy terms, and which should be page parameters? Depends on whether or not you want automatic list pages, related items, etc.
- Can a given descriptor (e.g., rental) be applied to two different property types (e.g., commercial and residential)
If you were doing this with WordPress or Drupal you would have to answer the same questions.
From your previous posts, it seems like you’re trying to start this project in the middle.