Skip to content

Commit

Permalink
fix: undefined remarkPluginFrontmatter after calling render method (#…
Browse files Browse the repository at this point in the history
…5927)

* Update vite-plugin-content-assets.ts

* Add changeset for #5927

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Co-authored-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
izmttk and andersk committed Jan 26, 2023
1 parent 1c7eef3 commit 322e059
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lazy-buttons-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix undefined `remarkPluginFrontmatter` after calling `render` method
2 changes: 1 addition & 1 deletion packages/astro/src/content/vite-plugin-content-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function astroDelayedAssetPlugin({ mode }: { mode: string }): Plugin {
if (isDelayedAsset(id)) {
const basePath = id.split('?')[0];
const code = `
export { Content, getHeadings } from ${JSON.stringify(basePath)};
export { Content, getHeadings, frontmatter } from ${JSON.stringify(basePath)};
export const collectedLinks = ${JSON.stringify(LINKS_PLACEHOLDER)};
export const collectedStyles = ${JSON.stringify(STYLES_PLACEHOLDER)};
`;
Expand Down

0 comments on commit 322e059

Please sign in to comment.