@astrojs/mdx 1.0.0-rc.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/package.json +15 -16
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ export default defineConfig({
|
|
|
69
69
|
|
|
70
70
|
With the Astro MDX integration, you can [add MDX pages to your project](https://docs.astro.build/en/guides/markdown-content/#markdown-and-mdx-pages) by adding `.mdx` files within your `src/pages/` directory. You can also [import `.mdx` files](https://docs.astro.build/en/guides/markdown-content/#importing-markdown) into `.astro` files.
|
|
71
71
|
|
|
72
|
-
Astro's MDX integration adds extra features to standard MDX, including Markdown-style frontmatter. This allows you to use most of Astro's built-in Markdown features like a [special frontmatter `layout` property](https://docs.astro.build/en/guides/markdown-content/#frontmatter-layout)
|
|
72
|
+
Astro's MDX integration adds extra features to standard MDX, including Markdown-style frontmatter. This allows you to use most of Astro's built-in Markdown features like a [special frontmatter `layout` property](https://docs.astro.build/en/guides/markdown-content/#frontmatter-layout).
|
|
73
73
|
|
|
74
74
|
See how MDX works in Astro with examples in our [Markdown & MDX guide](https://docs.astro.build/en/guides/markdown-content/).
|
|
75
75
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { markdownConfigDefaults } from "@astrojs/markdown-remark";
|
|
2
2
|
import { toRemarkInitializeAstroData } from "@astrojs/markdown-remark/dist/internal.js";
|
|
3
3
|
import { compile as mdxCompile } from "@mdx-js/mdx";
|
|
4
|
+
import astroJSXRenderer from "astro/jsx/renderer.js";
|
|
4
5
|
import { parse as parseESM } from "es-module-lexer";
|
|
5
6
|
import fs from "node:fs/promises";
|
|
6
7
|
import { fileURLToPath } from "node:url";
|
|
@@ -8,7 +9,6 @@ import { SourceMapGenerator } from "source-map";
|
|
|
8
9
|
import { VFile } from "vfile";
|
|
9
10
|
import { getRehypePlugins, getRemarkPlugins, recmaInjectImportMetaEnvPlugin } from "./plugins.js";
|
|
10
11
|
import { getFileInfo, ignoreStringPlugins, parseFrontmatter } from "./utils.js";
|
|
11
|
-
import astroJSXRenderer from "astro/jsx/renderer.js";
|
|
12
12
|
function mdx(partialMdxOptions = {}) {
|
|
13
13
|
return {
|
|
14
14
|
name: "@astrojs/mdx",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/mdx",
|
|
3
3
|
"description": "Add support for MDX pages in your Astro site",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@mdx-js/mdx": "^2.3.0",
|
|
31
|
-
"acorn": "^8.
|
|
31
|
+
"acorn": "^8.10.0",
|
|
32
32
|
"es-module-lexer": "^1.3.0",
|
|
33
33
|
"estree-util-visit": "^1.2.1",
|
|
34
|
-
"github-slugger": "^
|
|
34
|
+
"github-slugger": "^2.0.0",
|
|
35
35
|
"gray-matter": "^4.0.3",
|
|
36
36
|
"hast-util-to-html": "^8.0.4",
|
|
37
37
|
"kleur": "^4.1.4",
|
|
@@ -39,38 +39,37 @@
|
|
|
39
39
|
"remark-frontmatter": "^4.0.1",
|
|
40
40
|
"remark-gfm": "^3.0.1",
|
|
41
41
|
"remark-smartypants": "^2.0.0",
|
|
42
|
-
"shiki": "^0.14.
|
|
42
|
+
"shiki": "^0.14.3",
|
|
43
43
|
"source-map": "^0.7.4",
|
|
44
44
|
"unist-util-visit": "^4.1.2",
|
|
45
45
|
"vfile": "^5.3.7",
|
|
46
|
-
"@astrojs/markdown-remark": "3.0.0
|
|
47
|
-
"@astrojs/prism": "3.0.0
|
|
46
|
+
"@astrojs/markdown-remark": "3.0.0",
|
|
47
|
+
"@astrojs/prism": "3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"astro": "^3.0.0
|
|
50
|
+
"astro": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/chai": "^4.3.5",
|
|
54
54
|
"@types/estree": "^1.0.1",
|
|
55
|
-
"@types/
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/mocha": "^9.1.1",
|
|
55
|
+
"@types/mdast": "^3.0.12",
|
|
56
|
+
"@types/mocha": "^10.0.1",
|
|
58
57
|
"@types/yargs-parser": "^21.0.0",
|
|
59
58
|
"chai": "^4.3.7",
|
|
60
59
|
"cheerio": "1.0.0-rc.12",
|
|
61
|
-
"linkedom": "^0.
|
|
60
|
+
"linkedom": "^0.15.1",
|
|
62
61
|
"mdast-util-mdx": "^2.0.1",
|
|
63
62
|
"mdast-util-to-string": "^3.2.0",
|
|
64
|
-
"mocha": "^
|
|
63
|
+
"mocha": "^10.2.0",
|
|
65
64
|
"reading-time": "^1.5.0",
|
|
66
|
-
"rehype-mathjax": "^4.0.
|
|
67
|
-
"rehype-pretty-code": "^0.
|
|
65
|
+
"rehype-mathjax": "^4.0.3",
|
|
66
|
+
"rehype-pretty-code": "^0.10.0",
|
|
68
67
|
"remark-math": "^5.1.1",
|
|
69
68
|
"remark-rehype": "^10.1.0",
|
|
70
69
|
"remark-shiki-twoslash": "^3.1.3",
|
|
71
70
|
"remark-toc": "^8.0.1",
|
|
72
|
-
"vite": "^4.4.
|
|
73
|
-
"astro": "3.0.0
|
|
71
|
+
"vite": "^4.4.9",
|
|
72
|
+
"astro": "3.0.0",
|
|
74
73
|
"astro-scripts": "0.0.14"
|
|
75
74
|
},
|
|
76
75
|
"engines": {
|