We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0b4281 commit 2d1244eCopy full SHA for 2d1244e
src/pages/writing/[...slug].astro
@@ -33,13 +33,17 @@ const { Content } = await render(entry);
33
</div>
34
<h1 class="text-3xl font-semibold text-headings">{entry.data.title}</h1>
35
36
- <div class="relative aspect-video overflow-hidden rounded-lg">
37
- <Image
38
- src={entry.data.image}
39
- alt={entry.data.title}
40
- class="object-cover"
41
- />
42
- </div>
+ {entry.data.image && (
+ <div class="relative aspect-video overflow-hidden rounded-lg">
+ <Image
+ src={entry.data.image?.src}
+ alt={entry.data.title}
+ width={entry.data.image?.width}
+ height={entry.data.image?.height}
43
+ class="object-cover"
44
+ />
45
+ </div>
46
+ )}
47
<div class="prose dark:prose-invert">
48
<Content />
49
0 commit comments