mirror of
https://codeberg.org/HPCesia/AstralHalo.git
synced 2025-04-08 17:34:27 +08:00
fix: post cover
This commit is contained in:
parent
34804d525d
commit
7e40bf2eda
@ -24,7 +24,8 @@ export async function getStaticPaths() {
|
||||
|
||||
const { article } = Astro.props;
|
||||
const { Content, headings, remarkPluginFrontmatter } = await render(article);
|
||||
const coverSrc = article.data.cover?.src;
|
||||
const coverSrc =
|
||||
typeof article.data.cover === 'string' ? article.data.cover : article.data.cover?.src;
|
||||
const description = article.data.description || remarkPluginFrontmatter.excerpt;
|
||||
const isDraft = article.data.draft === true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user