@studiocms/mdx 0.1.0-beta.16 → 0.1.0-beta.18
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/dist/index.js +37 -29
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,36 +15,44 @@ function studiocmsMDX(options) {
|
|
|
15
15
|
return definePlugin({
|
|
16
16
|
identifier: packageIdentifier,
|
|
17
17
|
name: "StudioCMS MDX",
|
|
18
|
-
studiocmsMinimumVersion: "0.1.0-beta.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
18
|
+
studiocmsMinimumVersion: "0.1.0-beta.17",
|
|
19
|
+
hooks: {
|
|
20
|
+
"studiocms:astro:config": ({ addIntegrations }) => {
|
|
21
|
+
addIntegrations({
|
|
22
|
+
name: packageIdentifier,
|
|
23
|
+
hooks: {
|
|
24
|
+
"astro:config:setup": (params) => {
|
|
25
|
+
addVirtualImports(params, {
|
|
26
|
+
name: packageIdentifier,
|
|
27
|
+
imports: {
|
|
28
|
+
"studiocms:mdx/renderer": `
|
|
29
|
+
import { renderMDX as _render } from '${internalRenderer}';
|
|
30
|
+
|
|
31
|
+
export const renderMDX = _render;
|
|
32
|
+
export default renderMDX;
|
|
33
|
+
`
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
"astro:config:done": () => {
|
|
38
|
+
shared.mdxConfig = resolvedOptions;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
"studiocms:config:setup": ({ setRendering }) => {
|
|
44
|
+
setRendering({
|
|
45
|
+
pageTypes: [
|
|
46
|
+
// Define the MDX page type
|
|
47
|
+
{
|
|
48
|
+
identifier: "studiocms/mdx",
|
|
49
|
+
label: "MDX",
|
|
50
|
+
pageContentComponent: "studiocms/markdown",
|
|
51
|
+
// Fallback to the default content editor for now, might build a custom MDX editor in the future
|
|
52
|
+
rendererComponent: renderer
|
|
42
53
|
}
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
"astro:config:done": () => {
|
|
46
|
-
shared.mdxConfig = resolvedOptions;
|
|
47
|
-
}
|
|
54
|
+
]
|
|
55
|
+
});
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiocms/mdx",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.18",
|
|
4
4
|
"description": "Add MDX Support to your StudioCMS project with ease!",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Matthiesen | Jacob Jenkins | Paul Valladares",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"astro": "^5.7.1",
|
|
75
75
|
"vite": "^6.2.6",
|
|
76
|
-
"studiocms": "0.1.0-beta.
|
|
76
|
+
"studiocms": "0.1.0-beta.18"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "buildkit build 'src/**/*.{ts,astro,css,json,png}'",
|