I am unable to find a solution, in Hugo I need to create a .md page to add content but the directory I want to add the content is /properties however to make the content easily filterable I am using category which also name /properties
how can I use the content directory /properties and use categories /properties and make Hugo aware to generate only category pages and do not generate any /directory urls?
# content
content/properties/
# URL created
example.com/properties
#categories pages auto generated by Hugo
/properties
# URL created
example.com/properties/
I need to have the content directory as I need to add those pages somewhere. so how can I solve this issue can I tell Hugo the content/properties/ is actually a category?
The categories of properties > sale/rent > residential/commerical is what I want and I am glad Hugo generates these for me and it is really easy to create navigations for this.
However I need to create page for these listings in the content directory and I name the directory /properties now the issue is if I change the content directory to for example /listings this is going to create a duplication issue for me as I am going to have same page generate twice
# The category page
example.com/properties/sale/residential/apartment/property-id-234233
# And the page url which Hugo generates
example.com/listings/property-id-234233
changing the category or content directory name does not solve my issue. I want Hugo to generate only 1 page and I prefer the way categories work however I need to also add content in the content directory which also creates the same page twice.
Since listings grow quickly duplication is going to create mess both for SEO and for the site size.
I have searched a lot Hugo but did not find how to solve the duplication issue
but only blog/my-trip-to-france contains the blog text itself. The other two directories contain only index.html files that list the relevant content (in the way that I want it to be listed). I do not see any duplication there.
It would help if you posted a link to your GitHub repository here so that someone could see what you’re actually doing and perhaps fix whatever needs fixing.
category /listings & content directory /properties will produce
# directory /properties/ property-1
example.com/properties/property-1
# category listing
example.com/listing/
# which show all listings under that category will show single page as
example.com/properties/property-1
# instead of
example.com/listings/property-1
# it will not create duplicate urls
example.com/listings/property-1
example.com/listings/for-sale/property-1
example.com/listings/for-sale/residential/property-1
example.com/listings/for-sale/residential/apartment/property-1
example.com/listings/for-sale/residential/apartment/1st-floor/property-1
using the directory path for me is impossible since I have for example
I do not have any repo I am using the giraffe academy Hugo theme and just trying to organise content to see how categories and directories can work together but from what I understand it doesn’t.
Maybe I leave the property directory as it is and use categories from one step down instead of properties I start categorising from sale/rent
Thanks it does help even if we communicate without understanding what the issue and solution is.
Actually issue remains which is the directory and category conflict
if I have a category called properties and then sub categories such as sale/rent I can easily navigate and end to the property page with all the properties.
But if I have the category listings or if I do not use the main category I cannot end up to the properties page