--- import type { GetStaticPaths } from "astro"; import Layout from "../../layouts/Layout.astro"; import { ALBUM_NAME_ANIMAL_WORLD, ALBUM_NAME_ENCHANTED_FOREST, ALBUMS, } from "../../const"; export const getStaticPaths = () => { return [ { params: { id: ALBUM_NAME_ANIMAL_WORLD, }, }, { params: { id: ALBUM_NAME_ENCHANTED_FOREST, }, }, ]; }; const { id } = Astro.params; let album = { title: "", description: "", images: [ { url: "", desc: "", }, ], }; if (id == ALBUM_NAME_ANIMAL_WORLD) { album = ALBUMS[id]; } if (id == ALBUM_NAME_ENCHANTED_FOREST) { album = ALBUMS[id]; } ---

{album.title}

{album.description}