You can do something like this in your layouts/sitemap.xml:
<!-- rest of the sitemap -->
{{ range readDir "static" }}
{{ if (findRE ".html$" .Name) }}
{{ printf "<url>" | safeHTML }}
{{ printf "<loc>%s%s</loc>" $.Site.BaseURL .Name | safeHTML }}
{{ printf "<changefreq>monthly</changefreq>" | safeHTML }}
{{ printf "<priority>0.3</priority>" | safeHTML }}
{{ printf "</url>" | safeHTML }}
{{ end }}
{{ end }}
This assumes that you’ve HTML files directly inside the static folder without any other directory. If you’ve created another directory, you’d have to modify the code accordingly. Also, I’m not sure if the code works recursively for all directories or no. If it doesn’t you’d have to place all your HTML files in one directory itself.
This also assumes that you’ve configured the website’s Base URL in config.toml with a forward slash / at the ending. If not, you’d have to change the <loc> to %s/%s.
That’s exactly the kind of thing I needed.
All the HTML files are on the same directory, but under /static/notebooks, so that’s easy change to your code.