fix: pass content to mdc Layout

This commit is contained in:
Nate Moore 2021-07-09 11:20:00 -05:00
parent a68272641d
commit 5ec4947a82

View file

@ -93,10 +93,10 @@ export async function convertMdcToAstroSource(contents: string, { filename }: {
import { Markdown } from 'astro/components';
${components ? `import { ${Array.from(componentNames.values()).join(', ')} } from '${components}';` : ''}
${layout ? `import Layout from '${layout}';` : 'const Layout = Fragment;'}
const frontmatter = ${stringifiedSetupContext};
const content = ${stringifiedSetupContext};
---
<Layout>
<Layout content={content}>
<Markdown>
${markdownContent}
</Markdown>