feat: make the site database authoritative for documents and catalog
Verify database-backed documents / verify (pull_request) Failing after 6m6s

This commit is contained in:
2026-10-30 16:23:54 +08:00
parent 25c5e83d08
commit d57e9b77d7
79 changed files with 562 additions and 5222 deletions
-13
View File
@@ -23,19 +23,6 @@ for (const name of await files(path.join(root, "apps/docs/public"))) {
throw new Error(`Original raster exposed in public: ${path.relative(root, name)}. Move it to tools/figures/assets and run images.`);
}
}
for (const name of await files(path.join(root, "content/docs"))) {
if (!name.endsWith(".md")) continue;
const content = await readFile(name, "utf8");
const images = [
...content.matchAll(/!\[[^\]]*\]\(<?([^\s)>]+)/g),
...content.matchAll(/<img\b[^>]*\bsrc=["']([^"']+)/gi),
];
for (const [, source] of images) {
if (/\.(?:png|jpe?g|tiff?|bmp)(?:[?#]|$)/i.test(source)) {
throw new Error(`${path.relative(root, name)} embeds an original raster: ${source}. Use the compressed WebP.`);
}
}
}
await mkdir(output, { recursive: true });
for (const source of await files(sources)) {