Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 2x 2x 2x | import path from 'node:path';
import { extractLeadingHero, renderMarkdown } from '@/lib/markdown';
// The homepage has its own layout: the full hero (title + tagline) bleeds edge
// to edge, then the content in a centered column with no in-page nav, page
// actions or pager. Markdown is trusted in-repo content rendered at build time.
export default async function Home() {
const { html } = await renderMarkdown(path.join(process.cwd(), 'content/home.md'));
const { hero, rest } = extractLeadingHero(html);
return (
<>
{hero && <div className="home__hero" dangerouslySetInnerHTML={{ __html: hero }} />}
<div className="home__body">
<article className="content-blocks" dangerouslySetInnerHTML={{ __html: rest }} />
</div>
</>
);
}
|