I am setting up my Hugo blog and I have a duplicate content problem.
All of my blog posts are stored in /blog/[name of blog post]
Hugo generates a list view at /blog/index.html
But I would prefer that users visiting my website see the blog list at /index.html - the home page of the website.
This creates a problem in that I end up with two pages with exactly the same content on them.
Is there a way to ‘promote’ /blog/index.html to be the main site home page or can it be suppressed from generating a list view /blog?
Thanks,
Mario
So I add the _build YAML to the front matter of /blog/index.md?
I tried this and it doesn’t seem to suppress the index.md and also the Hugo server doesn’t generate the blog posts themselves, but it does in the build of the public site.
content/blog/_index.md
+++
title = 'Blog'
date = 2022-07-24T09:10:08-07:00
draft = false
[_build]
list = 'never'
publishResources = true
render = 'never'
+++
Note the file name begins with an underscore.
It worked - I was forgetting to empty my public directory
Thank you!
system
Closed
July 26, 2022, 4:18pm
7
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.