diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 68e3d97..3b12c8b 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -5,8 +5,9 @@ interface Props { image?: string; } -import { withBase } from "../lib/utils"; -const { title, description = "The official blog of the Python core development team.", image } = Astro.props; +import { withBase, stripDescriptionLinks } from "../lib/utils"; +const { title, description: rawDescription = "The official blog of the Python core development team.", image } = Astro.props; +const description = stripDescriptionLinks(rawDescription); const baseUrl = import.meta.env.DEV ? Astro.url.origin : Astro.site; const canonicalURL = new URL(Astro.url.pathname, Astro.site); const ogImage = image ? new URL(image, baseUrl) : new URL(withBase("/og-default.png"), baseUrl); diff --git a/src/components/BlogPostCard.astro b/src/components/BlogPostCard.astro index f302c10..7712434 100644 --- a/src/components/BlogPostCard.astro +++ b/src/components/BlogPostCard.astro @@ -1,5 +1,5 @@ --- -import { formatDate, postUrl, slugify, withBase } from "../lib/utils"; +import { formatDate, postUrl, slugify, withBase, renderDescriptionLinks } from "../lib/utils"; interface Props { slug: string; @@ -29,7 +29,7 @@ const { slug, title, publishDate, author, description, tags, showEditLink = true {description && ( -
{description}
+ )} {tags && tags.length > 0 && (- {featured.data.description} -
+ )} @@ -132,7 +130,7 @@ const authors = new Set(posts.map((p) => p.data.author)); {post.data.description && ( -{post.data.description}
+ )} ))}