src/pages/authors/index.astro (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
--- import AuthorCard from '@/components/AuthorCard.astro' import Breadcrumbs from '@/components/Breadcrumbs.astro' import Container from '@/components/Container.astro' import Layout from '@/layouts/Layout.astro' import { getCollection } from 'astro:content' const authors = await getCollection('authors') --- <Layout title="Authors" description="A list of authors on this site."> <Container class="flex flex-col gap-y-6"> <Breadcrumbs items={[{ label: 'Authors', icon: 'lucide:users' }]} /> { authors.length > 0 ? ( <ul class="not-prose flex flex-col gap-4"> {authors.map((author) => ( <li> <AuthorCard author={author} /> </li> ))} </ul> ) : ( <p class="text-center text-muted-foreground">No authors found.</p> ) } </Container> </Layout> |