random placeholders
This commit is contained in:
parent
10b78f86a3
commit
144ce43d45
2 changed files with 27 additions and 0 deletions
26
src/pages/supercomputing/[...slug].astro
Normal file
26
src/pages/supercomputing/[...slug].astro
Normal file
|
@ -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();
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="markdown">
|
||||||
|
<Content />
|
||||||
|
</div>
|
1
src/pages/supercomputing/index.astro
Normal file
1
src/pages/supercomputing/index.astro
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Hi
|
Loading…
Reference in a new issue