@astrojs/mdx 0.19.7 → 1.0.0-beta.1
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 +25 -30
- package/dist/index.js +27 -5
- package/dist/plugins.d.ts +1 -2
- package/dist/plugins.js +2 -4
- package/dist/rehype-meta-string.js +1 -2
- package/dist/rehype-optimize-static.js +3 -4
- package/dist/remark-images-to-component.js +1 -2
- package/dist/utils.js +1 -1
- package/package.json +24 -21
package/README.md
CHANGED
|
@@ -42,9 +42,8 @@ npm install @astrojs/mdx
|
|
|
42
42
|
|
|
43
43
|
Then, apply this integration to your `astro.config.*` file using the `integrations` property:
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```js ins={2} "mdx()"
|
|
45
|
+
```js ins={3} "mdx()"
|
|
46
|
+
// astro.config.mjs
|
|
48
47
|
import { defineConfig } from 'astro/config';
|
|
49
48
|
import mdx from '@astrojs/mdx';
|
|
50
49
|
|
|
@@ -59,14 +58,16 @@ export default defineConfig({
|
|
|
59
58
|
[VS Code](https://code.visualstudio.com/) supports Markdown by default. However, for MDX editor support, you may wish to add the following setting in your VSCode config. This ensures authoring MDX files provides a Markdown-like editor experience.
|
|
60
59
|
|
|
61
60
|
```json title=".vscode/settings.json"
|
|
62
|
-
|
|
61
|
+
{
|
|
62
|
+
"files.associations": {
|
|
63
63
|
"*.mdx": "markdown"
|
|
64
|
+
}
|
|
64
65
|
}
|
|
65
66
|
```
|
|
66
67
|
|
|
67
68
|
## Usage
|
|
68
69
|
|
|
69
|
-
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.
|
|
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.
|
|
70
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) and a [property for marking a page as a draft](https://docs.astro.build/en/guides/markdown-content/#draft-pages).
|
|
72
73
|
|
|
@@ -93,9 +94,8 @@ All [`markdown` configuration options](https://docs.astro.build/en/reference/con
|
|
|
93
94
|
There is no separate MDX configuration for [including pages marked as draft in the build](https://docs.astro.build/en/reference/configuration-reference/#markdowndrafts). This Markdown setting will be respected by both Markdown and MDX files and cannot be overridden for MDX files specifically.
|
|
94
95
|
:::
|
|
95
96
|
|
|
96
|
-
__`astro.config.mjs`__
|
|
97
|
-
|
|
98
97
|
```js
|
|
98
|
+
// astro.config.mjs
|
|
99
99
|
import { defineConfig } from 'astro/config';
|
|
100
100
|
import mdx from '@astrojs/mdx';
|
|
101
101
|
import remarkToc from 'remark-toc';
|
|
@@ -110,9 +110,9 @@ export default defineConfig({
|
|
|
110
110
|
rehypePlugins: [rehypeMinifyHtml],
|
|
111
111
|
remarkRehype: { footnoteLabel: 'Footnotes' },
|
|
112
112
|
gfm: false,
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
})
|
|
113
|
+
}),
|
|
114
|
+
],
|
|
115
|
+
});
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
:::caution
|
|
@@ -130,9 +130,8 @@ MDX will extend [your project's existing Markdown configuration](https://docs.as
|
|
|
130
130
|
|
|
131
131
|
For example, say you need to disable GitHub-Flavored Markdown and apply a different set of remark plugins for MDX files. You can apply these options like so, with `extendMarkdownConfig` enabled by default:
|
|
132
132
|
|
|
133
|
-
__`astro.config.mjs`__
|
|
134
|
-
|
|
135
133
|
```js
|
|
134
|
+
// astro.config.mjs
|
|
136
135
|
import { defineConfig } from 'astro/config';
|
|
137
136
|
import mdx from '@astrojs/mdx';
|
|
138
137
|
|
|
@@ -151,16 +150,15 @@ export default defineConfig({
|
|
|
151
150
|
remarkPlugins: [remarkPlugin2],
|
|
152
151
|
// `gfm` overridden to `false`
|
|
153
152
|
gfm: false,
|
|
154
|
-
})
|
|
155
|
-
]
|
|
153
|
+
}),
|
|
154
|
+
],
|
|
156
155
|
});
|
|
157
156
|
```
|
|
158
157
|
|
|
159
158
|
You may also need to disable `markdown` config extension in MDX. For this, set `extendMarkdownConfig` to `false`:
|
|
160
159
|
|
|
161
|
-
__`astro.config.mjs`__
|
|
162
|
-
|
|
163
160
|
```js
|
|
161
|
+
// astro.config.mjs
|
|
164
162
|
import { defineConfig } from 'astro/config';
|
|
165
163
|
import mdx from '@astrojs/mdx';
|
|
166
164
|
|
|
@@ -173,8 +171,8 @@ export default defineConfig({
|
|
|
173
171
|
// Markdown config now ignored
|
|
174
172
|
extendMarkdownConfig: false,
|
|
175
173
|
// No `remarkPlugins` applied
|
|
176
|
-
})
|
|
177
|
-
]
|
|
174
|
+
}),
|
|
175
|
+
],
|
|
178
176
|
});
|
|
179
177
|
```
|
|
180
178
|
|
|
@@ -192,9 +190,8 @@ This is an optional configuration setting to optimize the MDX output for faster
|
|
|
192
190
|
|
|
193
191
|
This is disabled by default. To enable MDX optimization, add the following to your MDX integration configuration:
|
|
194
192
|
|
|
195
|
-
__`astro.config.mjs`__
|
|
196
|
-
|
|
197
193
|
```js
|
|
194
|
+
// astro.config.mjs
|
|
198
195
|
import { defineConfig } from 'astro/config';
|
|
199
196
|
import mdx from '@astrojs/mdx';
|
|
200
197
|
|
|
@@ -202,8 +199,8 @@ export default defineConfig({
|
|
|
202
199
|
integrations: [
|
|
203
200
|
mdx({
|
|
204
201
|
optimize: true,
|
|
205
|
-
})
|
|
206
|
-
]
|
|
202
|
+
}),
|
|
203
|
+
],
|
|
207
204
|
});
|
|
208
205
|
```
|
|
209
206
|
|
|
@@ -213,7 +210,7 @@ export default defineConfig({
|
|
|
213
210
|
|
|
214
211
|
An optional property of `optimize` to prevent the MDX optimizer from handling any [custom components passed to imported MDX content via the components prop](https://docs.astro.build/en/guides/markdown-content/#custom-components-with-imported-mdx).
|
|
215
212
|
|
|
216
|
-
You will need to exclude these components from optimization as the optimizer eagerly converts content into a static string, which will break custom components that needs to be dynamically rendered.
|
|
213
|
+
You will need to exclude these components from optimization as the optimizer eagerly converts content into a static string, which will break custom components that needs to be dynamically rendered.
|
|
217
214
|
|
|
218
215
|
For example, the intended MDX output of the following is `<Heading>...</Heading>` in place of every `"<h1>...</h1>"`:
|
|
219
216
|
|
|
@@ -223,14 +220,13 @@ import { Content, components } from '../content.mdx';
|
|
|
223
220
|
import Heading from '../Heading.astro';
|
|
224
221
|
---
|
|
225
222
|
|
|
226
|
-
<Content components={{...components, h1: Heading }} />
|
|
223
|
+
<Content components={{ ...components, h1: Heading }} />
|
|
227
224
|
```
|
|
228
225
|
|
|
229
226
|
To configure optimization for this using the `customComponentNames` property, specify an array of HTML element names that should be treated as custom components:
|
|
230
227
|
|
|
231
|
-
__`astro.config.mjs`__
|
|
232
|
-
|
|
233
228
|
```js
|
|
229
|
+
// astro.config.mjs
|
|
234
230
|
import { defineConfig } from 'astro/config';
|
|
235
231
|
import mdx from '@astrojs/mdx';
|
|
236
232
|
|
|
@@ -242,8 +238,8 @@ export default defineConfig({
|
|
|
242
238
|
// These will be treated as custom components
|
|
243
239
|
customComponentNames: ['h1'],
|
|
244
240
|
},
|
|
245
|
-
})
|
|
246
|
-
]
|
|
241
|
+
}),
|
|
242
|
+
],
|
|
247
243
|
});
|
|
248
244
|
```
|
|
249
245
|
|
|
@@ -251,7 +247,7 @@ Note that if your MDX file [configures custom components using `export const com
|
|
|
251
247
|
|
|
252
248
|
## Examples
|
|
253
249
|
|
|
254
|
-
|
|
250
|
+
- The [Astro MDX starter template](https://github.com/withastro/astro/tree/latest/examples/with-mdx) shows how to use MDX files in your Astro project.
|
|
255
251
|
|
|
256
252
|
## Troubleshooting
|
|
257
253
|
|
|
@@ -268,5 +264,4 @@ This package is maintained by Astro's Core team. You're welcome to submit an iss
|
|
|
268
264
|
See [CHANGELOG.md](https://github.com/withastro/astro/tree/main/packages/integrations/mdx/CHANGELOG.md) for a history of changes to this integration.
|
|
269
265
|
|
|
270
266
|
[astro-integration]: https://docs.astro.build/en/guides/integrations-guide/
|
|
271
|
-
|
|
272
267
|
[astro-ui-frameworks]: https://docs.astro.build/en/core-concepts/framework-components/#using-framework-components
|
package/dist/index.js
CHANGED
|
@@ -8,12 +8,21 @@ import { SourceMapGenerator } from "source-map";
|
|
|
8
8
|
import { VFile } from "vfile";
|
|
9
9
|
import { getRehypePlugins, getRemarkPlugins, recmaInjectImportMetaEnvPlugin } from "./plugins.js";
|
|
10
10
|
import { getFileInfo, ignoreStringPlugins, parseFrontmatter } from "./utils.js";
|
|
11
|
+
import astroJSXRenderer from "astro/jsx/renderer.js";
|
|
11
12
|
function mdx(partialMdxOptions = {}) {
|
|
12
13
|
return {
|
|
13
14
|
name: "@astrojs/mdx",
|
|
14
15
|
hooks: {
|
|
15
16
|
"astro:config:setup": async (params) => {
|
|
16
|
-
const {
|
|
17
|
+
const {
|
|
18
|
+
updateConfig,
|
|
19
|
+
config,
|
|
20
|
+
addPageExtension,
|
|
21
|
+
addContentEntryType,
|
|
22
|
+
command,
|
|
23
|
+
addRenderer
|
|
24
|
+
} = params;
|
|
25
|
+
addRenderer(astroJSXRenderer);
|
|
17
26
|
addPageExtension(".mdx");
|
|
18
27
|
addContentEntryType({
|
|
19
28
|
extensions: [".mdx"],
|
|
@@ -42,7 +51,7 @@ function mdx(partialMdxOptions = {}) {
|
|
|
42
51
|
)
|
|
43
52
|
});
|
|
44
53
|
const mdxPluginOpts = {
|
|
45
|
-
remarkPlugins: await getRemarkPlugins(mdxOptions
|
|
54
|
+
remarkPlugins: await getRemarkPlugins(mdxOptions),
|
|
46
55
|
rehypePlugins: getRehypePlugins(mdxOptions),
|
|
47
56
|
recmaPlugins: mdxOptions.recmaPlugins,
|
|
48
57
|
remarkRehypeOptions: mdxOptions.remarkRehype,
|
|
@@ -63,11 +72,21 @@ function mdx(partialMdxOptions = {}) {
|
|
|
63
72
|
enforce: "pre",
|
|
64
73
|
configResolved(resolved) {
|
|
65
74
|
importMetaEnv = { ...importMetaEnv, ...resolved.env };
|
|
75
|
+
const jsxPluginIndex = resolved.plugins.findIndex((p) => p.name === "astro:jsx");
|
|
76
|
+
if (jsxPluginIndex !== -1) {
|
|
77
|
+
const myPluginIndex = resolved.plugins.findIndex(
|
|
78
|
+
(p) => p.name === "@mdx-js/rollup"
|
|
79
|
+
);
|
|
80
|
+
if (myPluginIndex !== -1) {
|
|
81
|
+
const myPlugin = resolved.plugins[myPluginIndex];
|
|
82
|
+
resolved.plugins.splice(myPluginIndex, 1);
|
|
83
|
+
resolved.plugins.splice(jsxPluginIndex, 0, myPlugin);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
66
86
|
},
|
|
67
87
|
// Override transform to alter code before MDX compilation
|
|
68
88
|
// ex. inject layouts
|
|
69
89
|
async transform(_, id) {
|
|
70
|
-
var _a;
|
|
71
90
|
if (!id.endsWith(".mdx"))
|
|
72
91
|
return;
|
|
73
92
|
const { fileId } = getFileInfo(id, config);
|
|
@@ -85,7 +104,7 @@ function mdx(partialMdxOptions = {}) {
|
|
|
85
104
|
...mdxPluginOpts.recmaPlugins ?? [],
|
|
86
105
|
() => recmaInjectImportMetaEnvPlugin({ importMetaEnv })
|
|
87
106
|
],
|
|
88
|
-
SourceMapGenerator:
|
|
107
|
+
SourceMapGenerator: config.vite.build?.sourcemap ? SourceMapGenerator : void 0
|
|
89
108
|
});
|
|
90
109
|
return {
|
|
91
110
|
code: escapeViteEnvReferences(String(compiled.value)),
|
|
@@ -117,15 +136,18 @@ export const url = ${JSON.stringify(fileUrl)};`;
|
|
|
117
136
|
export const file = ${JSON.stringify(fileId)};`;
|
|
118
137
|
}
|
|
119
138
|
if (!moduleExports.find(({ n }) => n === "Content")) {
|
|
139
|
+
const hasComponents = moduleExports.find(({ n }) => n === "components");
|
|
120
140
|
code = code.replace("export default MDXContent;", "");
|
|
121
141
|
code += `
|
|
122
142
|
export const Content = (props = {}) => MDXContent({
|
|
123
143
|
...props,
|
|
124
|
-
components: { Fragment, ...props.components },
|
|
144
|
+
components: { Fragment${hasComponents ? ", ...components" : ""}, ...props.components },
|
|
125
145
|
});
|
|
126
146
|
export default Content;`;
|
|
127
147
|
}
|
|
128
148
|
code += `
|
|
149
|
+
Content[Symbol.for('mdx-component')] = true`;
|
|
150
|
+
code += `
|
|
129
151
|
Content[Symbol.for('astro.needsHeadRendering')] = !Boolean(frontmatter.layout);`;
|
|
130
152
|
code += `
|
|
131
153
|
Content.moduleId = ${JSON.stringify(id)};`;
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { PluggableList } from '@mdx-js/mdx/lib/core.js';
|
|
2
|
-
import type { AstroConfig } from 'astro';
|
|
3
2
|
import type { VFile } from 'vfile';
|
|
4
3
|
import type { MdxOptions } from './index.js';
|
|
5
4
|
export declare function recmaInjectImportMetaEnvPlugin({ importMetaEnv, }: {
|
|
6
5
|
importMetaEnv: Record<string, any>;
|
|
7
6
|
}): (tree: any) => void;
|
|
8
7
|
export declare function rehypeApplyFrontmatterExport(): (tree: any, vfile: VFile) => void;
|
|
9
|
-
export declare function getRemarkPlugins(mdxOptions: MdxOptions
|
|
8
|
+
export declare function getRemarkPlugins(mdxOptions: MdxOptions): Promise<PluggableList>;
|
|
10
9
|
export declare function getRehypePlugins(mdxOptions: MdxOptions): PluggableList;
|
package/dist/plugins.js
CHANGED
|
@@ -78,10 +78,8 @@ function rehypeApplyFrontmatterExport() {
|
|
|
78
78
|
tree.children = exportNodes.concat(tree.children);
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
async function getRemarkPlugins(mdxOptions
|
|
82
|
-
let remarkPlugins = [
|
|
83
|
-
...config.experimental.assets ? [remarkCollectImages, remarkImageToComponent] : []
|
|
84
|
-
];
|
|
81
|
+
async function getRemarkPlugins(mdxOptions) {
|
|
82
|
+
let remarkPlugins = [remarkCollectImages, remarkImageToComponent];
|
|
85
83
|
if (!isPerformanceBenchmark) {
|
|
86
84
|
if (mdxOptions.gfm) {
|
|
87
85
|
remarkPlugins.push(remarkGfm);
|
|
@@ -2,8 +2,7 @@ import { visit } from "unist-util-visit";
|
|
|
2
2
|
function rehypeMetaString() {
|
|
3
3
|
return function(tree) {
|
|
4
4
|
visit(tree, (node) => {
|
|
5
|
-
|
|
6
|
-
if (node.type === "element" && node.tagName === "code" && ((_a = node.data) == null ? void 0 : _a.meta)) {
|
|
5
|
+
if (node.type === "element" && node.tagName === "code" && node.data?.meta) {
|
|
7
6
|
node.properties ??= {};
|
|
8
7
|
node.properties.metastring = node.data.meta;
|
|
9
8
|
}
|
|
@@ -3,14 +3,13 @@ import { toHtml } from "hast-util-to-html";
|
|
|
3
3
|
const exportConstComponentsRe = /export\s+const\s+components\s*=/;
|
|
4
4
|
function rehypeOptimizeStatic(options) {
|
|
5
5
|
return (tree) => {
|
|
6
|
-
|
|
7
|
-
const customComponentNames = new Set(options == null ? void 0 : options.customComponentNames);
|
|
6
|
+
const customComponentNames = new Set(options?.customComponentNames);
|
|
8
7
|
for (const child of tree.children) {
|
|
9
8
|
if (child.type === "mdxjsEsm" && exportConstComponentsRe.test(child.value)) {
|
|
10
|
-
const objectPropertyNodes =
|
|
9
|
+
const objectPropertyNodes = child.data.estree.body[0]?.declarations?.[0]?.init?.properties;
|
|
11
10
|
if (objectPropertyNodes) {
|
|
12
11
|
for (const objectPropertyNode of objectPropertyNodes) {
|
|
13
|
-
const componentName =
|
|
12
|
+
const componentName = objectPropertyNode.key?.name ?? objectPropertyNode.key?.value;
|
|
14
13
|
if (componentName) {
|
|
15
14
|
customComponentNames.add(componentName);
|
|
16
15
|
}
|
|
@@ -7,8 +7,7 @@ function remarkImageToComponent() {
|
|
|
7
7
|
const importsStatements = [];
|
|
8
8
|
const importedImages = /* @__PURE__ */ new Map();
|
|
9
9
|
visit(tree, "image", (node, index, parent) => {
|
|
10
|
-
|
|
11
|
-
if ((_a = file.data.imagePaths) == null ? void 0 : _a.has(node.url)) {
|
|
10
|
+
if (file.data.imagePaths?.has(node.url)) {
|
|
12
11
|
let importName = importedImages.get(node.url);
|
|
13
12
|
if (!importName) {
|
|
14
13
|
importName = `__${importedImages.size}_${node.url.replace(/\W/g, "_")}__`;
|
package/dist/utils.js
CHANGED
|
@@ -18,7 +18,7 @@ function getFileInfo(id, config) {
|
|
|
18
18
|
const isPage = fileId.includes("/pages/");
|
|
19
19
|
if (isPage) {
|
|
20
20
|
fileUrl = fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.mdx$/, "");
|
|
21
|
-
} else if (url
|
|
21
|
+
} else if (url?.pathname.startsWith(config.root.pathname)) {
|
|
22
22
|
fileUrl = url.pathname.slice(config.root.pathname.length);
|
|
23
23
|
} else {
|
|
24
24
|
fileUrl = fileId;
|
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": "0.
|
|
4
|
+
"version": "1.0.0-beta.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -27,13 +27,11 @@
|
|
|
27
27
|
"template"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@astrojs/markdown-remark": "^2.2.1",
|
|
31
|
-
"@astrojs/prism": "^2.1.2",
|
|
32
30
|
"@mdx-js/mdx": "^2.3.0",
|
|
33
|
-
"acorn": "^8.
|
|
34
|
-
"es-module-lexer": "^1.
|
|
35
|
-
"estree-util-visit": "^1.2.
|
|
36
|
-
"github-slugger": "^1.
|
|
31
|
+
"acorn": "^8.9.0",
|
|
32
|
+
"es-module-lexer": "^1.3.0",
|
|
33
|
+
"estree-util-visit": "^1.2.1",
|
|
34
|
+
"github-slugger": "^1.5.0",
|
|
37
35
|
"gray-matter": "^4.0.3",
|
|
38
36
|
"hast-util-to-html": "^8.0.4",
|
|
39
37
|
"kleur": "^4.1.4",
|
|
@@ -43,35 +41,40 @@
|
|
|
43
41
|
"remark-smartypants": "^2.0.0",
|
|
44
42
|
"shiki": "^0.14.1",
|
|
45
43
|
"source-map": "^0.7.4",
|
|
46
|
-
"unist-util-visit": "^4.1.
|
|
47
|
-
"vfile": "^5.3.
|
|
44
|
+
"unist-util-visit": "^4.1.2",
|
|
45
|
+
"vfile": "^5.3.7",
|
|
46
|
+
"@astrojs/markdown-remark": "3.0.0-beta.0",
|
|
47
|
+
"@astrojs/prism": "3.0.0-beta.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"astro": "^3.0.0-beta.3"
|
|
48
51
|
},
|
|
49
52
|
"devDependencies": {
|
|
50
|
-
"@types/chai": "^4.3.
|
|
51
|
-
"@types/estree": "^1.0.
|
|
53
|
+
"@types/chai": "^4.3.5",
|
|
54
|
+
"@types/estree": "^1.0.1",
|
|
52
55
|
"@types/github-slugger": "^1.3.0",
|
|
53
|
-
"@types/mdast": "^3.0.
|
|
56
|
+
"@types/mdast": "^3.0.11",
|
|
54
57
|
"@types/mocha": "^9.1.1",
|
|
55
58
|
"@types/yargs-parser": "^21.0.0",
|
|
56
|
-
"chai": "^4.3.
|
|
57
|
-
"cheerio": "
|
|
58
|
-
"linkedom": "^0.14.
|
|
59
|
-
"mdast-util-mdx": "^2.0.
|
|
60
|
-
"mdast-util-to-string": "^3.
|
|
59
|
+
"chai": "^4.3.7",
|
|
60
|
+
"cheerio": "1.0.0-rc.12",
|
|
61
|
+
"linkedom": "^0.14.26",
|
|
62
|
+
"mdast-util-mdx": "^2.0.1",
|
|
63
|
+
"mdast-util-to-string": "^3.2.0",
|
|
61
64
|
"mocha": "^9.2.2",
|
|
62
65
|
"reading-time": "^1.5.0",
|
|
63
66
|
"rehype-mathjax": "^4.0.2",
|
|
64
67
|
"rehype-pretty-code": "^0.4.0",
|
|
65
68
|
"remark-math": "^5.1.1",
|
|
66
69
|
"remark-rehype": "^10.1.0",
|
|
67
|
-
"remark-shiki-twoslash": "^3.1.
|
|
70
|
+
"remark-shiki-twoslash": "^3.1.3",
|
|
68
71
|
"remark-toc": "^8.0.1",
|
|
69
|
-
"vite": "^4.
|
|
70
|
-
"astro": "
|
|
72
|
+
"vite": "^4.4.6",
|
|
73
|
+
"astro": "3.0.0-beta.3",
|
|
71
74
|
"astro-scripts": "0.0.14"
|
|
72
75
|
},
|
|
73
76
|
"engines": {
|
|
74
|
-
"node": ">=
|
|
77
|
+
"node": ">=18.14.1"
|
|
75
78
|
},
|
|
76
79
|
"scripts": {
|
|
77
80
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
|