initial commit after project creation

This commit is contained in:
Gerhard Scheikl
2026-04-01 09:38:50 +02:00
commit b02af637d4
292 changed files with 61408 additions and 0 deletions

23
scripts/check-pagefind.js Normal file
View File

@@ -0,0 +1,23 @@
const fs = require("fs");
const path = require("path");
const entryPath = path.join(__dirname, "..", "public", "pagefind", "pagefind-entry.json");
if (!fs.existsSync(entryPath)) {
console.warn(
"\x1b[33m⚠ Pagefind index not found. Search will not work in dev.\n" +
" Run: pnpm build-local-pagefind\x1b[0m\n"
);
process.exit(0);
}
const stats = fs.statSync(entryPath);
const ageMs = Date.now() - stats.mtimeMs;
const ageDays = Math.floor(ageMs / (1000 * 60 * 60 * 24));
if (ageDays >= 7) {
console.warn(
`\x1b[33m⚠ Pagefind index is ${ageDays} day${ageDays === 1 ? "" : "s"} old. Search results may be stale.\n` +
" Run: pnpm build-local-pagefind\x1b[0m\n"
);
}