diff options
author | 2023-06-27 15:05:17 -0400 | |
---|---|---|
committer | 2023-06-27 15:05:17 -0400 | |
commit | fb7af551148f5ca6c4f98a4e556c8948c5690919 (patch) | |
tree | 7c65c758ead74ee129bc958279a6cf02e931cb4d /packages/integrations/markdoc/test | |
parent | 8821f0504845b351247ce6c1e2ae581a71806209 (diff) | |
download | astro-fb7af551148f5ca6c4f98a4e556c8948c5690919.tar.gz astro-fb7af551148f5ca6c4f98a4e556c8948c5690919.tar.zst astro-fb7af551148f5ca6c4f98a4e556c8948c5690919.zip |
feat: New Markdoc `render` API (#7468)
* feat: URL support for markdoc tags
* refactor: move to separate file
* feat: support URL for markdoc nodes
* feat: support `extends` with URL
* chore: changeset
* fix: bad AstroMarkdocConfig type
* fix: experimentalAssetsConfig missing
* fix: correctly merge runtime config
* chore: formatting
* deps: astro internal helpers
* feat: component() util, new astro bundling
* chore: remove now unused code
* todo: missing hint
* fix: import.meta.url type error
* wip: test nested collection calls
* feat: resolve paths from project root
* refactor: move getHeadings() to runtime module
* fix: broken collectHeadings
* test: update fixture configs
* chore: remove suggestions. Out of scope!
* fix: throw outside esbuild
* refactor: shuffle imports around
* Revert "wip: test nested collection calls"
This reverts commit 9354b3cf9222fd65b974b0cddf4e7a95ab3cd2b2.
* chore: revert back to mjs config
* chore: add jsdocs to stringified helpers
* fix: restore updated changeset
---------
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
Diffstat (limited to 'packages/integrations/markdoc/test')
3 files changed, 8 insertions, 13 deletions
diff --git a/packages/integrations/markdoc/test/fixtures/headings-custom/markdoc.config.mjs b/packages/integrations/markdoc/test/fixtures/headings-custom/markdoc.config.mjs index 32fcf61e2..f1bea70e8 100644 --- a/packages/integrations/markdoc/test/fixtures/headings-custom/markdoc.config.mjs +++ b/packages/integrations/markdoc/test/fixtures/headings-custom/markdoc.config.mjs @@ -1,11 +1,10 @@ -import { defineMarkdocConfig, nodes } from '@astrojs/markdoc/config'; -import Heading from './src/components/Heading.astro'; +import { defineMarkdocConfig, component, nodes } from '@astrojs/markdoc/config'; export default defineMarkdocConfig({ nodes: { heading: { ...nodes.heading, - render: Heading, + render: component('./src/components/Heading.astro'), } } }); diff --git a/packages/integrations/markdoc/test/fixtures/propagated-assets/markdoc.config.mjs b/packages/integrations/markdoc/test/fixtures/propagated-assets/markdoc.config.mjs index 5389eb99d..368d30ebd 100644 --- a/packages/integrations/markdoc/test/fixtures/propagated-assets/markdoc.config.mjs +++ b/packages/integrations/markdoc/test/fixtures/propagated-assets/markdoc.config.mjs @@ -1,18 +1,16 @@ -import Aside from './src/components/Aside.astro'; -import LogHello from './src/components/LogHello.astro'; -import { defineMarkdocConfig } from '@astrojs/markdoc/config'; +import { defineMarkdocConfig, component } from '@astrojs/markdoc/config'; export default defineMarkdocConfig({ tags: { aside: { - render: Aside, + render: component('./src/components/Aside.astro'), attributes: { type: { type: String }, title: { type: String }, } }, logHello: { - render: LogHello, + render: component('./src/components/LogHello.astro'), } }, }) diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts b/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts index ada03f5f4..b7845d182 100644 --- a/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts @@ -1,11 +1,9 @@ -import Code from './src/components/Code.astro'; -import CustomMarquee from './src/components/CustomMarquee.astro'; -import { defineMarkdocConfig } from '@astrojs/markdoc/config'; +import { defineMarkdocConfig, component } from '@astrojs/markdoc/config'; export default defineMarkdocConfig({ nodes: { fence: { - render: Code, + render: component('./src/components/Code.astro'), attributes: { language: { type: String }, content: { type: String }, @@ -14,7 +12,7 @@ export default defineMarkdocConfig({ }, tags: { mq: { - render: CustomMarquee, + render: component('./src/components/CustomMarquee.astro'), attributes: { direction: { type: String, |