diff --git a/examples/with-markdoc/src/content/blog/test.mdoc b/examples/with-markdoc/src/content/blog/test.mdoc index 2b9868202..4b1c27546 100644 --- a/examples/with-markdoc/src/content/blog/test.mdoc +++ b/examples/with-markdoc/src/content/blog/test.mdoc @@ -3,3 +3,32 @@ title: Example! --- # Hey there + +Look at this table! Built-in to Markdoc, neat. + +{% table %} +* Heading 1 +* Heading 2 +--- +* Row 1 Cell 1 +* Row 1 Cell 2 +--- +* Row 2 Cell 1 +* Row 2 cell 2 +{% /table %} + +{% if $shouldMarquee %} +{% mq direction="right" %} +Im a marquee! +{% /mq %} +{% /if %} + +{% link href=$href %}Link{% /link %} + +```js +const testing = true; +function further() { + console.log('still highlighted!') +} +``` + diff --git a/examples/with-markdoc/src/pages/index.astro b/examples/with-markdoc/src/pages/index.astro index 10fbfedb5..4e7f63365 100644 --- a/examples/with-markdoc/src/pages/index.astro +++ b/examples/with-markdoc/src/pages/index.astro @@ -1,14 +1,13 @@ --- import { Markdoc } from '@astrojs/markdoc'; -import RenderMarkdoc from '../renderer/RenderMarkdoc.astro'; - -import { getTransformed } from '../components/test.mdoc'; import { Code } from 'astro/components'; import Marquee from '../components/Marquee.astro'; import { getEntryBySlug } from 'astro:content'; +import RedP from '../components/RedP.astro'; -const mdocEntry = await getEntryBySlug('blog', 'test'); -console.log(mdocEntry); +const testEntry = await getEntryBySlug('blog', 'test'); +console.log(testEntry); +const { Content } = await testEntry.render(); --- @@ -22,10 +21,10 @@ console.log(mdocEntry);