Sitemaps Not Getting Fetched During Build
scissorsneedfoodtoo opened this issue · 0 comments
Sitemaps aren't fetched reliably during the build process.
Here are some examples from English News:
- Index: https://www.freecodecamp.org/news/sitemap.xml
- Pages: https://www.freecodecamp.org/news/sitemap-pages.xml
- Posts: https://www.freecodecamp.org/news/sitemap-posts.xml
- Authors: https://www.freecodecamp.org/news/sitemap-authors.xml
- Tags: https://www.freecodecamp.org/news/sitemap-tags.xml
The index page is empty, and should look similar to this:
Looking at the posts sitemap, it seems like it hasn't been updated since we switched over to JAMstack.
I believe the reason we still have sitemaps for pages, posts, authors, and tags is that they were previously available through the Ghost served site. But for newer sites like Ukrainian, which was never available as a Ghost served site, the sitemap is completely empty.
We have most of the data we need to build the sitemaps during the build. However, some things like the timestamp when a tag or author profile was updated isn't available through the Ghost API.
It seems like the best we can do is build the sitemaps using whatever data we have available, and to omit the "Last Modified" / <lastmod>
date for tag and author profile pages.