--- import Layout from '../../layouts/Layout.astro'; import { getCollection, getEntry, render } from 'astro:content'; import { type CollectionEntry } from 'astro:content'; import { dateFormat } from '../../utils/date'; import { urlfrag } from '../../utils/path'; import { titleCase } from '../../utils/strings'; interface Props { note: CollectionEntry<'notes'>; } export async function getStaticPaths() { const notes = await getCollection('notes'); return notes.map((note: CollectionEntry<'notes'>) => ({ params: { id: note.id.replace(/-/, '/') }, props: { note }, })); } const base = import.meta.env.BASE_URL; const { note } = Astro.props; const { Content } = await render(note); const meta = `{ "@context": "https://schema.org", "@type": "BlogPosting", "headline": "${note.data.title}", "image": "${urlfrag(base, note.data.post_image)}", "author": {"@type": "Person", "name": "Benjamin A. Shelton"}, "publisher": {"@type": "Organization", "name": "Just Us"}, "datePublished": "${note.data.date.toISOString()}", "dateModified": "${note.data.date.toISOString()}" }`; --- {meta &&

{note.data.title}

{note.data.sub_heading}

    {note.data.tags?.filter((tag: string) => (tag != 'notes')).map((tag: string) => (
  • {titleCase(tag)}
  • ))}