diff options
Diffstat (limited to 'examples/with-markdoc/src/pages/index.astro')
-rw-r--r-- | examples/with-markdoc/src/pages/index.astro | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/examples/with-markdoc/src/pages/index.astro b/examples/with-markdoc/src/pages/index.astro index 01412cce1..7efcbeda8 100644 --- a/examples/with-markdoc/src/pages/index.astro +++ b/examples/with-markdoc/src/pages/index.astro @@ -1,18 +1,25 @@ --- import { getEntryBySlug } from 'astro:content'; -import DocsContent from '../components/DocsContent.astro'; import Layout from '../layouts/Layout.astro'; const intro = await getEntryBySlug('docs', 'intro'); +const { Content } = await intro.render(); --- <Layout title={intro.data.title}> <main> <h1>{intro.data.title}</h1> - <!-- `DocsContent` is a thin wrapper around --> - <!-- the `Content` component provided by Content Collections, --> - <!-- with added configuration for components. --> - <!-- This allows you to share global components wherever you render your Markdoc. --> - <DocsContent entry={intro} /> + <Content variables={{ revealSecret: true }} /> </main> </Layout> + +<style is:global> + table { + margin-block: 2rem; + margin-inline: auto; + } + table td { + padding-block: 0.3rem; + padding-inline: 0.5rem; + } +</style> |