This commit is contained in:
@@ -486,7 +486,7 @@ export async function generateOgImages(contentDir, cacheDir, siteName, batchSize
|
|||||||
// Requires: pkg install resvg
|
// Requires: pkg install resvg
|
||||||
const outPath = join(ogDir, `${slug}.png`);
|
const outPath = join(ogDir, `${slug}.png`);
|
||||||
console.log(`[og] Generating: ${outPath}`);
|
console.log(`[og] Generating: ${outPath}`);
|
||||||
const result = spawnSync("resvg", ["-w", String(WIDTH), "-b", COLORS.bg, "-o", outPath, "-"], { input: svg, encoding: null });
|
const result = spawnSync("resvg", ["-w", String(WIDTH), "--background", COLORS.bg, "-", outPath], { input: svg, encoding: null, timeout: 30000 });
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
console.error(`[og] resvg CLI error for ${outPath}:`, result.error);
|
console.error(`[og] resvg CLI error for ${outPath}:`, result.error);
|
||||||
throw result.error;
|
throw result.error;
|
||||||
|
|||||||
Reference in New Issue
Block a user