- _data: switch to cachedFetch wrapper (10s timeout + 4h watch cache) - js/webmentions.js: owner reply threading, platform provenance badges, DOM dedup, Micropub reply support - js/comments.js: owner detection, reply system, Alpine.store integration - _includes/components/webmentions.njk: data-wm-* attrs, provenance badge slots, reply buttons - _includes/components/comments.njk: owner-aware comment form, threaded replies - widgets/toc.njk: Alpine.js tocScanner upgrade (replaces is-land/inline-JS) - lib/og.js + og-cli.js: OG card v3 (light theme, avatar, batched spawn, DESIGN_VERSION=3) - eleventy.config.js: hasOgImage cache, memoized date filters, batched OG/unfurl, post-build GC, YouTube check opt - base.njk: Inter font preloads + toc-scanner.js script - critical.css: font-face declarations (font-display:optional) - tailwind.css: font-display swap→optional - tailwind.config.js: prose link colors -700→-600 - Color design system: accent-700/300 → accent-600/400 across components Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* CLI entry point for OG image generation.
|
|
* Runs as a separate process to isolate memory from Eleventy.
|
|
*
|
|
* Usage: node lib/og-cli.js <contentDir> <cacheDir> <siteName> [batchSize]
|
|
*
|
|
* batchSize: Max images to generate per invocation (0 = unlimited).
|
|
* When set, exits after generating that many images so the caller
|
|
* can re-spawn (releasing all WASM native memory between batches).
|
|
* Exit code 2 = batch complete, more work remains.
|
|
*/
|
|
|
|
import { generateOgImages } from "./og.js";
|
|
|
|
const [contentDir, cacheDir, siteName, batchSizeStr] = process.argv.slice(2);
|
|
|
|
if (!contentDir || !cacheDir || !siteName) {
|
|
console.error("[og] Usage: node og-cli.js <contentDir> <cacheDir> <siteName> [batchSize]");
|
|
process.exit(1);
|
|
}
|
|
|
|
const batchSize = parseInt(batchSizeStr, 10) || 0;
|
|
const result = await generateOgImages(contentDir, cacheDir, siteName, batchSize);
|
|
|
|
// Exit code 2 signals "batch complete, more images remain"
|
|
if (result?.hasMore) {
|
|
process.exit(2);
|
|
}
|