Paginated URLs are missing from Sitemap but I haven't disabled it, how to get them back?

Hello,

I generated a sitemap using the default embedded template that comes with Hugo.

It’s picking up everything except paginated pages. For example if my blog has 25 pages of content I’d expect there to be 25 entries in the sitemap such as /blog/page/5/, etc…

There’s nothing in my config that I see which would indicate disabling this and I don’t have any frontmatter defined to disable the sitemap.

How can you get Hugo to include paginated pages in the sitemap? It is debatable on whether or not paginated pages should be in there, but there’s no definitive source saying yes or no. IMO this feels like it should be up to the user to include them or not.

I suppose you are talking about the pager pages
Not the paginated pages

With 25 posts and a page size of 5 you will get 5 pagers incl. The posts page itself.

The posts page is listed but the 4 pagers not.
Also the individual pages are listed.

Dunno if this is bug or feature.

I found no method to get all pager pages from another template. So I assume currently the only way is to store the pager.pages when paginating and later retrieve that from a customized site template

Yes, the pager pages.

In your example I’d expect /blog/page/1/ through /blog/page/5/ to be individual line items in the sitemap. Currently only /blog/ is listed as well as the individual posts with /blog/hello-world. I noticed this when I diff’d my sitemap vs what Jekyll created (it includes these paginated pages).

Any thoughts on what that would look like?

I’d rather first like to get a statement from our @jmooring if I’ve overseen something.

1 Like