main
dependabot/npm_and_yarn/astro-7.4.0
dependabot/npm_and_yarn/astrojs/mdx-7.0.8
dependabot/npm_and_yarn/astrojs/sitemap-3.7.4
dependabot/npm_and_yarn/katex-0.19.0
dependabot/npm_and_yarn/prettier-3.9.10
dependabot/npm_and_yarn/sharp-0.35.5
dependabot/npm_and_yarn/tsx-4.23.15
dependabot/npm_and_yarn/typescript-eslint-8.71.2
dependabot/npm_and_yarn/typescript-eslint/parser-8.71.2
development
main
| 1 | --- |
| 2 | import { getEntry } from 'astro:content' |
| 3 | import { render } from 'astro:content' |
| 4 | |
| 5 | const aboutEntry = await getEntry('about', 'about') |
| 6 | // Check if there is actual content (excluding comments) |
| 7 | const hasContent = aboutEntry?.body |
| 8 | ? aboutEntry.body.replace(/<!--[\s\S]*?-->/g, '').trim().length > 0 |
| 9 | : false |
| 10 | const { Content } = hasContent && aboutEntry ? await render(aboutEntry) : { Content: null } |
| 11 | --- |
| 12 | |
| 13 | { |
| 14 | hasContent && Content && ( |
| 15 | <div class="about prose mb-5 font-sans text-m text-food-brown"> |
| 16 | <Content /> |
| 17 | </div> |
| 18 | ) |
| 19 | } |
| 20 | |
| 21 | <style> |
| 22 | .about:not(:empty) { |
| 23 | /* margin-bottom: 1.25rem; */ |
| 24 | } |
| 25 | </style> |