Migrate to LFTP deployment and improve templates
- Add `deploy-lftp` command - Add 404 page - Change relative links to absolute links - Fix pagination links - Remove drafts from Pagefind indexing - Fix OpenGraph descriptions for i18n - Add Commissioners and Requesters components - Add consistent type-checking for getStaticPaths
This commit is contained in:
parent
837433364d
commit
a9d5a88d0e
26 changed files with 254 additions and 70 deletions
|
|
@ -3,14 +3,19 @@ import type { GetStaticPaths } from "astro";
|
|||
import { type CollectionEntry, getCollection } from "astro:content";
|
||||
import GameLayout from "../../layouts/GameLayout.astro";
|
||||
|
||||
type Props = CollectionEntry<"games">;
|
||||
|
||||
type Params = {
|
||||
slug: CollectionEntry<"games">["slug"];
|
||||
};
|
||||
|
||||
export const getStaticPaths: GetStaticPaths = async () => {
|
||||
const games = await getCollection("games");
|
||||
return games.map((game) => ({
|
||||
params: { slug: game.slug },
|
||||
props: game,
|
||||
params: { slug: game.slug } satisfies Params,
|
||||
props: game satisfies Props,
|
||||
}));
|
||||
};
|
||||
type Props = CollectionEntry<"games">;
|
||||
|
||||
const game = Astro.props;
|
||||
const { Content } = await game.render();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue