Initial commit
This commit is contained in:
commit
09a1919d36
152 changed files with 22845 additions and 0 deletions
20
src/pages/games/[...slug].astro
Normal file
20
src/pages/games/[...slug].astro
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
import { type CollectionEntry, getCollection } from 'astro:content';
|
||||
import GameLayout from '../../layouts/GameLayout.astro';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const games = await getCollection('games');
|
||||
return games.map(story => ({
|
||||
params: { slug: story.slug },
|
||||
props: story,
|
||||
}));
|
||||
}
|
||||
type Props = CollectionEntry<'games'>
|
||||
|
||||
const story = Astro.props;
|
||||
const { Content } = await story.render();
|
||||
---
|
||||
|
||||
<GameLayout {...story.data}>
|
||||
<Content />
|
||||
</GameLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue