mirror of
https://github.com/m1ngsama/FUJI.git
synced 2025-12-25 02:56:38 +00:00
fix cover
This commit is contained in:
parent
feea83a685
commit
6eeaa2a4cb
1 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,9 @@ export const handleLocalCoverPlugin: RehypePlugin = () => {
|
||||||
if (coverUrl.includes("http")) {
|
if (coverUrl.includes("http")) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (coverUrl.includes("base64")) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const url = path.resolve(path.dirname(filePath), coverUrl)
|
const url = path.resolve(path.dirname(filePath), coverUrl)
|
||||||
const dataURL = await convertImageToBase64URL(url)
|
const dataURL = await convertImageToBase64URL(url)
|
||||||
if (typeof astroData.frontmatter.cover === "string") {
|
if (typeof astroData.frontmatter.cover === "string") {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue