Recursively collect all .html files under a directory, returning
paths relative to the project root with POSIX separators.
Returns an empty array silently when dir does not exist — callers
(notably the sitemap generator) need not pre-check, and a missing
docs directory is a normal "no docs published yet" state.
Parameters
dir: string
Directory to scan
rootDir: string = PROJECT_ROOT
Project root for computing relative paths
Returns string[]
Sorted array of relative paths (e.g. docs/api/index.html)
Recursively collect all
.htmlfiles under a directory, returning paths relative to the project root with POSIX separators.Returns an empty array silently when
dirdoes not exist — callers (notably the sitemap generator) need not pre-check, and a missing docs directory is a normal "no docs published yet" state.