Add sitemap generation and bunext sitemap command

- Add generateSitemap util (exported as bunext.bunextGenerateSitemap)
  that builds sitemap.xml from static pages, with exclude patterns,
  additional paths (array or sync/async function), lastmod from file
  mtime, trailing slash, and default changefreq/priority options
- Let page .server.ts files export a `sitemap` function to list URLs
  for dynamic routes, or override a static page's entry
- Add `bunext sitemap` command reading `sitemap` from bunext.config.ts,
  writing public/sitemap.xml by default, with --output/--origin flags
- Fix handle-routes test leaking a grab-router module mock into
  bunext-req-handler tests; set global.BUNEXT_ROUTER instead
- Ignore /.tmp
- Document sitemap usage in README and CLAUDE.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 17:41:21 +01:00
co-authored by Claude Opus 5.5
parent 3025b1681d
commit d9de858439
11 changed files with 917 additions and 11 deletions
+2 -1
View File
@@ -182,4 +182,5 @@ __fixtures__
/.dump
/.vscode
/source.md
SECURITY.md
SECURITY.md
/.tmp