+ {guide.title} + + {isNew(guide.publishedAt) && ( + + New + + )} +
+ + {guide.description && ( ++ {guide.description} +
+ )} + +diff --git a/src/pages/authors/[authorSlug].astro b/src/pages/authors/[authorSlug].astro
new file mode 100644
index 000000000..0e628c610
--- /dev/null
+++ b/src/pages/authors/[authorSlug].astro
@@ -0,0 +1,194 @@
+---
+import BaseLayout from '../../layouts/BaseLayout.astro';
+import SimplePageHeader from '../../components/SimplePageHeader.astro';
+import { httpGet } from '../../lib/http';
+
+export async function getStaticPaths() {
+ // For now, return an empty array for static generation
+ // In production, you'd fetch all authors here
+ return [];
+}
+
+const { authorSlug } = Astro.params;
+const apiUrl = import.meta.env.PUBLIC_API_URL || 'http://localhost:8080';
+
+// Fetch author details
+const { response: author, error: authorError } = await httpGet(
+ `${apiUrl}/v1-get-author/${authorSlug}`
+);
+
+if (authorError || !author) {
+ return Astro.redirect('/404');
+}
+
+// Fetch author's guides
+const { response: guidesData, error: guidesError } = await httpGet(
+ `${apiUrl}/v1-list-guides`,
+ {
+ authorId: author._id,
+ perPage: 100,
+ sortBy: '-publishedAt',
+ }
+);
+
+const guides = guidesData?.data || [];
+
+// Check if guide is within the last 15 days
+const isNew = (publishedAt: string) => {
+ if (!publishedAt) return false;
+ const daysDiff = Math.floor((Date.now() - new Date(publishedAt).getTime()) / (1000 * 60 * 60 * 24));
+ return daysDiff < 15;
+};
+---
+
+
+ {author.bio}
+ No guides published yet.
+ )}
+
+ {author.name}
+
+
+ {author.bio && (
+
+ Guides by {author.name}
+
+
+ {guides.length === 0 ? (
+
+ {guide.description} +
+ )} + +{guide.author.bio}
+ + {guide.author.socialLinks && ( +