diff --git a/package.json b/package.json index 2bfaa4f..cd4b50e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/lib/data-utils.ts b/src/lib/data-utils.ts index 0c88fa6..3e0aeb4 100644 --- a/src/lib/data-utils.ts +++ b/src/lib/data-utils.ts @@ -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: '', diff --git a/src/pages/blog/[...id].astro b/src/pages/blog/[...id].astro index 1b14375..7993329 100644 --- a/src/pages/blog/[...id].astro +++ b/src/pages/blog/[...id].astro @@ -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')