diff --git a/src/content.config.ts b/src/content.config.ts index 2ab0584..99728f1 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -10,8 +10,8 @@ const posts = defineCollection({ description: z.string().optional(), date: z.string(), updated: z.string().optional(), + feat: z.boolean().default(false), // whether this is showed in main stage tags: z.array(z.string()).default([]), - feat: z.boolean(), // whether this is showed in main stage stageImage: image().optional(), stageTone: z.enum(["dark", "light"]).default("dark"), color: z.string().optional(), diff --git a/src/content/posts/bitcoin.mdx b/src/content/posts/bitcoin.mdx index 861a3b5..f291dc3 100644 --- a/src/content/posts/bitcoin.mdx +++ b/src/content/posts/bitcoin.mdx @@ -2,6 +2,7 @@ title: "Bitcoin, and then miners" description: "Pools, farms and miners" date: "2026-07-28" +feat: true tags: ["bitcoin", "crypto", "cryptocurrency"] stageImage: "../../assets/bitcoin-bg.webp" color: "#F7941D" diff --git a/src/content/posts/prologue.mdx b/src/content/posts/prologue.mdx index 2e3747a..4a183e9 100644 --- a/src/content/posts/prologue.mdx +++ b/src/content/posts/prologue.mdx @@ -2,6 +2,7 @@ title: "prologue" description: "A playground where I throw in as much fun as I can." date: "2026-08-28" +feat: true tags: [] color: "#d72d1a" stageTone: "light" diff --git a/src/pages/index.astro b/src/pages/index.astro index dc9d21c..3333853 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -33,8 +33,9 @@ async function cardSrc(image: ImageMetadata | undefined) { // stage caption numbers itself off the same positions and the two indexes have // to agree. const posts = await getSortedPosts(); +const featured = posts.filter((post) => post.data.feat); const unordered = await Promise.all( - posts.map(async (post) => ({ + featured.map(async (post) => ({ id: post.id, title: post.data.title, description: post.data.description, diff --git a/src/pages/posts/[slug].astro b/src/pages/posts/[slug].astro deleted file mode 100644 index 74bb34e..0000000 --- a/src/pages/posts/[slug].astro +++ /dev/null @@ -1,30 +0,0 @@ ---- -import { getCollection, render } from "astro:content"; -import PostLayout from "../../layouts/PostLayout.astro"; -import { oscTriangle } from "three/tsl"; - -export async function getStaticPaths() { - const posts = await getCollection("posts"); - return posts.map((post) => ({ - params: { slug: post.id }, - props: { post }, - })); -} - -const { post } = Astro.props; -const { Content } = await render(post); ---- - - - -