This is just a small cut of code that I threw together to make a sitemap for my website. Have not had any issues with it, so please use the GitHub issues to report any.
Please see https://burne99.com/sitemap for a live example, and see https://burne99.com/sitemap/sitemap.json for a fully filled out JSON tree for making your own sitemap.