--- import 'katex/dist/katex.min.css'; import { getCollection } from 'astro:content'; import { buildNavTree } from '../lib/nav.mjs'; import { COMMIT, BUILT_AT } from '../lib/build-info.mjs'; import NavTree from '../components/NavTree.astro'; import Toc from '../components/Toc.astro'; interface Props { title: string; description?: string; headings?: { depth: number; slug: string; text: string }[]; // which /og/.png card this page advertises; synthetic listing // pages fall back to the site card ogSlug?: string; } const { title, description, headings = [], ogSlug = 'index' } = Astro.props; const isHome = Astro.url.pathname === '/'; const entries = await getCollection('garden'); const navTree = buildNavTree(entries); const noteCount = entries.length; const showToc = headings.filter((h) => h.depth <= 3).length >= 2; const ogImage = new URL(`/og/${ogSlug}.png`, Astro.site); const pageUrl = new URL(Astro.url.pathname, Astro.site); --- {title}{isHome ? '' : ' // Wesley Ray'} {description && } {description && }
{ isHome && ( ) }

Wesley Ray · blog · git · resume

{ COMMIT && (

built {BUILT_AT} ET ·{' '} {COMMIT} {' '} · {noteCount} notes

) }
{ showToc && ( ) }