chore(favicon): clean up formatting and remove unnecessary line breaks

This commit is contained in:
dralagen 2025-04-25 15:05:21 +02:00
parent afae0986af
commit dae5430957

View File

@ -1,19 +1,16 @@
import sharp from "sharp";
import { joinSegments, QUARTZ, FilePath } from "../../util/path";
import { QuartzEmitterPlugin } from "../types";
import sharp from "sharp"
import { joinSegments, QUARTZ, FilePath } from "../../util/path"
import { QuartzEmitterPlugin } from "../types"
export const Favicon: QuartzEmitterPlugin = () => ({
name: "Favicon",
async *emit({ argv, cfg }) {
const iconPath = joinSegments(QUARTZ, "static", "icon.png")
const dest = joinSegments(argv.output, "favicon.ico") as FilePath
await sharp(iconPath)
.resize(48, 48)
.toFormat("png")
.toFile(dest)
name: "Favicon",
async *emit({ argv }) {
const iconPath = joinSegments(QUARTZ, "static", "icon.png")
const dest = joinSegments(argv.output, "favicon.ico") as FilePath
yield dest
},
async *partialEmit() {},
})
await sharp(iconPath).resize(48, 48).toFormat("png").toFile(dest)
yield dest
},
async *partialEmit() {},
})