diff options
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/authors/index.astro | 27 | ||||
| -rw-r--r-- | src/pages/members/[...id].astro (renamed from src/pages/authors/[...id].astro) | 34 | ||||
| -rw-r--r-- | src/pages/members/index.astro | 27 |
3 files changed, 44 insertions, 44 deletions
diff --git a/src/pages/authors/index.astro b/src/pages/authors/index.astro deleted file mode 100644 index ba311a0..0000000 --- a/src/pages/authors/index.astro +++ /dev/null @@ -1,27 +0,0 @@ ---- -import AuthorCard from '@/components/AuthorCard.astro' -import Breadcrumbs from '@/components/Breadcrumbs.astro' -import PageHead from '@/components/PageHead.astro' -import Layout from '@/layouts/Layout.astro' -import { getAllAuthors } from '@/lib/data-utils' - -const authors = await getAllAuthors() ---- - -<Layout class="max-w-3xl"> - <PageHead slot="head" title="Authors" /> - <Breadcrumbs items={[{ label: 'Authors', icon: 'lucide:users' }]} /> - { - authors.length > 0 ? ( - <ul class="flex flex-col gap-4"> - {authors.map((author) => ( - <li> - <AuthorCard author={author} /> - </li> - ))} - </ul> - ) : ( - <p class="text-muted-foreground text-center">No authors found.</p> - ) - } -</Layout> diff --git a/src/pages/authors/[...id].astro b/src/pages/members/[...id].astro index d71fcf8..8010365 100644 --- a/src/pages/authors/[...id].astro +++ b/src/pages/members/[...id].astro @@ -1,46 +1,46 @@ --- -import AuthorCard from '@/components/AuthorCard.astro' import BlogCard from '@/components/BlogCard.astro' import Breadcrumbs from '@/components/Breadcrumbs.astro' +import MemberCard from '@/components/MemberCard.astro' import PageHead from '@/components/PageHead.astro' import Layout from '@/layouts/Layout.astro' -import { getAllAuthors, getPostsByAuthor } from '@/lib/data-utils' +import { getAllMembers, getPostsByAuthor } from '@/lib/data-utils' export async function getStaticPaths() { - const authors = await getAllAuthors() - return authors.map((author) => ({ - params: { id: author.id }, - props: { author }, + const members = await getAllMembers() + return members.map((member) => ({ + params: { id: member.id }, + props: { member }, })) } -const { author } = Astro.props -const authorPosts = await getPostsByAuthor(author.id) +const { member } = Astro.props +const memberPosts = await getPostsByAuthor(member.id) --- <Layout class="max-w-3xl"> <PageHead slot="head" - title={`${author.data.name} (Author)`} - description={author.data.bio || `Profile of ${author.data.name}.`} + title={`${member.data.name} (Member)`} + description={member.data.bio || `Profile of ${member.data.name}.`} noindex /> <Breadcrumbs items={[ - { href: '/authors', label: 'Authors', icon: 'lucide:users' }, - { label: author.data.name, icon: 'lucide:user' }, + { href: '/members', label: 'Members', icon: 'lucide:users' }, + { label: member.data.name, icon: 'lucide:user' }, ]} /> <section> - <AuthorCard author={author} /> + <MemberCard member={member} /> </section> <section class="flex flex-col gap-y-4"> - <h2 class="text-2xl font-medium">Posts by {author.data.name}</h2> + <h2 class="text-2xl font-medium">Posts by {member.data.name}</h2> { - authorPosts.length > 0 ? ( + memberPosts.length > 0 ? ( <ul class="flex flex-col gap-4"> - {authorPosts + {memberPosts .filter((post) => !post.data.draft) .map((post) => ( <li> @@ -50,7 +50,7 @@ const authorPosts = await getPostsByAuthor(author.id) </ul> ) : ( <p class="text-muted-foreground"> - No posts available from this author. + No posts available from this member. </p> ) } diff --git a/src/pages/members/index.astro b/src/pages/members/index.astro new file mode 100644 index 0000000..04e6d45 --- /dev/null +++ b/src/pages/members/index.astro @@ -0,0 +1,27 @@ +--- +import Breadcrumbs from '@/components/Breadcrumbs.astro' +import MemberCard from '@/components/MemberCard.astro' +import PageHead from '@/components/PageHead.astro' +import Layout from '@/layouts/Layout.astro' +import { getAllMembers } from '@/lib/data-utils' + +const members = await getAllMembers() +--- + +<Layout class="max-w-3xl"> + <PageHead slot="head" title="Members" /> + <Breadcrumbs items={[{ label: 'Members', icon: 'lucide:users' }]} /> + { + members.length > 0 ? ( + <ul class="flex flex-col gap-4"> + {members.map((member) => ( + <li> + <MemberCard member={member} /> + </li> + ))} + </ul> + ) : ( + <p class="text-muted-foreground text-center">No members found.</p> + ) + } +</Layout> |
