diff options
Diffstat (limited to 'examples/with-markdoc/src/pages/index.astro')
-rw-r--r-- | examples/with-markdoc/src/pages/index.astro | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/with-markdoc/src/pages/index.astro b/examples/with-markdoc/src/pages/index.astro new file mode 100644 index 000000000..891b344de --- /dev/null +++ b/examples/with-markdoc/src/pages/index.astro @@ -0,0 +1,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> |