chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-07-21 10:52:51 +02:00
parent 14b2799f08
commit 4add2d1aff
151 changed files with 4561 additions and 3315 deletions

View file

@ -457,27 +457,26 @@ class GenerateLayouts extends Script {
let ogImage = layout.socialImage
let twitterImage = ogImage
if (ogImage === LayoutConfig.defaultSocialImage && layout.official) {
try{
try {
ogImage = (await this.createSocialImage(layout, "")) ?? layout.socialImage
twitterImage = (await this.createSocialImage(layout, "Wide")) ?? layout.socialImage
}catch (e) {
} catch (e) {
console.error("Could not generate image:", e)
}
}
if (twitterImage.endsWith(".svg")) {
try{
// svgs are badly supported as social image, we use a generated svg instead
twitterImage = await this.createIcon(twitterImage, 512, alreadyWritten)
}catch (e) {
try {
// svgs are badly supported as social image, we use a generated svg instead
twitterImage = await this.createIcon(twitterImage, 512, alreadyWritten)
} catch (e) {
console.error("Could not generate image:", e)
}
}
if (ogImage.endsWith(".svg")) {
try{
try {
ogImage = await this.createIcon(ogImage, 512, alreadyWritten)
}catch (e) {
} catch (e) {
console.error("Could not generate image:", e)
}
}