-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
129 additions
and
1 deletion.
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
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 mdx from '@astrojs/mdx'; | ||
import { defineConfig } from 'astro/config'; | ||
|
||
export default defineConfig({ | ||
integrations: [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
7 changes: 7 additions & 0 deletions
7
packages/astro/test/fixtures/core-image-svg/src/content/blog/basic.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,7 @@ | ||
--- | ||
title: Basic Test | ||
description: Check that SVG Components work | ||
--- | ||
import Astro from '~/assets/astro.svg'; | ||
|
||
<Astro /> |
14 changes: 14 additions & 0 deletions
14
packages/astro/test/fixtures/core-image-svg/src/content/blog/props.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,14 @@ | ||
--- | ||
title: Props Test | ||
description: Check that SVG Components work | ||
--- | ||
import Github from '~/assets/github.svg'; | ||
|
||
<Github | ||
size="48" | ||
title="Find out more on GitHub!" | ||
style={{color: 'red'}} | ||
class="icon" | ||
data-icon="github" | ||
aria-description="Some description" | ||
/> |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/core-image-svg/src/content/blog/sprite.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,8 @@ | ||
--- | ||
title: Kitchen Sink Test | ||
description: Check that SVG Components work | ||
--- | ||
import Astro from '~/assets/astro.svg'; | ||
|
||
<Astro /> | ||
<Astro /> |
10 changes: 10 additions & 0 deletions
10
packages/astro/test/fixtures/core-image-svg/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,10 @@ | ||
import { defineCollection, z } from 'astro:content'; | ||
|
||
const blog = defineCollection({ | ||
schema: z.object({ | ||
title: z.string(), | ||
description: z.string().max(60, 'For SEO purposes, keep descriptions short!'), | ||
}), | ||
}); | ||
|
||
export const collections = { blog }; |
22 changes: 22 additions & 0 deletions
22
packages/astro/test/fixtures/core-image-svg/src/pages/blog/[...slug].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,22 @@ | ||
--- | ||
import { getCollection } from 'astro:content'; | ||
export async function getStaticPaths() { | ||
const blogEntries = await getCollection('blog'); | ||
return blogEntries.map(entry => ({ | ||
params: { slug: entry.slug }, props: { entry }, | ||
})); | ||
} | ||
const { entry } = Astro.props; | ||
const { Content } = await entry.render(); | ||
--- | ||
<html> | ||
<head> | ||
<title>{entry.data.title}</title> | ||
<meta name="description" content={entry.data.description} /> | ||
</head> | ||
<body> | ||
<Content /> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.