This commit is contained in:
Lio 2024-07-20 10:25:53 +02:00
parent fbbc2129f7
commit 403bf1faa0

View file

@ -1,9 +1,9 @@
---
import type { GetStaticPaths } from "astro";
// import type { GetStaticPaths } from "astro";
import Gallery from "../../layouts/Gallery.astro";
import Image from "../../components/Image.astro";
import pb from "../../lib/pb";
export const getStaticPaths = (async () => {
export async function getStaticPaths() {
const paths = await pb
.collection("characters")
.getFullList({
@ -13,12 +13,12 @@ export const getStaticPaths = (async () => {
// console.log(paths);
return paths.map(({ slug, name }) => {
return paths.map(({ slug }) => {
return {
params: { slug },
};
});
}) satisfies GetStaticPaths;
}
const { slug } = Astro.params;
@ -39,7 +39,7 @@ const images = imageCollection.map((record) => {
};
});
export const prerender = true
export const prerender = true;
---
<Gallery>