This commit is contained in:
2025-11-30 19:37:21 +08:00
parent e65fad70f5
commit 3afa6a3153
3 changed files with 3 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"prettier": "prettier --write **/*.{ts,tsx,css,astro} --ignore-path .gitignore",

View File

@@ -89,6 +89,7 @@ export function normalizePost(post: NotionPost): CollectionEntry<'blog'> {
tags: Array.isArray(post.Tags) ? post.Tags : [],
draft: !(post.Published ?? true),
authors: [DEFAULT_AUTHOR_ID],
banner,
image,
},
body: '',

View File

@@ -86,7 +86,7 @@ try {
]
: []
: await getTOCSections(currentPostId)
heroImage = post?.data?.banner
heroImage = post?.data?.banner ?? post?.data?.image ?? null
} catch (error) {
console.error('blog page render failed:', error)
return Astro.rewrite('/500')