Skip to content

Commit da10c10

Browse files
setup research section and listing page
1 parent f960580 commit da10c10

6 files changed

Lines changed: 171 additions & 2 deletions

File tree

.astro/content.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ declare module 'astro:content' {
147147
rendered?: RenderedContent;
148148
filePath?: string;
149149
}>;
150+
"research": Record<string, {
151+
id: string;
152+
body?: string;
153+
collection: "research";
154+
data: InferEntrySchema<"research">;
155+
rendered?: RenderedContent;
156+
filePath?: string;
157+
}>;
150158

151159
};
152160

@@ -177,6 +185,6 @@ declare module 'astro:content' {
177185
LiveContentConfig['collections'][C]['loader']
178186
>;
179187

180-
export type ContentConfig = typeof import("../src/content.config.js");
188+
export type ContentConfig = typeof import("./../src/content.config.js");
181189
export type LiveContentConfig = never;
182190
}

src/content.config.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,25 @@ const blog = defineCollection({
3232
})
3333
});
3434

35+
const research = defineCollection({
36+
loader: glob({
37+
pattern: "**/*.{md,mdx}",
38+
base: "./src/content/research"
39+
}),
40+
schema: z.object({
41+
title: z.string(),
42+
description: z.string(),
43+
author: z.string(),
44+
date: z.date(),
45+
tags: z.array(z.string()).default([]),
46+
category: z.string(),
47+
featured: z.boolean().default(false),
48+
image: z.string().optional()
49+
})
50+
});
51+
3552
export const collections = {
3653
articles,
37-
blog
54+
blog,
55+
research
3856
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "Future Trends Report"
3+
description: "Market growth and AI adoption trends."
4+
author: "Recursive Zero"
5+
date: 2025-08-17
6+
tags:
7+
- ai
8+
- future
9+
category: "AI & Technology"
10+
featured: false
11+
---
12+
13+
## Introduction
14+
15+
Placeholder content.
16+
17+
## Market Growth
18+
19+
Placeholder content.
20+
21+
## AI Adoption
22+
23+
Placeholder content.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "Hidden Cost of Manual Processes"
3+
description: "Understanding inefficiencies caused by manual workflows."
4+
author: "Recursive Zero"
5+
date: 2025-08-16
6+
tags:
7+
- research
8+
- operations
9+
category: "Case Studies"
10+
featured: false
11+
---
12+
13+
## Introduction
14+
15+
Placeholder content.
16+
17+
## Time Loss
18+
19+
Placeholder content.
20+
21+
## Industry Statistics
22+
23+
Placeholder content.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "Why We Built This Product"
3+
description: "Research behind our product vision."
4+
author: "Recursive Zero"
5+
date: 2025-08-15
6+
tags:
7+
- research
8+
- product
9+
category: "Product Vision"
10+
featured: true
11+
---
12+
13+
## Introduction
14+
15+
Placeholder content.
16+
17+
## Industry Problem
18+
19+
Placeholder content.
20+
21+
## Research Findings
22+
23+
Placeholder content.
24+
25+
## Our Vision
26+
27+
Placeholder content.

src/pages/research/index.astro

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
import BlogCard from "@/components/BlogCard.astro";
3+
import BaseLayout from "@/layouts/BaseLayout";
4+
5+
import { getCollection } from "astro:content";
6+
7+
const posts = await getCollection("research");
8+
9+
/* ALL UNIQUE TAGS */
10+
const allTags = [...new Set(posts.flatMap((post) => post.data.tags || []))];
11+
---
12+
13+
<BaseLayout meta={{ title: "Research & White Papers" }}>
14+
<main class="bg-background text-foreground">
15+
<!-- HERO -->
16+
<section class="mx-auto max-w-7xl px-6 py-20 lg:px-10">
17+
<div class="text-center">
18+
<!-- LABEL -->
19+
<p class="mb-4 text-sm font-semibold uppercase tracking-[0.25em] text-blue-600">Research Library</p>
20+
21+
<!-- HEADING -->
22+
<h1 class="text-foreground text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl">Research & White Papers</h1>
23+
24+
<!-- DESCRIPTION -->
25+
<p class="text-foreground/70 mx-auto mt-6 max-w-2xl text-lg leading-8">
26+
Explore industry research, market analysis, case studies, AI trends, sustainability insights and product vision papers.
27+
</p>
28+
29+
<!-- TAG PREVIEW -->
30+
<div class="mt-10 flex flex-wrap items-center justify-center gap-3">
31+
{
32+
allTags.slice(0, 3).map((tag) => (
33+
<a
34+
href={`/blogs/tag/${tag}`}
35+
class="rounded-full border border-cyan-500/20 bg-brandBlue/20 px-4 py-2 text-sm font-medium text-blue-700 transition duration-300 hover:bg-brandBlue hover:text-white"
36+
>
37+
#{tag}
38+
</a>
39+
))
40+
}
41+
42+
<!-- MORE TAGS BUTTON -->
43+
<a
44+
href="/blogs/tag"
45+
class="border-foreground/10 text-foreground rounded-full border px-5 py-2 text-sm font-semibold transition duration-300 hover:border-cyan-500 hover:text-blue-600"
46+
>
47+
More Tags →
48+
</a>
49+
</div>
50+
</div>
51+
52+
<!-- BLOG GRID -->
53+
<div class="mt-16 grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-3">
54+
{
55+
posts.map((post) => (
56+
<BlogCard
57+
url={`/research/${post.id}`}
58+
title={post.data.title}
59+
description={post.data.description}
60+
image={post.data.image}
61+
author={post.data.author}
62+
date={post.data.date.toLocaleDateString()}
63+
tags={post.data.tags}
64+
/>
65+
))
66+
}
67+
</div>
68+
</section>
69+
</main>
70+
</BaseLayout>

0 commit comments

Comments
 (0)