diff --git a/public/img/blog/2025/10/banner-ddev-10-minutes-linux-dark.svg b/public/img/blog/2025/10/banner-ddev-10-minutes-linux-dark.svg index cdf5ecac4..b62b62612 100644 --- a/public/img/blog/2025/10/banner-ddev-10-minutes-linux-dark.svg +++ b/public/img/blog/2025/10/banner-ddev-10-minutes-linux-dark.svg @@ -1,4 +1,4 @@ - +
@@ -261,7 +270,7 @@ Waiting for ddev-router to become ready... ready in 1.0s
-
+
diff --git a/src/components/AppLogos.astro b/src/components/AppLogos.astro index 8e1db8ee9..9cbc66c0f 100644 --- a/src/components/AppLogos.astro +++ b/src/components/AppLogos.astro @@ -14,7 +14,7 @@ const logos = [ ---
-
+
{ logos.map((logo) => ( diff --git a/src/components/Benefits.astro b/src/components/Benefits.astro index 54bf6514b..59edbdc5a 100644 --- a/src/components/Benefits.astro +++ b/src/components/Benefits.astro @@ -40,7 +40,7 @@ const features = [ ---
-
+

Benefits

diff --git a/src/components/BlogFeatures.astro b/src/components/BlogFeatures.astro index 78d324d7a..bdfa24d34 100644 --- a/src/components/BlogFeatures.astro +++ b/src/components/BlogFeatures.astro @@ -14,8 +14,8 @@ const recentPosts = posts .slice(0, 3) --- -
-
+
+

Latest Blog Posts diff --git a/src/components/BlogPostCard.astro b/src/components/BlogPostCard.astro index dba2e86bc..4681c4d26 100644 --- a/src/components/BlogPostCard.astro +++ b/src/components/BlogPostCard.astro @@ -5,13 +5,14 @@ import type { CollectionEntry } from "astro:content" import { render } from "astro:content" import { Picture } from 'astro:assets' -import type { ImageMetadata } from 'astro' +import { resolveImage } from "../lib/images" interface Props { post: CollectionEntry<"blog"> } +import CategoryPills from "./CategoryPills.astro" import { getEntry } from "astro:content" -import { getSlug, formatDate, getCategoryUrl } from "../lib/api" +import { getSlug, formatDate } from "../lib/api" const { post } = Astro.props const { remarkPluginFrontmatter } = await render(post) @@ -25,13 +26,6 @@ const featureImageUrl = featureImage?.src ?? `/img/generic-thumbnail.png` const featureImageAlt = featureImage?.alt ?? `` const featureImageDarkUrl = featureImage?.srcDark ?? null -const images = import.meta.glob<{ default: ImageMetadata }>( - '/public/img/**/*.{png,jpg,jpeg,webp,gif}' -) -const resolveImage = async (path: string) => { - const key = `/public${path}` - return images[key] ? (await images[key]()).default : path -} const resolvedSrc = await resolveImage(featureImageUrl) const resolvedSrcDark = featureImageDarkUrl ? await resolveImage(featureImageDarkUrl) : null @@ -42,15 +36,19 @@ const categories = post.data.categories.length ? post.data.categories : [] /* `isolation: isolate` is here to convince Safari not to display un-rounded corners during animation */ }
-
+ {/* No background of its own: logo SVGs are drawn to sit on the page. The rule + is what separates the image from the text below it. */} +
{ featureImageUrl.includes(".svg") ? ( + /* The same box, filled the same way, as the raster images below, so the + cards in a row line up. */ <> - {featureImageAlt} - {featureImageDarkUrl && } + {featureImageAlt} + {featureImageDarkUrl && } ) : ( <> @@ -76,16 +74,7 @@ const categories = post.data.categories.length ? post.data.categories : []
-
- {categories.map((category) => ( - - {category} - - ))} -
+

{post.data.title} diff --git a/src/components/BlogPostFooter.astro b/src/components/BlogPostFooter.astro index 88dc13e5c..43600e6fb 100644 --- a/src/components/BlogPostFooter.astro +++ b/src/components/BlogPostFooter.astro @@ -4,30 +4,13 @@ export interface Props { } const { activeSlug } = Astro.props -import { getCollection } from "astro:content" +import { getAdjacentPosts } from "../lib/posts" -let next, prev - -const posts = await getCollection("blog") -const orderedPosts = posts.sort((a, b) => { - return new Date(a.data.pubDate) > new Date(b.data.pubDate) ? -1 : 1 -}) - -orderedPosts.forEach((post, index) => { - if (post.id === activeSlug) { - if (posts[index - 1]) { - prev = posts[index - 1] - } - - if (posts[index + 1]) { - next = posts[index + 1] - } - } -}) +const { prev, next } = await getAdjacentPosts(activeSlug) ---