From c1c7ca70783cbb38cf35fe0c9fb05dd626f46c08 Mon Sep 17 00:00:00 2001 From: Nikhil M Warrier Date: Tue, 3 Mar 2026 09:00:53 +0530 Subject: Rename Author to Member, add Codeberg icons --- src/pages/authors/[...id].astro | 58 ----------------------------------------- src/pages/authors/index.astro | 27 ------------------- src/pages/members/[...id].astro | 58 +++++++++++++++++++++++++++++++++++++++++ src/pages/members/index.astro | 27 +++++++++++++++++++ 4 files changed, 85 insertions(+), 85 deletions(-) delete mode 100644 src/pages/authors/[...id].astro delete mode 100644 src/pages/authors/index.astro create mode 100644 src/pages/members/[...id].astro create mode 100644 src/pages/members/index.astro (limited to 'src/pages') diff --git a/src/pages/authors/[...id].astro b/src/pages/authors/[...id].astro deleted file mode 100644 index d71fcf8..0000000 --- a/src/pages/authors/[...id].astro +++ /dev/null @@ -1,58 +0,0 @@ ---- -import AuthorCard from '@/components/AuthorCard.astro' -import BlogCard from '@/components/BlogCard.astro' -import Breadcrumbs from '@/components/Breadcrumbs.astro' -import PageHead from '@/components/PageHead.astro' -import Layout from '@/layouts/Layout.astro' -import { getAllAuthors, getPostsByAuthor } from '@/lib/data-utils' - -export async function getStaticPaths() { - const authors = await getAllAuthors() - return authors.map((author) => ({ - params: { id: author.id }, - props: { author }, - })) -} - -const { author } = Astro.props -const authorPosts = await getPostsByAuthor(author.id) ---- - - - - - -
- -
-
-

Posts by {author.data.name}

- { - authorPosts.length > 0 ? ( -
    - {authorPosts - .filter((post) => !post.data.draft) - .map((post) => ( -
  • - -
  • - ))} -
- ) : ( -

- No posts available from this author. -

- ) - } -
-
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() ---- - - - - - { - authors.length > 0 ? ( -
    - {authors.map((author) => ( -
  • - -
  • - ))} -
- ) : ( -

No authors found.

- ) - } -
diff --git a/src/pages/members/[...id].astro b/src/pages/members/[...id].astro new file mode 100644 index 0000000..8010365 --- /dev/null +++ b/src/pages/members/[...id].astro @@ -0,0 +1,58 @@ +--- +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 { getAllMembers, getPostsByAuthor } from '@/lib/data-utils' + +export async function getStaticPaths() { + const members = await getAllMembers() + return members.map((member) => ({ + params: { id: member.id }, + props: { member }, + })) +} + +const { member } = Astro.props +const memberPosts = await getPostsByAuthor(member.id) +--- + + + + + +
+ +
+
+

Posts by {member.data.name}

+ { + memberPosts.length > 0 ? ( +
    + {memberPosts + .filter((post) => !post.data.draft) + .map((post) => ( +
  • + +
  • + ))} +
+ ) : ( +

+ No posts available from this member. +

+ ) + } +
+
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() +--- + + + + + { + members.length > 0 ? ( +
    + {members.map((member) => ( +
  • + +
  • + ))} +
+ ) : ( +

No members found.

+ ) + } +
-- cgit v1.2.3