Skip to content

Post: blog has moved#27

Merged
JacobCoffee merged 3 commits intomainfrom
post/blog-has-moved
Mar 3, 2026
Merged

Post: blog has moved#27
JacobCoffee merged 3 commits intomainfrom
post/blog-has-moved

Conversation

@JacobCoffee
Copy link
Member

Imports the final Blogger post, and adds some fancies to showcase what the new blog can do.
Adds author file

Copilot AI review requested due to automatic review settings March 3, 2026 18:36
@JacobCoffee JacobCoffee merged commit 6b17ea6 into main Mar 3, 2026
2 checks passed
@JacobCoffee JacobCoffee deleted the post/blog-has-moved branch March 3, 2026 18:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the final transitional blog post ("The Python Insider Blog Has Moved!") that announces the migration from Blogger to the new Git-backed Astro site. It includes the post content, the author profile for Jacob Coffee, a new redirect entry, and four new showcase Astro components used inline in the post to demonstrate the new site's features.

Changes:

  • Adds a new blog post (index.mdx) announcing the migration with embedded live showcase components illustrating blog features (post cards, tag cloud, author list, command palette mockup).
  • Adds four new showcase UI components (ShowcasePostCards.astro, ShowcaseTagCloud.astro, ShowcaseAuthors.astro, ShowcaseSearch.astro) used exclusively within the new post.
  • Adds the jacob-coffee.json author file and a new entry in redirects.json for the new post's legacy URL.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
content/posts/the-python-insider-blog-has-moved/index.mdx New blog post announcing the migration, embedding the showcase components
content/authors/jacob-coffee.json New author entry for Jacob Coffee (contains a spelling typo in bio)
src/data/redirects.json Adds legacy redirect for the new post
src/components/showcase/ShowcaseTagCloud.astro New component showing top tags by frequency
src/components/showcase/ShowcaseSearch.astro New static mockup of the command palette
src/components/showcase/ShowcasePostCards.astro New component showing recent posts with mini sidebar (contains unused import and repeated filter)
src/components/showcase/ShowcaseAuthors.astro New component showing top authors by post count

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,11 @@
{
"name": "Jacob Coffee",
"bio": "Python Software Foundation Staff. Litestar Maintainer.",
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bio field contains a typo: "Infradwre" should be "Infrastructure".

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,100 @@
---
import { getCollection } from "astro:content";
import { formatDate, postUrl, slugify, withBase } from "../../lib/utils";
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slugify is imported from ../../lib/utils but is never used anywhere in this file. The only usage in the template refers to postUrl, formatDate, and withBase. Removing the unused import keeps the file clean.

Suggested change
import { formatDate, postUrl, slugify, withBase } from "../../lib/utils";
import { formatDate, postUrl, withBase } from "../../lib/utils";

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +36
const recentPosts = allPosts
.filter((p) => p.data.published)
.sort((a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime())
.slice(0, 3);

// Collect years from all posts for the mini sidebar
const yearSet = new Set<number>();
for (const post of allPosts.filter((p) => p.data.published)) {
yearSet.add(post.data.publishDate.getFullYear());
}
const years = [...yearSet].sort((a, b) => b - a).slice(0, 8);

// Top tags for the mini sidebar
const tagCounts = new Map<string, number>();
for (const post of allPosts.filter((p) => p.data.published)) {
for (const tag of post.data.tags) {
tagCounts.set(tag, (tagCounts.get(tag) || 0) + 1);
}
}
const topTags = [...tagCounts.entries()].sort((a, b) => b[1] - a[1]).slice(0, 10);
---

<div class="not-prose my-8 overflow-hidden rounded-xl border border-zinc-200 dark:border-zinc-800">
<div class="flex items-center justify-between border-b border-zinc-200 bg-zinc-50 px-5 py-3 dark:border-zinc-800 dark:bg-zinc-900/50">
<div class="flex items-center gap-2">
<svg class="h-4 w-4 text-zinc-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path d="M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z" stroke-linecap="round" stroke-linejoin="round" />
<path d="M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<span class="text-sm font-semibold text-zinc-700 dark:text-zinc-300" style="font-family: var(--font-display);">Blog</span>
<span class="text-xs text-zinc-400 dark:text-zinc-500">{allPosts.filter((p) => p.data.published).length} posts with filters & pagination</span>
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filter allPosts.filter((p) => p.data.published) is applied four times — on lines 7, 13, 20, and 36. With 300+ posts in the collection, this means iterating the full array four times unnecessarily. Consider extracting this into a publishedPosts variable (as is done in the sibling components ShowcaseTagCloud.astro and ShowcaseAuthors.astro) and reusing it throughout.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants