Empty <loc> in sitemap

Hello. I recently finished my website and was submitting it to search engines. So, I decided to check my sitemap once and I noticed a blank <loc> tag in it. I don’t really know why that’s happening. It’s not a deal breaking problem, but, I would like to clean it if it’s possible.

Here’s the sitemap: https://hrishikeshk.netlify.app/sitemap.xml

And here’s my repository: https://www.github.com/Hrishikesh-K/Portfolio.

My guess is that it’s because of taxonomy. In my config.toml I have specified it like this:

  tag = "tags"

I didn’t want categories taxonomy, so, I declared it like this.

Can someone please let me know if that’s the case and a possible fix?

EDIT: I have also mentioned disableKinds = ["taxonomyTerm", "RSS"] in my config.toml

So, I found out what’s causing the empty <loc>, but, don’t know how to fix it. If someone can let me know, that’d be great.

I’m using

  render: false

in the main section (content/projects/_index.md) of my website as I don’t want any list page for it. It’s purely there for organization. So, when I remove that file, I don’t get any empty <loc>. But, I don’t want to render that page.

Any solution, please?

I fixed it using a custom sitemap layout.

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