Generate a sitemap
Build sitemap.xml from the built site's HTML files, following the three rule files:
references/url-rules.md,
references/priorities.md, and
references/escaping.md.
Steps
- Collect every
.htmlfile under the build directory withGlob. - Map each file to its canonical URL per the URL rules.
- Assign each URL a priority per the priority table.
- Escape each URL per the escaping rules. Never emit an unescaped ampersand.
- Write
sitemap.xmlat the build root and report the URL count.