@astrojs/mdx 0.7.0 → 0.8.2
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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +23 -0
- package/README.md +59 -63
- package/dist/astro-data-utils.d.ts +1 -1
- package/dist/astro-data-utils.js +5 -24
- package/dist/index.d.ts +0 -7
- package/dist/index.js +3 -9
- package/package.json +4 -5
- package/src/astro-data-utils.ts +6 -28
- package/src/index.ts +3 -14
- package/test/fixtures/mdx-component/dist/index.html +3 -0
- package/test/fixtures/mdx-component/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-custom-frontmatter-name/dist/glob.json +1 -0
- package/test/fixtures/mdx-custom-frontmatter-name/dist/index.html +1 -0
- package/test/fixtures/mdx-custom-frontmatter-name/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-frontmatter/dist/glob.json +1 -0
- package/test/fixtures/mdx-frontmatter/dist/index.html +17 -0
- package/test/fixtures/mdx-frontmatter/dist/with-headings/index.html +18 -0
- package/test/fixtures/mdx-frontmatter/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-frontmatter-injection/node_modules/.bin/astro +2 -2
- package/test/fixtures/mdx-get-headings/dist/pages.json +1 -0
- package/test/fixtures/mdx-get-headings/dist/test/index.html +5 -0
- package/test/fixtures/mdx-get-headings/dist/test-with-jsx-expressions/index.html +3 -0
- package/test/fixtures/mdx-get-headings/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-get-static-paths/dist/one/index.html +13 -0
- package/test/fixtures/mdx-page/dist/index.html +1 -0
- package/test/fixtures/mdx-page/node_modules/.bin/astro +2 -2
- package/test/fixtures/mdx-page/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-plus-react/dist/client.0d691cb3.js +32 -0
- package/test/fixtures/mdx-plus-react/dist/index.html +8 -0
- package/test/fixtures/mdx-plus-react/node_modules/.bin/astro +2 -2
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/@astrojs_react_client__js.js +95 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/@astrojs_react_client__js.js.map +7 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/_metadata.json +47 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-CDYRCHBX.js +7480 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-CDYRCHBX.js.map +7 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-RRXZ3AUC.js +326 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-RRXZ3AUC.js.map +7 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-TWLJ45QX.js +27 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-TWLJ45QX.js.map +7 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react-dom.js +12 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react-dom.js.map +7 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react.js +11 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react.js.map +7 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-dev-runtime.js +41 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-dev-runtime.js.map +7 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-runtime.js +62 -0
- package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-runtime.js.map +7 -0
- package/test/fixtures/mdx-rehype-plugins/dist/reading-time.json +1 -0
- package/test/fixtures/mdx-rehype-plugins/dist/space-ipsum/index.html +13 -0
- package/test/fixtures/mdx-rehype-plugins/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-remark-plugins/dist/with-gfm/index.html +2 -0
- package/test/fixtures/mdx-remark-plugins/dist/with-toc/index.html +22 -0
- package/test/fixtures/mdx-remark-plugins/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-syntax-hightlighting/dist/index.html +6 -0
- package/test/fixtures/mdx-syntax-hightlighting/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/mdx-url-export/dist/pages.json +1 -0
- package/test/fixtures/mdx-url-export/dist/test-1/index.html +1 -0
- package/test/fixtures/mdx-url-export/dist/test-2/index.html +1 -0
- package/test/fixtures/mdx-url-export/dist/with-url-override/index.html +1 -0
- package/test/fixtures/mdx-url-export/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/fixtures/node_modules/.vite/deps_temp/package.json +1 -0
- package/test/mdx-frontmatter.test.js +0 -17
- package/test/fixtures/mdx-custom-frontmatter-name/src/pages/glob.json.js +0 -9
- package/test/fixtures/mdx-custom-frontmatter-name/src/pages/index.mdx +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><h1 id="im-a-test-with-a-url-override">I’m a test with a url override!</h1>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -56,21 +56,4 @@ describe('MDX frontmatter', () => {
|
|
|
56
56
|
expect(headingSlugs).to.contain('section-1');
|
|
57
57
|
expect(headingSlugs).to.contain('section-2');
|
|
58
58
|
});
|
|
59
|
-
|
|
60
|
-
it('extracts frontmatter to "customFrontmatter" export when configured', async () => {
|
|
61
|
-
const customFixture = await loadFixture({
|
|
62
|
-
root: new URL('./fixtures/mdx-custom-frontmatter-name/', import.meta.url),
|
|
63
|
-
integrations: [
|
|
64
|
-
mdx({
|
|
65
|
-
frontmatterOptions: {
|
|
66
|
-
name: 'customFrontmatter',
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
],
|
|
70
|
-
});
|
|
71
|
-
await customFixture.build();
|
|
72
|
-
|
|
73
|
-
const { titles } = JSON.parse(await customFixture.readFile('/glob.json'));
|
|
74
|
-
expect(titles).to.include('Using YAML frontmatter');
|
|
75
|
-
});
|
|
76
59
|
});
|