339529fc82
* Revert "revert: markdoc asset bleed (#7178)"
This reverts commit 57e65d247f
.
* fix: missing result param on `renderUniqueStylesheet`
* test: bundled styles (fails!)
* fix: use `type: 'external'` for links
* fix: split Astro components from markdoc config
* test: style bleed (it fails...)
* chore: remove unused util
* fix: revert entry change
* Stop traversing the graph when you encounter a propagated asset
* chore: cleanup unused `entry` prop
* refactor: add isPropagatedAssetsMod check
* chore: remove unused import
* chore: changeset
* Normalize path using vite
* Update packages/integrations/markdoc/src/index.ts
Co-authored-by: Ben Holmes <hey@bholmes.dev>
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
18 lines
459 B
Text
18 lines
459 B
Text
---
|
|
//! astro-head-inject
|
|
import type { Config } from '@markdoc/markdoc';
|
|
import Markdoc from '@markdoc/markdoc';
|
|
import { ComponentNode, createTreeNode } from './TreeNode.js';
|
|
|
|
type Props = {
|
|
config: Config;
|
|
stringifiedAst: string;
|
|
};
|
|
|
|
const { stringifiedAst, config } = Astro.props as Props;
|
|
|
|
const ast = Markdoc.Ast.fromJSON(stringifiedAst);
|
|
const content = Markdoc.transform(ast, config);
|
|
---
|
|
|
|
<ComponentNode treeNode={await createTreeNode(content)} />
|