-
-
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.
Add test for direct usage of nested component
- Loading branch information
Showing
6 changed files
with
54 additions
and
0 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
10 changes: 10 additions & 0 deletions
10
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
import { getEntryBySlug } from 'astro:content'; | ||
const launchWeek = await getEntryBySlug('blog', 'using-mdx'); | ||
const { Content } = await launchWeek.render(); | ||
debugger; | ||
--- | ||
|
||
<Content /> |
6 changes: 6 additions & 0 deletions
6
packages/integrations/mdx/test/fixtures/css-head-mdx/src/components/WithHoistedScripts.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,6 @@ | ||
--- | ||
--- | ||
|
||
<script> | ||
console.log('hoisted') | ||
</script> |
3 changes: 3 additions & 0 deletions
3
packages/integrations/mdx/test/fixtures/css-head-mdx/src/content/blog/_styles.css
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,3 @@ | ||
body { | ||
color: red !important; | ||
} |
6 changes: 6 additions & 0 deletions
6
...ages/integrations/mdx/test/fixtures/css-head-mdx/src/content/blog/using-mdx.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import './_styles.css'; | ||
import WithHoistedScripts from '../../components/WithHoistedScripts.astro'; | ||
|
||
# Using mdx | ||
|
||
<WithHoistedScripts /> |
17 changes: 17 additions & 0 deletions
17
packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/DirectContentUsage.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,17 @@ | ||
--- | ||
import UsingMdx from '../components/UsingMdx.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> | ||
<h1>Astro</h1> | ||
<UsingMdx /> | ||
</body> | ||
</html> |