Skip to content

Conversation

mroderick
Copy link
Collaborator

@mroderick mroderick commented Sep 15, 2025

This pull request is a solution for #2347.

It adds the sitemap_geneator gem to pave the way for a future improvement, where we actually add links like workshops and events to the sitemap, regenerate the file in production and store it in S3, so it survives between deployments.

For now, this will make all the 404 Not found for sitemap.xml go away.

If we want to update the sitemap file, we need to run the rake task.

See https://github.com/kjvarga/sitemap_generator?tab=readme-ov-file#rake-tasks for details on rake tasks.

@mroderick mroderick force-pushed the add-sitemap-generator branch from 0a76ccc to 1d6daf6 Compare September 15, 2025 20:37
@mroderick mroderick force-pushed the add-sitemap-generator branch from 1d6daf6 to d8db5d6 Compare September 15, 2025 20:40
@mroderick mroderick marked this pull request as ready for review September 15, 2025 20:52
Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds the structure, we can introduce content as we go.

@olleolleolle
Copy link
Collaborator

olleolleolle commented Sep 16, 2025

(Future details here:)

And, in the future we can set up the SitemapGenerator::Sitemap.adapter = SitemapGenerator::AwsSdkAdapter.new(ENV.fetch("SITEMAP_S3_BUCKET")). When we do, remember to update the Sitemap line in public/robots.txt when changing it: SitemapGenerator::Sitemap.sitemaps_host = ENV.fetch("SITEMAP_HOST")

And, the AWS SDK's docs has notes on the two ENV vars to use for credentials; https://docs.aws.amazon.com/sdk-for-ruby/v2/api/Aws/S3/Client.html#initialize-instance_method

@olleolleolle olleolleolle merged commit c1deed3 into codebar:master Sep 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants