28 lines · 720 B · Text
RawDownload
---export const prerender = true;import { getCollection, render } from "astro:content";import BlogPostLayout from "../../layouts/BlogPostLayout.astro"; export async function getStaticPaths() {  const posts = await getCollection("blog", ({ data }) => !data.draft);  return posts.map((post) => ({    params: { slug: post.id },    props: { post },  }));} const { post } = Astro.props;const { Content } = await render(post);--- <BlogPostLayout  title={post.data.title}  description={post.data.description}  date={post.data.date}  author={post.data.author}  authorHandle={post.data.authorHandle}  authorRole={post.data.authorRole}  authorAvatar={post.data.authorAvatar}>  <Content /></BlogPostLayout>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t