-
-
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.
Only apply head propagation in trees that need it (#6363)
- Loading branch information
Showing
6 changed files
with
51 additions
and
4 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 cases where head is injected in body when using Astro.slots.render() |
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
10 changes: 10 additions & 0 deletions
10
packages/astro/test/fixtures/head-injection/src/components/with-slot-render2/inner.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
--- | ||
|
||
<p>View link tag position</p> | ||
|
||
<style> | ||
p { | ||
background: red; | ||
} | ||
</style> |
5 changes: 5 additions & 0 deletions
5
...ro/test/fixtures/head-injection/src/components/with-slot-render2/slots-render-outer.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
const content = await Astro.slots.render('default') | ||
--- | ||
|
||
<Fragment set:html={content} /> |
19 changes: 19 additions & 0 deletions
19
packages/astro/test/fixtures/head-injection/src/pages/with-slot-render2.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
import Inner from '../components/with-slot-render2/inner.astro' | ||
import SlotsRenderOuter from '../components/with-slot-render2/slots-render-outer.astro' | ||
--- | ||
|
||
<html lang='en'> | ||
<head> | ||
<meta charset='utf-8' /> | ||
<link rel='icon' type='image/svg+xml' href='/favicon.svg' /> | ||
<meta name='viewport' content='width=device-width' /> | ||
<meta name='generator' content={Astro.generator} /> | ||
<title>Astro</title> | ||
</head> | ||
<body> | ||
<SlotsRenderOuter> | ||
<Inner /> | ||
</SlotsRenderOuter> | ||
</body> | ||
</html> |
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