Restore original wide photo for homepage About section; fix Weiterlesen

About section goes back to the original wide banner image (its own
new file, about-banner.jpg) — the new bjoern.png headshot is a square
close-up that never suited this wide/short strip. Blog posts keep the
new photo via about-author.jpg, unaffected.

Also fixes /blog/[slug]'s "Weiterlesen" card: it picked the first of
the 4 most-recent posts that wasn't the current one, so nearly every
post converged on the same one or two most-recent articles. Now picks
the chronologically next-older post (wrapping to the newest from the
oldest), so every post points somewhere different.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Eg6h91yngXmSnM51wxXM8
This commit is contained in:
Marco
2026-08-29 22:17:29 +00:00
parent 55d613d409
commit 6f6a6119f5
3 changed files with 20 additions and 18 deletions
+11 -5
View File
@@ -57,11 +57,17 @@ export default async function BlogDetailPage({
const post = await getPostBySlug(slug, { draft: isPreview });
if (!post) notFound();
// "Weiterlesen" — any other post, most recent first. Not the current
// one; falls back to nothing (section just doesn't render) rather than
// showing a fake/duplicate card when this is the only post.
const otherPosts = await getBlogPosts(4);
const nextPost = otherPosts.find((p) => p.slug !== post.slug) ?? null;
// "Weiterlesen" — the chronologically next-older post, wrapping around
// to the newest post from the oldest one. Not getBlogPosts()'s own
// -featured,-publishedAt order: picking "the first of the top 4 that
// isn't this one" made nearly every post's Weiterlesen converge on the
// same one or two most-recent posts (reported 2026-08-29). Sorting
// purely by publishedAt here instead makes every post point somewhere
// different, cycling through the whole archive one post at a time.
const allPosts = await getBlogPosts(100);
const byDate = [...allPosts].sort((a, b) => new Date(b.publishedAt).getTime() - new Date(a.publishedAt).getTime());
const currentIndex = byDate.findIndex((p) => p.slug === post.slug);
const nextPost = currentIndex === -1 || byDate.length < 2 ? null : byDate[(currentIndex + 1) % byDate.length];
const seller = await getCompanySettings();
const articleSchema = buildArticleSchema(post, seller);