diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 33b9d6e..3b1ecf9 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -3,7 +3,7 @@ import Layout from '../../layouts/Layout.astro'; import { getCollection, getEntry } from 'astro:content'; import Comments from "../../components/Comments.astro"; -import {getImage} from "astro:assets"; +import {getImage, Image} from "astro:assets"; import {siteConfig} from "../../config"; import ReplyViaEmail from "../../components/ReplyViaEmail.astro"; import { ExtractFirstImage } from '../../plugins/extract-images'; @@ -60,8 +60,9 @@ const cover = customFeaturedImage || matchedImage_src?.src || firstImageURL || ` (Updated on {new Date(lastUpdated).toISOString().split('T')[0]}) | {wordcount.words} words - {headings.length !== 0 && } - {entry.data.summary &&

{entry.data.summary}

} + { (cover && cover !== firstImageURL && cover !== `/blog/${slug}/featured.png`) && {`cover } + {headings.length !== 0 && } + {entry.data.summary &&

{entry.data.summary}

}
@@ -84,4 +85,9 @@ const cover = customFeaturedImage || matchedImage_src?.src || firstImageURL || ` color: var(--secondary-text-color); margin: 1rem; } + img.cover { + width: 100%; + height: auto; + margin: 1rem auto; + }