Remove priority 0 from hugo sitemap

hello i would like to remove the 0 priority assigned to the tags/categories on my stitemap how i can do that

  1. Why? Technically speaking that is correct, because tag-indexes should have no priority and 0 is “no”.
  2. Do you have a sitemap layout or is your site using the internal sitemap layout? If you use the internal sitemap then add /content/tags/tagname/ with the following frontmatter (untested):
  changefreq: monthly
  priority: 0.5

If your theme is NOT using the internal layout you need to check your sitemap layout and find out, where the priority is parsed from.

Hi thank’s for the solution.
why i want to remove the priority; because my tags are not getting indexed by google 97% of them are being excluded, on the other hand i have another website and the sitemap doesn not have any priority assigned and the indexing id going very well

ps; i use the internal sitemap layout does the /tagname means i have to add all my tags on that tags folder i use allot of tags is there an automatic why to do that i can’t add them all manually

I am honestly not sure if that is the full solution. Looking at the internal sitemap layout I would expect your sitemap to show priority in ALL items, not just tags.

Make sure that your theme is not having it’s own sitemap template. Without you posting your public repo (can be a stripped down version) we can’t find out much.

1 Like

sorry i totally forgot to share my repo here it is :

if you want to change sitemap priority from the front-matter for an entire section you can use cascade

So you’d set your cascade on ./content/tags/ and/or ./content/categories/, and it’ll cascade down to everything below it.

Note as @davidsneighbour says this won’t REMOVE the <priority> tag, but you can selectively set it to whatever number you want.