Add description exports and collapse characters from same user

This commit is contained in:
Bad Manners 2024-03-21 22:24:58 -03:00
parent 2990644f87
commit d4a9dc9dbc
78 changed files with 693 additions and 247 deletions

View file

@ -1,20 +1,21 @@
---
import type { GetStaticPaths } from "astro";
import { type CollectionEntry, getCollection } from "astro:content";
import GameLayout from "../../layouts/GameLayout.astro";
export async function getStaticPaths() {
export const getStaticPaths: GetStaticPaths = async () => {
const games = await getCollection("games");
return games.map((story) => ({
params: { slug: story.slug },
props: story,
return games.map((game) => ({
params: { slug: game.slug },
props: game,
}));
}
};
type Props = CollectionEntry<"games">;
const story = Astro.props;
const { Content } = await story.render();
const game = Astro.props;
const { Content } = await game.render();
---
<GameLayout {...story.data}>
<GameLayout {...game.data}>
<Content />
</GameLayout>