--- import Base from '../../layouts/Base.astro'; import Sidebar from '../../components/blog/Sidebar.astro'; import { getDb } from '../../lib/db'; import { getPublishedBySlug } from '../../lib/posts'; import { getUsernameById } from '../../lib/auth'; export const prerender = false; const post = getPublishedBySlug(getDb(), Astro.params.slug!); if (!post) return new Response(null, { status: 404 }); const fmt = new Intl.DateTimeFormat('it-IT', { dateStyle: 'long' }); const author = post.author_id ? getUsernameById(getDb(), post.author_id) : null; const byline = author ?? 'Staff InsanityLab'; ---
{post.cover && }

{post.published_at && fmt.format(new Date(post.published_at))} · {post.category} · di {byline}

{post.title}