-
-
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.
fix(markdoc & mdx): Proxy crimes (#10278)
* fix(markdoc & mdx): Proxy cimes * chore: changeset
- Loading branch information
1 parent
87a3d51
commit a548a3a
Showing
16 changed files
with
108 additions
and
5 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,6 @@ | ||
--- | ||
"@astrojs/markdoc": patch | ||
"astro": patch | ||
--- | ||
|
||
Fixes original images sometimes being kept / deleted when they shouldn't in both MDX and Markdoc |
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
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-deletion/astro.config.mjs
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 @@ | ||
import mdx from '@astrojs/mdx'; | ||
import markdoc from '@astrojs/markdoc'; | ||
import { defineConfig } from 'astro/config'; | ||
|
||
export default defineConfig({ | ||
integrations: [mdx(), markdoc()], | ||
}); |
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
Binary file added
BIN
+36.4 KB
packages/astro/test/fixtures/core-image-deletion/src/assets/markdocStillExists.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.3 KB
packages/astro/test/fixtures/core-image-deletion/src/assets/mdxDontExist.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
packages/astro/test/fixtures/core-image-deletion/src/content/blog/markdoc.mdoc
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: "Markdoc" | ||
--- | ||
|
||
There is an image below | ||
|
||
![A penguin](../../assets/markdocStillExists.jpg) |
7 changes: 7 additions & 0 deletions
7
packages/astro/test/fixtures/core-image-deletion/src/content/blog/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,7 @@ | ||
--- | ||
title: "MDX" | ||
--- | ||
|
||
There is an image below | ||
|
||
![A penguin](../../assets/mdxDontExist.jpg) |
12 changes: 12 additions & 0 deletions
12
packages/astro/test/fixtures/core-image-deletion/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,12 @@ | ||
import { defineCollection, z } from 'astro:content'; | ||
|
||
const blog = defineCollection({ | ||
type: 'content', | ||
schema: z.object({ | ||
title: z.string(), | ||
}) | ||
}); | ||
|
||
export const collections = { | ||
blog: blog, | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/astro/test/fixtures/core-image-deletion/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 type { GetStaticPaths } from "astro"; | ||
import { getCollection } from "astro:content"; | ||
export const getStaticPaths = (async () => { | ||
const blog = await getCollection("blog"); | ||
return blog.map((post) => ({ | ||
params: { | ||
slug: post.slug, | ||
}, | ||
props: { | ||
post | ||
} | ||
})); | ||
}) satisfies GetStaticPaths; | ||
const { post } = Astro.props; | ||
const { Content } = await post.render(); | ||
--- | ||
|
||
<Content /> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.