Something went wrong. Try again.
Fork of Chiri for Astro for my blog forked from quillmatiq.com/augment
Something went wrong. Try again.
123456789101112131415161718192021222324---import { getEntry } from 'astro:content'import { render } from 'astro:content'
const aboutEntry = await getEntry('about', 'about')// Check if there is actual content (excluding comments)const hasContent = aboutEntry?.body ? aboutEntry.body.replace(/<!--[\s\S]*?-->/g, '').trim().length > 0 : falseconst { Content } = hasContent && aboutEntry ? await render(aboutEntry) : { Content: null }---
{ hasContent && Content && ( <div class="about prose"> <Content /> </div> )}
<style> .about:not(:empty) { margin-bottom: 1.25rem; }</style>