Skip to content

Commit 5270c6a

Browse files
JacobCoffeeclaude
andcommitted
fix types, repo name, and prep for CI
- Fix python-insder-blog → python-insider-blog in astro and keystatic configs - Add explicit Props interfaces to all dynamic route pages - Add lint/typecheck scripts to package.json - Exclude scripts/ from astro check (migration script) - Remove unused imports from remark-python-refs - Add Ned to typos allowlist - Add .env, .DS_Store to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a3fe1ab commit 5270c6a

File tree

13 files changed

+53
-8
lines changed

13 files changed

+53
-8
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# build output
22
dist/
3+
34
# generated types
45
.astro/
56

67
# dependencies
78
node_modules/
89

10+
# env
11+
.env
12+
.env.*
13+
!.env.example
14+
915
# logs
1016
npm-debug.log*
1117
yarn-debug.log*
1218
yarn-error.log*
1319
pnpm-debug.log*
1420

21+
# OS
22+
.DS_Store

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Blog for Python core team, mostly for blogging about releases.
44

5-
### About
5+
## About
66

77
Uses keystatic for WYSIWYG editing.
88

@@ -22,7 +22,7 @@ so that we can more easily redirect.
2222

2323
### Posts
2424

25-
Posts are structred under `content/posts/`.
25+
Posts are structured under `content/posts/`.
2626
They have the directory named after the blog entry title.
2727

2828
Inside is the core markdown (index.md) and optionally the images
@@ -31,3 +31,8 @@ used in the blog entry.
3131
### Authors
3232

3333
Authors are configured via `content/authors/`.
34+
35+
## Contributing
36+
37+
There are `Make` targets to get up and going, assuming you have the
38+
tooling required (Bun, prek, etc.)

_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Galindo = "Galindo"
3131
Driscoll = "Driscoll"
3232
Jenvey = "Jenvey"
3333
Langa = "Langa"
34+
Ned = "Ned"
3435
haypo = "haypo"
3536
# Python/tech terms
3637
pyc = "pyc"

astro.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (isDev) {
2525
}
2626

2727
export default defineConfig({
28-
site: "https://jacobcoffee.github.io/python-insder-blog",
28+
site: "https://jacobcoffee.github.io/python-insider-blog",
2929
integrations,
3030
output: isDev ? "server" : "static",
3131
...(isDev && {

keystatic.config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default config({
9393
? { kind: "local" }
9494
: {
9595
kind: "github",
96-
repo: { owner: "JacobCoffee", name: "python-insder-blog" },
96+
repo: { owner: "JacobCoffee", name: "python-insider-blog" },
9797
branchPrefix: "keystatic/",
9898
},
9999
collections: {

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"dev": "astro dev",
77
"build": "astro build",
88
"preview": "astro preview",
9+
"lint": "oxlint src/",
10+
"typecheck": "astro check",
911
"astro": "astro"
1012
},
1113
"dependencies": {
@@ -35,4 +37,4 @@
3537
"turndown-plugin-gfm": "^1.0.2",
3638
"typescript": "^5.9.3"
3739
}
38-
}
40+
}

src/pages/authors/[author].astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import type { GetStaticPaths } from "astro";
3+
import type { CollectionEntry } from "astro:content";
34
import BaseLayout from "../../layouts/BaseLayout.astro";
45
import BlogPostCard from "../../components/BlogPostCard.astro";
56
import { getCollection } from "astro:content";
@@ -33,6 +34,12 @@ export const getStaticPaths: GetStaticPaths = async () => {
3334
}));
3435
};
3536
37+
interface Props {
38+
slug: string;
39+
author: CollectionEntry<"authors">["data"];
40+
posts: CollectionEntry<"posts">[];
41+
}
42+
3643
const isDev = import.meta.env.DEV;
3744
const { slug, author, posts } = Astro.props;
3845
const avatarUrl = author.avatar || (author.github ? `https://github.com/${author.github}.png` : "");

src/pages/blog/[page].astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import type { GetStaticPaths } from "astro";
3+
import type { CollectionEntry } from "astro:content";
34
import BaseLayout from "../../layouts/BaseLayout.astro";
45
import BlogPostCard from "../../components/BlogPostCard.astro";
56
import Pagination from "../../components/Pagination.astro";
@@ -49,6 +50,15 @@ export const getStaticPaths: GetStaticPaths = async () => {
4950
}));
5051
};
5152
53+
interface Props {
54+
posts: CollectionEntry<"posts">[];
55+
currentPage: number;
56+
totalPages: number;
57+
totalPosts: number;
58+
topTags: [string, number][];
59+
totalTags: number;
60+
years: number[];
61+
}
5262
const { posts, currentPage, totalPages, totalPosts, topTags, totalTags, years } = Astro.props;
5363
---
5464

src/pages/blog/[slug].astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import type { GetStaticPaths } from "astro";
3+
import type { CollectionEntry } from "astro:content";
34
import BlogPostLayout from "../../layouts/BlogPostLayout.astro";
45
import { getCollection, render } from "astro:content";
56
@@ -15,6 +16,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
1516
}));
1617
};
1718
19+
interface Props { post: CollectionEntry<"posts"> }
1820
const { post } = Astro.props;
1921
const { Content } = await render(post);
2022
---

src/pages/blog/year/[year].astro

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import type { GetStaticPaths } from "astro";
3+
import type { CollectionEntry } from "astro:content";
34
import BaseLayout from "../../../layouts/BaseLayout.astro";
45
import BlogPostCard from "../../../components/BlogPostCard.astro";
56
import { getCollection } from "astro:content";
@@ -37,6 +38,13 @@ export const getStaticPaths: GetStaticPaths = async () => {
3738
}));
3839
};
3940
41+
interface Props {
42+
year: number;
43+
posts: CollectionEntry<"posts">[];
44+
allYears: number[];
45+
topTags: [string, number][];
46+
totalTags: number;
47+
}
4048
const { year, posts, allYears, topTags, totalTags } = Astro.props;
4149
---
4250

0 commit comments

Comments
 (0)