mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-29 07:44:06 -06:00
fix: merge paths using joinSegments
This commit is contained in:
parent
c163cceb1f
commit
84a70a7688
@ -32,7 +32,8 @@ async function generateSocialImage(
|
|||||||
const compressed = await sharp(Buffer.from(svg)).webp({ quality: 40 }).toBuffer()
|
const compressed = await sharp(Buffer.from(svg)).webp({ quality: 40 }).toBuffer()
|
||||||
|
|
||||||
// Write to file system
|
// Write to file system
|
||||||
fs.writeFileSync(`${imageDir}/${fileName}.${extension}`, compressed)
|
const filePath = joinSegments(imageDir, `${fileName}.${extension}`)
|
||||||
|
fs.writeFileSync(filePath, compressed)
|
||||||
}
|
}
|
||||||
|
|
||||||
const extension = "webp"
|
const extension = "webp"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user