How does POWr Sitemap Work
We use this gem: https://github.com/kjvarga/sitemap_generator
This creates a file config/sitemap.rb where the sitemap is configured.
The sitemap can be generated using:
bundle exec rake sitemap:refresh
The files are then created locally in tmp directory, and then automatically uploaded to AWS at the bottom of sitemap.rb
When a request is made to a sitemap file (eg. https://www.powr.io/sitemaps/static.xml.gz), this is routed to static_controller#sitemap, which dynamically pulls the file from AWS and presents it to the user. (This part is not ideal but it works)