forked from
quillmatiq.com/augment
Fork of Chiri for Astro for my blog
1---
2import { getEntry } from 'astro:content'
3import { render } from 'astro:content'
4
5const aboutEntry = await getEntry('about', 'about')
6// Check if there is actual content (excluding comments)
7const hasContent = aboutEntry?.body ? aboutEntry.body.replace(/<!--[\s\S]*?-->/g, '').trim().length > 0 : false
8const { Content } = hasContent && aboutEntry ? await render(aboutEntry) : { Content: null }
9---
10
11{
12 hasContent && Content && (
13 <div class="about prose">
14 <Content />
15 </div>
16 )
17}
18
19<style>
20 .about:not(:empty) {
21 margin-bottom: 1.25rem;
22 }
23</style>