aboutsummaryrefslogtreecommitdiff
path: root/examples/with-markdoc/src/pages/index.astro
blob: 891b344de8cb874e979a1477d2fa42a86962d4fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
import { getEntry } from 'astro:content';
import Layout from '../layouts/Layout.astro';

const intro = await getEntry('docs', 'intro');
if (!intro) {
	return Astro.redirect('/404');
}
const { Content } = await intro.render();
---

<Layout title={intro.data.title}>
	<main>
		<h1>{intro.data.title}</h1>
		<Content />
	</main>
</Layout>

<style is:global>
	table {
		margin-block: 2rem;
		margin-inline: auto;
	}
	table td {
		padding-block: 0.3rem;
		padding-inline: 0.5rem;
	}
</style>