aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/authors
diff options
context:
space:
mode:
authorNikhil M Warrier <nikhilmw.dev@gmail.com>2026-03-03 09:00:53 +0530
committerNikhil M Warrier <nikhilmw.dev@gmail.com>2026-03-03 09:00:53 +0530
commitc1c7ca70783cbb38cf35fe0c9fb05dd626f46c08 (patch)
tree2941afd019e4e073f195929ede6792a6d45af5dd /src/pages/authors
parentb1cc6aef5d01b59daf64d12a8e9264324540d8b7 (diff)
Rename Author to Member, add Codeberg icons
Diffstat (limited to 'src/pages/authors')
-rw-r--r--src/pages/authors/[...id].astro58
-rw-r--r--src/pages/authors/index.astro27
2 files changed, 0 insertions, 85 deletions
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)
----
-
-<Layout class="max-w-3xl">
- <PageHead
- slot="head"
- title={`${author.data.name} (Author)`}
- description={author.data.bio || `Profile of ${author.data.name}.`}
- noindex
- />
- <Breadcrumbs
- items={[
- { href: '/authors', label: 'Authors', icon: 'lucide:users' },
- { label: author.data.name, icon: 'lucide:user' },
- ]}
- />
-
- <section>
- <AuthorCard author={author} />
- </section>
- <section class="flex flex-col gap-y-4">
- <h2 class="text-2xl font-medium">Posts by {author.data.name}</h2>
- {
- authorPosts.length > 0 ? (
- <ul class="flex flex-col gap-4">
- {authorPosts
- .filter((post) => !post.data.draft)
- .map((post) => (
- <li>
- <BlogCard entry={post} />
- </li>
- ))}
- </ul>
- ) : (
- <p class="text-muted-foreground">
- No posts available from this author.
- </p>
- )
- }
- </section>
-</Layout>
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>