Duplicate page generations when specifying url in Front Matter

Hi!

I am getting duplicate page generations for my root path leading to an issue where at random I would get either of these as my home page. My guess is this is happening because of specifying url in the Front Matter.

I don’t have a content/_index.md file. My Front Matter in content/blog/_index.md file is:

+++
title = "Blog"
url = "/"
[menu]
  [menu.main]
    identifier = "blog"
    weight = 1
+++

After running hugo --debug I noticed that there are 2 pages generated for index.html, and 2 for index.xml. So the recently generated page for index.html gets served as the root page.

I am using the hugo-bearblog theme.

The source code is at GitHub - alabhyajindal/aj at a4d431c46278f49baddb919d7348436ce9cc4dba.

Hugo always generates the home page, but you can tell Hugo not to, e.g. in hugo.toml:

disableKinds = [ "home" ]
1 Like

Thank you!

I added this to my hugo.toml but I’m still seeing duplicate targets when I run hugo --printPathWarnings. Any ideas what I’m doing wrong? These are the changes I made: Disable home · alabhyajindal/aj@32667ec · GitHub

Thanks for any help!

These belong in the root table:

disableKinds = ["taxonomy"]
ignoreErrors = ["error-disable-taxonomy"]

They are currently under the markup.goldmark.renderer table.

1 Like

Thanks Joe, that was the issue. It’s working perfectly now!

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