This commit is contained in:
@@ -485,10 +485,10 @@ export async function generateOgImages(contentDir, cacheDir, siteName, batchSize
|
|||||||
// Render SVG to PNG using the system resvg CLI
|
// Render SVG to PNG using the system resvg CLI
|
||||||
// Requires: pkg install resvg
|
// Requires: pkg install resvg
|
||||||
const outPath = join(ogDir, `${slug}.png`);
|
const outPath = join(ogDir, `${slug}.png`);
|
||||||
const resvgProc = spawnSync(
|
const resvgProc = spawnSync(
|
||||||
"resvg",
|
"resvg",
|
||||||
["-w", String(WIDTH), "-b", COLORS.bg, "-o", outPath, "-"],
|
["-w", String(WIDTH), "-b", COLORS.bg, "-o", outPath, "-"],
|
||||||
{ input: svg, encoding: "buffer" }
|
{ input: svg, encoding: null }
|
||||||
);
|
);
|
||||||
if (resvgProc.error) {
|
if (resvgProc.error) {
|
||||||
throw resvgProc.error;
|
throw resvgProc.error;
|
||||||
|
|||||||
Reference in New Issue
Block a user