Build Options: Hide section from lists but include in sitemap

I have pages and posts folders at the root of the content folder. However, only the content inside posts shows in the sitemap. I am not sure if it is due to {{ range .Site.Pages }} in my custom sitemap. How to ensure content outside the posts folder shows up in the sitemap?

Edit: I have this code in the frontmatter to prevent pages from lists. Does that affect sitemap?

_build:
  list: never
Apparently, it does. But I still want to both have the pages in sitemap, but exclude them from lists.

What I would do in your case would be first to remove the _build configuration from said section and use cascade instead.

Simply set a hidden: true parameter in the _index.md of said section, so that it will be inherited by all children. Then in the HTML lists template filter the pages by if ne .Params.hidden true.

The pages should still be hidden from list pages yet appear in the sitemap -since its template does not hide pages based on the above condition-.

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