-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly handle head propagation in content layer deferred rend…
…ering (#12014) * chore: run MDX tests against content layer * Handle head propagation in deferred rendering * Add changeset * Update test
- Loading branch information
Showing
11 changed files
with
41 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fixes an issue where component styles were not correctly included in rendered MDX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/integrations/mdx/test/fixtures/css-head-mdx/src/components/UsingMdx.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
import { getEntryBySlug } from 'astro:content'; | ||
import { getEntry, render } from 'astro:content'; | ||
const launchWeek = await getEntryBySlug('blog', 'using-mdx'); | ||
const { Content } = await launchWeek.render(); | ||
const launchWeek = await getEntry('blog', 'using-mdx'); | ||
const { Content } = await render(launchWeek); | ||
--- | ||
|
||
<Content /> |
18 changes: 18 additions & 0 deletions
18
packages/integrations/mdx/test/fixtures/css-head-mdx/src/content/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { defineCollection } from "astro:content"; | ||
import { glob } from "astro/loaders" | ||
|
||
const posts = defineCollection({ | ||
loader: glob({ | ||
pattern: "*.mdx", | ||
base: "src/data/posts", | ||
}) | ||
}); | ||
|
||
const blog = defineCollection({ | ||
loader: glob({ | ||
pattern: "*.mdx", | ||
base: "src/data/blog", | ||
}) | ||
}); | ||
|
||
export const collections = { posts, blog }; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/posts/[post].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters