- Remove elaborate UI components (CustomCursor, SearchDialog, GridOverlay, ThemeToggle, ThemePreferenceDialog, Navigation, Footer, section components, blog components) - Strip portfolio and section content - Reduce global.css to basic typography and prose - Simplify BaseHead and BlogCard components - Update content config to only blog collection - Update README and CLAUDE.md with minimal guidance - Adjust routes to basic pages (index, blog, contact, 404) - Delete unused files (dev/injection.md, dev/open-source-vfx-pipeline.mdx, etc.)
27 lines
631 B
Plaintext
27 lines
631 B
Plaintext
---
|
|
import { type CollectionEntry, getCollection, render } from 'astro:content';
|
|
import BlogPost from '../../layouts/BlogPost.astro';
|
|
import { calculateReadingTime } from '../../utils/reading-time';
|
|
|
|
export async function getStaticPaths() {
|
|
const posts = await getCollection('blog');
|
|
|
|
return posts.map((post) => ({
|
|
params: { slug: post.id },
|
|
props: { post },
|
|
}));
|
|
}
|
|
|
|
interface Props {
|
|
post: CollectionEntry<'blog'>;
|
|
}
|
|
|
|
const { post } = Astro.props;
|
|
const { Content } = await render(post);
|
|
const readTimeText = calculateReadingTime(post.body);
|
|
---
|
|
|
|
<BlogPost {...post.data} readTime={readTimeText}>
|
|
<Content />
|
|
</BlogPost>
|