From 144ce43d4525f6c7dd266bef79134f8597c1e332 Mon Sep 17 00:00:00 2001 From: chark1es Date: Sun, 17 Mar 2024 22:25:27 -0700 Subject: [PATCH] random placeholders --- src/pages/supercomputing/[...slug].astro | 26 ++++++++++++++++++++++++ src/pages/supercomputing/index.astro | 1 + 2 files changed, 27 insertions(+) create mode 100644 src/pages/supercomputing/[...slug].astro create mode 100644 src/pages/supercomputing/index.astro diff --git a/src/pages/supercomputing/[...slug].astro b/src/pages/supercomputing/[...slug].astro new file mode 100644 index 0000000..2d9186e --- /dev/null +++ b/src/pages/supercomputing/[...slug].astro @@ -0,0 +1,26 @@ +--- +const { post } = Astro.props; + +import { CollectionEntry, getCollection } from "astro:content"; +export interface Props { + post: CollectionEntry<"supercomputing">; +} + +export async function getStaticPaths() { + const posts = await getCollection( + "supercomputing", + ({ data }) => !data.draft + ); + const postResult = posts.map((post) => ({ + params: { slug: post.slug }, + props: { post }, + })); + return [...postResult]; +} + +const { Content } = await post.render(); +--- + +
+ +
diff --git a/src/pages/supercomputing/index.astro b/src/pages/supercomputing/index.astro new file mode 100644 index 0000000..b14df64 --- /dev/null +++ b/src/pages/supercomputing/index.astro @@ -0,0 +1 @@ +Hi