fix MoreTile

This commit is contained in:
LazuliKao 2024-09-23 11:14:32 +08:00
parent be51739680
commit 6118efc61e
2 changed files with 6 additions and 6 deletions

View file

@ -185,11 +185,11 @@ const handleLocalCoverPlugin: RehypePlugin = () => {
type AstroData = { type AstroData = {
frontmatter: { frontmatter: {
cover: cover:
| { | {
url: string url: string
} }
| string | string
| undefined | undefined
} }
} }
const astroData = file.data.astro as AstroData const astroData = file.data.astro as AstroData

View file

@ -4,7 +4,7 @@ const { title, href, cover, tags, date } = Astro.props
const dateFormatted = formatDate(date) const dateFormatted = formatDate(date)
const type = tags?.[0] ?? "默认" const type = tags?.[0] ?? "默认"
const image = cover?.url ? cover : "https://oss.nbtca.space/CA-logo.svg" const image = cover?.url ?? cover ?? "https://oss.nbtca.space/CA-logo.svg"
const label = `${title} - ${type} - 发表时间 ${dateFormatted}`; const label = `${title} - ${type} - 发表时间 ${dateFormatted}`;
--- ---