Cascade and sitemap prority

I tried to override a section’s posts sitemap priority using cascade but they all disappeared from the sitemap. Is that an expected behaviour? I want to move them at the bottom of the sitemap.

cascade:
  sitemap:
   priority: 0.4

Additional points:

  1. Adding this in a post’s frontmatter makes the post disappear from the sitemap
---
sitemap:
  changefreq: weekly
  priority: 0.3
---
  1. While this does nothing
---
sitemap:
  priority: 0.3
---

Sitemap is already configured as follows

sitemap:
  changefreq: daily
  filename: sitemap.xml
  priority: 0.6

I can’t confirm you find.

  • Disabled my custom layout sitemap.xml
  • Added in global config:
sitemap:
  changefreq: monthly
  filename: sitemap.xml
  priority: 0.5
  • Added in frontmatter of _index.md of 1 section only:
cascade:
  sitemap:
    changefreq: weekly
    priority: 0.9
  • Build.
  • All pages of this section are present in language relevant de/sitemap.xml.
  • All links of this section have the changed changefreq, and priority.
  • While other sections have it from config file.

Maybe just a malformed YAML in your frontmatter block?

I am using a custom layout. I am targeting the _index.md of nested sections (not language folders). I want these to appear in the main sitemap, but with a lower priority.

That’s what I’ve tested as far as I see. Cascade works in Hugo core like promised in the docs for sitemap setting.

Nobody knows how your repo ist structured.

I don’t use content language folders. Hugo core creates a main sitemap.xml that points to “sub sitemaps” in automatically generated public folders “en” and “de” just because I have configured 2 languages in global configuration.

Either way, that shouldn’t be the cause of your problem.

Disable it and try again to be sure if it’s not your custom layout.

Changed sitemap: false to exclude_sitemap: true and now everything works as it should.

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