summaryrefslogtreecommitdiff
path: root/examples/with-markdoc/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'examples/with-markdoc/src/pages')
-rw-r--r--examples/with-markdoc/src/pages/index.astro18
1 files changed, 18 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..01412cce1
--- /dev/null
+++ b/examples/with-markdoc/src/pages/index.astro
@@ -0,0 +1,18 @@
+---
+import { getEntryBySlug } from 'astro:content';
+import DocsContent from '../components/DocsContent.astro';
+import Layout from '../layouts/Layout.astro';
+
+const intro = await getEntryBySlug('docs', 'intro');
+---
+
+<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} />
+ </main>
+</Layout>