Wordpress is in
Some checks failed
ci / site (push) Has been cancelled

This commit is contained in:
2026-02-10 01:04:12 -05:00
parent d4aef77eca
commit c773affbc8
28 changed files with 1374 additions and 8 deletions

View File

@@ -0,0 +1,27 @@
import { access, readFile } from "node:fs/promises";
import path from "node:path";
import { readContentCache } from "../src/lib/content/cache";
async function main() {
const distPath = path.join(process.cwd(), "dist", "blog", "index.html");
await access(distPath);
const html = await readFile(distPath, "utf8");
const cache = await readContentCache();
const posts = cache.wordpress?.posts || [];
if (posts.length === 0) {
if (!html.includes("No blog posts yet.")) {
throw new Error("Expected /blog empty state to be present when no WordPress posts exist.");
}
}
}
main().catch((e) => {
// eslint-disable-next-line no-console
console.error(String(e));
process.exitCode = 1;
});