--- import Base from '../../layouts/Base.astro'; import { fetchAllFragments, fetchFragment, blobUrl, DID } from '../../lib/atproto'; import { renderMarkdown } from '../../lib/markdown'; import type { Fragment } from '../../lib/types'; export async function getStaticPaths() { const fragments = await fetchAllFragments(); return fragments.map(f => ({ params: { id: String(f.id) }, props: { fragment: f } })); } const { fragment } = Astro.props as { fragment: Fragment }; const html = fragment.content ? await renderMarkdown(fragment.content) : ''; const imageCount = fragment.images?.length ?? 0; ---

{fragment.title}

#{fragment.id} · {fragment.type} ·
{fragment.type === 'shot' && fragment.images && ( )} {fragment.type === 'shot' && html && (
)} {fragment.type !== 'shot' && html && (
)}