Skip to content

[Website]: Generate a dynamic sitemap #876

@ssandino

Description

@ssandino

Is there an existing request for this feature?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

A majority of our pages are not indexed by Google, most likely due to not having a self-updating sitemap. This means less traffic, less donations and therefore less people can be supported with a Social Income.

Screenshot 2024-07-30 at 15 43 00 Source: Google Search Console

Describe the solution/feature

We should implement a dynamic sitemap that automatically includes all live routes (e.g., website pages, blog posts, language variants). NextJS has some build in options.

The sitemap should be:

  • Automatically updated when new pages are added (e.g., on website or new blog articles from Storyblok)
  • Accessible via /sitemap.xml
  • Compatible with Google’s indexing requirements
  • Handle staging and prod env.

This might involve:

  • Generating the sitemap at build time using a script (e.g., with next-sitemap or a custom script)
  • Ensuring routes from CMS (e.g. Storyblok) are included
  • Adding lastmod metadata for better crawl efficiency
  • Generate sitemap at build time and serve as static file or trigger a rebuild (e.g. via a webhook from Storyblok) when new content is published.

Describe alternatives you've considered

Manually maintaining a sitemap (error-prone and not scalable)

Criteria for Completion

  • A working sitemap is available at /sitemap.xml
  • Sitemap includes all public routes (static and dynamic)
  • CMS content (e.g., blog posts) is included
  • Google Search Console confirms the sitemap is valid and processed

Anything else?

Before adding next-sitemap as a dependency, consider whether it’s simpler and more flexible to write our own custom sitemap generation function tailored to your routes and CMS structure.

Code of Conduct

  • I've read the Code of Conduct and understand my responsibilities as a member of the Social Income community

Metadata

Metadata

Labels

websiteIssues concerning Website

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions