fix: resvg og image generation
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m44s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m44s
This commit is contained in:
@@ -486,7 +486,7 @@ export async function generateOgImages(contentDir, cacheDir, siteName, batchSize
|
||||
// Requires: pkg install resvg
|
||||
const outPath = join(ogDir, `${slug}.png`);
|
||||
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) {
|
||||
console.error(`[og] resvg CLI error for ${outPath}:`, result.error);
|
||||
throw result.error;
|
||||
|
||||
Reference in New Issue
Block a user