diff --git a/.astro/content.d.ts b/.astro/content.d.ts index 6f3dfe3..8379d03 100644 --- a/.astro/content.d.ts +++ b/.astro/content.d.ts @@ -147,6 +147,14 @@ declare module 'astro:content' { rendered?: RenderedContent; filePath?: string; }>; +"research": Record; + rendered?: RenderedContent; + filePath?: string; +}>; }; @@ -177,6 +185,6 @@ declare module 'astro:content' { LiveContentConfig['collections'][C]['loader'] >; - export type ContentConfig = typeof import("../src/content.config.js"); + export type ContentConfig = typeof import("./../src/content.config.js"); export type LiveContentConfig = never; } diff --git a/src/content.config.ts b/src/content.config.ts index 4ee4ed7..1cbd2ef 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -32,7 +32,25 @@ const blog = defineCollection({ }) }); +const research = defineCollection({ + loader: glob({ + pattern: "**/*.{md,mdx}", + base: "./src/content/research" + }), + schema: z.object({ + title: z.string(), + description: z.string(), + author: z.string(), + date: z.date(), + tags: z.array(z.string()).default([]), + category: z.string(), + featured: z.boolean().default(false), + image: z.string().optional() + }) +}); + export const collections = { articles, - blog + blog, + research }; diff --git a/src/content/research/future-trends-report.md b/src/content/research/future-trends-report.md new file mode 100644 index 0000000..ea40d6e --- /dev/null +++ b/src/content/research/future-trends-report.md @@ -0,0 +1,23 @@ +--- +title: "Future Trends Report" +description: "Market growth and AI adoption trends." +author: "Recursive Zero" +date: 2025-08-17 +tags: + - ai + - future +category: "AI & Technology" +featured: true +--- + +## Introduction + +Placeholder content. + +## Market Growth + +Placeholder content. + +## AI Adoption + +Placeholder content. \ No newline at end of file diff --git a/src/content/research/hidden-cost-of-manual-processes.md b/src/content/research/hidden-cost-of-manual-processes.md new file mode 100644 index 0000000..9d7ebae --- /dev/null +++ b/src/content/research/hidden-cost-of-manual-processes.md @@ -0,0 +1,23 @@ +--- +title: "Hidden Cost of Manual Processes" +description: "Understanding inefficiencies caused by manual workflows." +author: "Recursive Zero" +date: 2025-08-16 +tags: + - research + - operations +category: "Case Studies" +featured: false +--- + +## Introduction + +Placeholder content. + +## Time Loss + +Placeholder content. + +## Industry Statistics + +Placeholder content. \ No newline at end of file diff --git a/src/content/research/why-we-built-this-product.md b/src/content/research/why-we-built-this-product.md new file mode 100644 index 0000000..8997745 --- /dev/null +++ b/src/content/research/why-we-built-this-product.md @@ -0,0 +1,27 @@ +--- +title: "Why We Built This Product" +description: "Research behind our product vision." +author: "Recursive Zero" +date: 2025-08-15 +tags: + - research + - product +category: "Product Vision" +featured: false +--- + +## Introduction + +Placeholder content. + +## Industry Problem + +Placeholder content. + +## Research Findings + +Placeholder content. + +## Our Vision + +Placeholder content. \ No newline at end of file diff --git a/src/data/navLinks.json b/src/data/navLinks.json index 039b42a..55467f7 100644 --- a/src/data/navLinks.json +++ b/src/data/navLinks.json @@ -23,5 +23,6 @@ "name": "Work", "href": "/work", "isActive": true - } + }, + { "name": "Research", "href": "/research", "isActive": true } ] diff --git a/src/pages/research/[slug].astro b/src/pages/research/[slug].astro new file mode 100644 index 0000000..486009e --- /dev/null +++ b/src/pages/research/[slug].astro @@ -0,0 +1,135 @@ +--- +import CalendarIcon from "@/assets/icons/calendar.svg"; +import ProfileIcon from "@/assets/icons/profile.svg"; +import MarkdownContent from "@/components/MarkdownContent.astro"; +import BaseLayout from "@/layouts/BaseLayout"; +import BlogCard from "@/components/BlogCard.astro"; +import { type CollectionEntry, getCollection, render } from "astro:content"; + +export const prerender = true; + +export async function getStaticPaths() { + const posts = await getCollection("research"); + + return posts.map((blog) => ({ + params: { slug: blog.id }, + props: blog + })); +} + +type Props = CollectionEntry<"research">; + +const blog = Astro.props; + +// BLOG NOT FOUND REDIRECT +if (!Astro.props?.id) { + return Astro.redirect("/research"); +} + +const { Content } = await render(blog); + +const { title, description, date, author, image, tags } = blog.data; +const allResearch = await getCollection("research"); + +const relatedPosts = allResearch + .filter((post) => post.id !== blog.id) + .slice(0, 3); +const readingTime = Math.ceil((blog.body?.split(/\s+/).length || 0) / 200); + +if (!Content) { + throw new Error(`Content could not be rendered for blog: ${blog.id}`); +} +--- + + +
+

{title}

+ {description &&

{description}

} +
+ +
+ { + author && ( + + + + + + {author} + + ) + } + + { + date && ( + + + + + + + + ) + } + {readingTime && ⏱️ {readingTime} min read} +
+ + + { + tags?.length > 0 && ( +
+ {tags.map((tag: string) => ( + + #{tag} + + ))} +
+ ) + } +
+ + +
+
+ +
+ +
+
+
+
+ { + relatedPosts.length > 0 && ( +
+

+ Related Research Articles +

+ +
+ { + relatedPosts.map((post) => ( + + )) + } +
+
+ ) +} + +
+
diff --git a/src/pages/research/index.astro b/src/pages/research/index.astro new file mode 100644 index 0000000..3ce08e0 --- /dev/null +++ b/src/pages/research/index.astro @@ -0,0 +1,124 @@ +--- +import BlogCard from "@/components/BlogCard.astro"; +import BaseLayout from "@/layouts/BaseLayout"; + +import { getCollection } from "astro:content"; + +const posts = await getCollection("research"); + +// const categories = [ +// ...new Set(posts.map((post) => post.data.category).filter(Boolean)) +// ]; + +const selectedCategory = Astro.url.searchParams.get("category"); + +const filteredPosts = selectedCategory + ? posts.filter((post) => post.data.category === selectedCategory) + : posts; + +const featuredPost = !selectedCategory + ? posts.find((post) => post.data.featured) + : null; + +const gridPosts = selectedCategory + ? filteredPosts + : filteredPosts.filter((post) => !post.data.featured); +--- + + +
+
+ +
+

+ Research Library +

+ +

+ Research & White Papers +

+ +

+ Explore industry research, market analysis, case studies, AI trends, + sustainability insights and product vision papers. +

+
+ + + + + + { + featuredPost && ( +
+

Featured Research

+ + +
+ ) + } + + +
+
+ { + gridPosts.map((post) => ( + + )) + } +
+ + { + gridPosts.length === 0 && ( +

+ No research articles found in this category. +

+ ) + } +
+
+
+
\ No newline at end of file