@astrojs/mdx 0.8.2 → 0.10.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.
Files changed (80) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/CHANGELOG.md +30 -0
  3. package/README.md +20 -3
  4. package/dist/astro-data-utils.js +37 -0
  5. package/dist/index.js +28 -24
  6. package/dist/remark-shiki.d.ts +3 -0
  7. package/dist/remark-shiki.js +58 -0
  8. package/package.json +4 -4
  9. package/src/astro-data-utils.ts +38 -0
  10. package/src/index.ts +30 -25
  11. package/src/remark-shiki.ts +85 -0
  12. package/test/fixtures/mdx-component/src/pages/glob.astro +11 -0
  13. package/test/fixtures/mdx-frontmatter/src/layouts/Base.astro +7 -1
  14. package/test/fixtures/mdx-frontmatter-injection/node_modules/.bin/astro +2 -2
  15. package/test/fixtures/mdx-frontmatter-injection/src/layouts/Base.astro +17 -0
  16. package/test/fixtures/mdx-frontmatter-injection/src/pages/page-1.mdx +4 -0
  17. package/test/fixtures/mdx-frontmatter-injection/src/pages/page-2.mdx +4 -0
  18. package/test/fixtures/mdx-namespace/astro.config.mjs +6 -0
  19. package/test/fixtures/mdx-namespace/node_modules/.bin/astro +17 -0
  20. package/test/fixtures/mdx-namespace/package.json +8 -0
  21. package/test/fixtures/mdx-namespace/src/components/Component.jsx +6 -0
  22. package/test/fixtures/mdx-namespace/src/pages/object.mdx +3 -0
  23. package/test/fixtures/mdx-namespace/src/pages/star.mdx +3 -0
  24. package/test/fixtures/mdx-page/node_modules/.bin/astro +2 -2
  25. package/test/fixtures/mdx-plus-react/node_modules/.bin/astro +2 -2
  26. package/test/mdx-component.test.js +54 -2
  27. package/test/mdx-frontmatter-injection.test.js +12 -0
  28. package/test/mdx-frontmatter.test.js +14 -0
  29. package/test/mdx-namespace.test.js +83 -0
  30. package/test/mdx-syntax-highlighting.test.js +26 -2
  31. package/test/fixtures/mdx-component/dist/index.html +0 -3
  32. package/test/fixtures/mdx-component/node_modules/.vite/deps_temp/package.json +0 -1
  33. package/test/fixtures/mdx-custom-frontmatter-name/dist/glob.json +0 -1
  34. package/test/fixtures/mdx-custom-frontmatter-name/dist/index.html +0 -1
  35. package/test/fixtures/mdx-custom-frontmatter-name/node_modules/.vite/deps_temp/package.json +0 -1
  36. package/test/fixtures/mdx-frontmatter/dist/glob.json +0 -1
  37. package/test/fixtures/mdx-frontmatter/dist/index.html +0 -17
  38. package/test/fixtures/mdx-frontmatter/dist/with-headings/index.html +0 -18
  39. package/test/fixtures/mdx-frontmatter/node_modules/.vite/deps_temp/package.json +0 -1
  40. package/test/fixtures/mdx-get-headings/dist/pages.json +0 -1
  41. package/test/fixtures/mdx-get-headings/dist/test/index.html +0 -5
  42. package/test/fixtures/mdx-get-headings/dist/test-with-jsx-expressions/index.html +0 -3
  43. package/test/fixtures/mdx-get-headings/node_modules/.vite/deps_temp/package.json +0 -1
  44. package/test/fixtures/mdx-get-static-paths/dist/one/index.html +0 -13
  45. package/test/fixtures/mdx-page/dist/index.html +0 -1
  46. package/test/fixtures/mdx-page/node_modules/.vite/deps_temp/package.json +0 -1
  47. package/test/fixtures/mdx-plus-react/dist/client.0d691cb3.js +0 -32
  48. package/test/fixtures/mdx-plus-react/dist/index.html +0 -8
  49. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/@astrojs_react_client__js.js +0 -95
  50. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/@astrojs_react_client__js.js.map +0 -7
  51. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/_metadata.json +0 -47
  52. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-CDYRCHBX.js +0 -7480
  53. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-CDYRCHBX.js.map +0 -7
  54. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-RRXZ3AUC.js +0 -326
  55. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-RRXZ3AUC.js.map +0 -7
  56. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-TWLJ45QX.js +0 -27
  57. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/chunk-TWLJ45QX.js.map +0 -7
  58. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/package.json +0 -1
  59. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react-dom.js +0 -12
  60. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react-dom.js.map +0 -7
  61. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react.js +0 -11
  62. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react.js.map +0 -7
  63. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-dev-runtime.js +0 -41
  64. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-dev-runtime.js.map +0 -7
  65. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-runtime.js +0 -62
  66. package/test/fixtures/mdx-plus-react/node_modules/.vite/deps_temp/react_jsx-runtime.js.map +0 -7
  67. package/test/fixtures/mdx-rehype-plugins/dist/reading-time.json +0 -1
  68. package/test/fixtures/mdx-rehype-plugins/dist/space-ipsum/index.html +0 -13
  69. package/test/fixtures/mdx-rehype-plugins/node_modules/.vite/deps_temp/package.json +0 -1
  70. package/test/fixtures/mdx-remark-plugins/dist/with-gfm/index.html +0 -2
  71. package/test/fixtures/mdx-remark-plugins/dist/with-toc/index.html +0 -22
  72. package/test/fixtures/mdx-remark-plugins/node_modules/.vite/deps_temp/package.json +0 -1
  73. package/test/fixtures/mdx-syntax-hightlighting/dist/index.html +0 -6
  74. package/test/fixtures/mdx-syntax-hightlighting/node_modules/.vite/deps_temp/package.json +0 -1
  75. package/test/fixtures/mdx-url-export/dist/pages.json +0 -1
  76. package/test/fixtures/mdx-url-export/dist/test-1/index.html +0 -1
  77. package/test/fixtures/mdx-url-export/dist/test-2/index.html +0 -1
  78. package/test/fixtures/mdx-url-export/dist/with-url-override/index.html +0 -1
  79. package/test/fixtures/mdx-url-export/node_modules/.vite/deps_temp/package.json +0 -1
  80. package/test/fixtures/node_modules/.vite/deps_temp/package.json +0 -1
@@ -0,0 +1,17 @@
1
+ ---
2
+ const defaults = { title: 'Frontmatter not passed to layout!' }
3
+ const { frontmatter = defaults, content = defaults } = Astro.props;
4
+ ---
5
+
6
+ <!DOCTYPE html>
7
+ <html lang="en">
8
+ <head>
9
+ <meta charset="UTF-8">
10
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
11
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
12
+ <title>{frontmatter.title}</title>
13
+ </head>
14
+ <body>
15
+ <slot />
16
+ </body>
17
+ </html>
@@ -1,3 +1,7 @@
1
+ ---
2
+ layout: '../layouts/Base.astro'
3
+ ---
4
+
1
5
  # Page 1
2
6
 
3
7
  Look at that!
@@ -1,3 +1,7 @@
1
+ ---
2
+ layout: '../layouts/Base.astro'
3
+ ---
4
+
1
5
  # Page 2
2
6
 
3
7
  ## Table of contents
@@ -0,0 +1,6 @@
1
+ import mdx from '@astrojs/mdx';
2
+ import react from '@astrojs/react';
3
+
4
+ export default {
5
+ integrations: [react(), mdx()]
6
+ }
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/astro/astro/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/home/runner/work/astro/astro/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../../../astro/astro.js" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../../../astro/astro.js" "$@"
17
+ fi
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@test/mdx-namespace",
3
+ "dependencies": {
4
+ "astro": "workspace:*",
5
+ "@astrojs/mdx": "workspace:*",
6
+ "@astrojs/react": "workspace:*"
7
+ }
8
+ }
@@ -0,0 +1,6 @@
1
+ const Component = () => {
2
+ return <p id="component">Hello world</p>;
3
+ };
4
+ export const ns = {
5
+ Component
6
+ }
@@ -0,0 +1,3 @@
1
+ import * as mod from '../components/Component.jsx';
2
+
3
+ <mod.ns.Component client:load />
@@ -0,0 +1,3 @@
1
+ import { ns } from '../components/Component.jsx';
2
+
3
+ <ns.Component client:load />
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/matthew/dev/astro/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/astro/astro/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="$NODE_PATH:/Users/matthew/dev/astro/node_modules/.pnpm/node_modules"
11
+ export NODE_PATH="$NODE_PATH:/home/runner/work/astro/astro/node_modules/.pnpm/node_modules"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../../../../../../../astro/astro.js" "$@"
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/matthew/dev/astro/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/astro/astro/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="$NODE_PATH:/Users/matthew/dev/astro/node_modules/.pnpm/node_modules"
11
+ export NODE_PATH="$NODE_PATH:/home/runner/work/astro/astro/node_modules/.pnpm/node_modules"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../../../../../../../astro/astro.js" "$@"
@@ -19,7 +19,7 @@ describe('MDX Component', () => {
19
19
  await fixture.build();
20
20
  });
21
21
 
22
- it('works', async () => {
22
+ it('supports top-level imports', async () => {
23
23
  const html = await fixture.readFile('/index.html');
24
24
  const { document } = parseHTML(html);
25
25
 
@@ -29,6 +29,28 @@ describe('MDX Component', () => {
29
29
  expect(h1.textContent).to.equal('Hello component!');
30
30
  expect(foo.textContent).to.equal('bar');
31
31
  });
32
+
33
+ it('supports glob imports - <Component.default />', async () => {
34
+ const html = await fixture.readFile('/glob/index.html');
35
+ const { document } = parseHTML(html);
36
+
37
+ const h1 = document.querySelector('[data-default-export] h1');
38
+ const foo = document.querySelector('[data-default-export] #foo');
39
+
40
+ expect(h1.textContent).to.equal('Hello component!');
41
+ expect(foo.textContent).to.equal('bar');
42
+ });
43
+
44
+ it('supports glob imports - <Content />', async () => {
45
+ const html = await fixture.readFile('/glob/index.html');
46
+ const { document } = parseHTML(html);
47
+
48
+ const h1 = document.querySelector('[data-content-export] h1');
49
+ const foo = document.querySelector('[data-content-export] #foo');
50
+
51
+ expect(h1.textContent).to.equal('Hello component!');
52
+ expect(foo.textContent).to.equal('bar');
53
+ });
32
54
  });
33
55
 
34
56
  describe('dev', () => {
@@ -42,7 +64,7 @@ describe('MDX Component', () => {
42
64
  await devServer.stop();
43
65
  });
44
66
 
45
- it('works', async () => {
67
+ it('supports top-level imports', async () => {
46
68
  const res = await fixture.fetch('/');
47
69
 
48
70
  expect(res.status).to.equal(200);
@@ -56,5 +78,35 @@ describe('MDX Component', () => {
56
78
  expect(h1.textContent).to.equal('Hello component!');
57
79
  expect(foo.textContent).to.equal('bar');
58
80
  });
81
+
82
+ it('supports glob imports - <Component.default />', async () => {
83
+ const res = await fixture.fetch('/glob');
84
+
85
+ expect(res.status).to.equal(200);
86
+
87
+ const html = await res.text();
88
+ const { document } = parseHTML(html);
89
+
90
+ const h1 = document.querySelector('[data-default-export] h1');
91
+ const foo = document.querySelector('[data-default-export] #foo');
92
+
93
+ expect(h1.textContent).to.equal('Hello component!');
94
+ expect(foo.textContent).to.equal('bar');
95
+ });
96
+
97
+ it('supports glob imports - <Content />', async () => {
98
+ const res = await fixture.fetch('/glob');
99
+
100
+ expect(res.status).to.equal(200);
101
+
102
+ const html = await res.text();
103
+ const { document } = parseHTML(html);
104
+
105
+ const h1 = document.querySelector('[data-content-export] h1');
106
+ const foo = document.querySelector('[data-content-export] #foo');
107
+
108
+ expect(h1.textContent).to.equal('Hello component!');
109
+ expect(foo.textContent).to.equal('bar');
110
+ });
59
111
  });
60
112
  });
@@ -1,4 +1,5 @@
1
1
  import { expect } from 'chai';
2
+ import { parseHTML } from 'linkedom';
2
3
  import { loadFixture } from '../../../astro/test/test-utils.js';
3
4
 
4
5
  const FIXTURE_ROOT = new URL('./fixtures/mdx-frontmatter-injection/', import.meta.url);
@@ -41,4 +42,15 @@ describe('MDX frontmatter injection', () => {
41
42
  expect(titles).to.contain('Overridden title');
42
43
  expect(readingTimes).to.contain('1000 min read');
43
44
  });
45
+
46
+ it('passes injected frontmatter to layouts', async () => {
47
+ const html1 = await fixture.readFile('/page-1/index.html');
48
+ const html2 = await fixture.readFile('/page-2/index.html');
49
+
50
+ const title1 = parseHTML(html1).document.querySelector('title');
51
+ const title2 = parseHTML(html2).document.querySelector('title');
52
+
53
+ expect(title1.innerHTML).to.equal('Page 1');
54
+ expect(title2.innerHTML).to.equal('Page 2');
55
+ });
44
56
  });
@@ -56,4 +56,18 @@ describe('MDX frontmatter', () => {
56
56
  expect(headingSlugs).to.contain('section-1');
57
57
  expect(headingSlugs).to.contain('section-2');
58
58
  });
59
+
60
+ it('passes "file" and "url" to layout via frontmatter', async () => {
61
+ const html = await fixture.readFile('/with-headings/index.html');
62
+ const { document } = parseHTML(html);
63
+
64
+ const frontmatterFile = document.querySelector('[data-frontmatter-file]')?.textContent;
65
+ const frontmatterUrl = document.querySelector('[data-frontmatter-url]')?.textContent;
66
+
67
+ expect(frontmatterFile?.endsWith('with-headings.mdx')).to.equal(
68
+ true,
69
+ '"file" prop does not end with correct path or is undefined'
70
+ );
71
+ expect(frontmatterUrl).to.equal('/with-headings');
72
+ });
59
73
  });
@@ -0,0 +1,83 @@
1
+ import { expect } from 'chai';
2
+ import { parseHTML } from 'linkedom';
3
+ import { loadFixture } from '../../../astro/test/test-utils.js';
4
+
5
+ describe('MDX Namespace', () => {
6
+ let fixture;
7
+
8
+ before(async () => {
9
+ fixture = await loadFixture({
10
+ root: new URL('./fixtures/mdx-namespace/', import.meta.url),
11
+ });
12
+ });
13
+
14
+ describe('build', () => {
15
+ before(async () => {
16
+ await fixture.build();
17
+ });
18
+
19
+ it('works for object', async () => {
20
+ const html = await fixture.readFile('/object/index.html');
21
+ const { document } = parseHTML(html);
22
+
23
+ const island = document.querySelector('astro-island');
24
+ const component = document.querySelector('#component');
25
+
26
+ expect(island).not.undefined;
27
+ expect(component.textContent).equal('Hello world');
28
+ });
29
+
30
+ it('works for star', async () => {
31
+ const html = await fixture.readFile('/star/index.html');
32
+ const { document } = parseHTML(html);
33
+
34
+ const island = document.querySelector('astro-island');
35
+ const component = document.querySelector('#component');
36
+
37
+ expect(island).not.undefined;
38
+ expect(component.textContent).equal('Hello world');
39
+ });
40
+ });
41
+
42
+ describe('dev', () => {
43
+ let devServer;
44
+
45
+ before(async () => {
46
+ devServer = await fixture.startDevServer();
47
+ });
48
+
49
+ after(async () => {
50
+ await devServer.stop();
51
+ });
52
+
53
+ it('works for object', async () => {
54
+ const res = await fixture.fetch('/object');
55
+
56
+ expect(res.status).to.equal(200);
57
+
58
+ const html = await res.text();
59
+ const { document } = parseHTML(html);
60
+
61
+ const island = document.querySelector('astro-island');
62
+ const component = document.querySelector('#component');
63
+
64
+ expect(island).not.undefined;
65
+ expect(component.textContent).equal('Hello world');
66
+ });
67
+
68
+ it('works for star', async () => {
69
+ const res = await fixture.fetch('/star');
70
+
71
+ expect(res.status).to.equal(200);
72
+
73
+ const html = await res.text();
74
+ const { document } = parseHTML(html);
75
+
76
+ const island = document.querySelector('astro-island');
77
+ const component = document.querySelector('#component');
78
+
79
+ expect(island).not.undefined;
80
+ expect(component.textContent).equal('Hello world');
81
+ });
82
+ });
83
+ });
@@ -3,6 +3,7 @@ import mdx from '@astrojs/mdx';
3
3
  import { expect } from 'chai';
4
4
  import { parseHTML } from 'linkedom';
5
5
  import { loadFixture } from '../../../astro/test/test-utils.js';
6
+ import shikiTwoslash from 'remark-shiki-twoslash';
6
7
 
7
8
  const FIXTURE_ROOT = new URL('./fixtures/mdx-syntax-hightlighting/', import.meta.url);
8
9
 
@@ -21,8 +22,9 @@ describe('MDX syntax highlighting', () => {
21
22
  const html = await fixture.readFile('/index.html');
22
23
  const { document } = parseHTML(html);
23
24
 
24
- const shikiCodeBlock = document.querySelector('pre.shiki');
25
+ const shikiCodeBlock = document.querySelector('pre.astro-code');
25
26
  expect(shikiCodeBlock).to.not.be.null;
27
+ expect(shikiCodeBlock.getAttribute('style')).to.contain('background-color:#0d1117');
26
28
  });
27
29
 
28
30
  it('respects markdown.shikiConfig.theme', async () => {
@@ -41,8 +43,9 @@ describe('MDX syntax highlighting', () => {
41
43
  const html = await fixture.readFile('/index.html');
42
44
  const { document } = parseHTML(html);
43
45
 
44
- const shikiCodeBlock = document.querySelector('pre.shiki.dracula');
46
+ const shikiCodeBlock = document.querySelector('pre.astro-code');
45
47
  expect(shikiCodeBlock).to.not.be.null;
48
+ expect(shikiCodeBlock.getAttribute('style')).to.contain('background-color:#282A36');
46
49
  });
47
50
  });
48
51
 
@@ -64,4 +67,25 @@ describe('MDX syntax highlighting', () => {
64
67
  expect(prismCodeBlock).to.not.be.null;
65
68
  });
66
69
  });
70
+
71
+ it('supports custom highlighter - shiki-twoslash', async () => {
72
+ const fixture = await loadFixture({
73
+ root: FIXTURE_ROOT,
74
+ markdown: {
75
+ syntaxHighlight: false,
76
+ },
77
+ integrations: [
78
+ mdx({
79
+ remarkPlugins: [shikiTwoslash.default ?? shikiTwoslash],
80
+ }),
81
+ ],
82
+ });
83
+ await fixture.build();
84
+
85
+ const html = await fixture.readFile('/index.html');
86
+ const { document } = parseHTML(html);
87
+
88
+ const twoslashCodeBlock = document.querySelector('pre.shiki');
89
+ expect(twoslashCodeBlock).to.not.be.null;
90
+ });
67
91
  });
@@ -1,3 +0,0 @@
1
- <!DOCTYPE html>
2
- <h1 id="hello-component">Hello component!</h1>
3
- <div id="foo">bar</div>
@@ -1 +0,0 @@
1
- {"titles":["Using YAML frontmatter"]}
@@ -1 +0,0 @@
1
- <!DOCTYPE html><h1 id="customfrontmatterillthrowifidontexist">Oh no, that&#39;s scary!</h1>
@@ -1 +0,0 @@
1
- {"titles":["Using YAML frontmatter",null]}
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html><html lang="en">
2
-
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- </head>
8
-
9
- <body>
10
- <p data-content-title>Using YAML frontmatter</p>
11
- <p data-frontmatter-title>Using YAML frontmatter</p>
12
- <p data-layout-rendered>Layout rendered!</p>
13
- <ul data-headings>
14
-
15
- </ul>
16
- Oh no, that&#39;s scary!
17
- </body></html>
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html><html lang="en">
2
-
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- </head>
8
-
9
- <body>
10
- <p data-content-title></p>
11
- <p data-frontmatter-title></p>
12
- <p data-layout-rendered>Layout rendered!</p>
13
- <ul data-headings>
14
- <li>section-1</li><li>section-2</li>
15
- </ul>
16
- <h2 id="section-1">Section 1</h2>
17
- <h2 id="section-2">Section 2</h2>
18
- </body></html>
@@ -1 +0,0 @@
1
- {"headingsByPage":{"./test-with-jsx-expressions.mdx":[{"depth":1,"slug":"heading-test-with-jsx-expressions","text":"Heading test with JSX expressions"},{"depth":2,"slug":"h2title","text":"h2Title"},{"depth":3,"slug":"h3title","text":"h3Title"}],"./test.mdx":[{"depth":1,"slug":"heading-test","text":"Heading test"},{"depth":2,"slug":"section-1","text":"Section 1"},{"depth":3,"slug":"subsection-1","text":"Subsection 1"},{"depth":3,"slug":"subsection-2","text":"Subsection 2"},{"depth":2,"slug":"section-2","text":"Section 2"}]}}
@@ -1,5 +0,0 @@
1
- <!DOCTYPE html><h1 id="heading-test">Heading test</h1>
2
- <h2 id="section-1">Section 1</h2>
3
- <h3 id="subsection-1">Subsection 1</h3>
4
- <h3 id="subsection-2">Subsection 2</h3>
5
- <h2 id="section-2">Section 2</h2>
@@ -1,3 +0,0 @@
1
- <!DOCTYPE html><h1 id="heading-test-with-jsx-expressions">Heading test with JSX expressions</h1>
2
- <h2 id="h2title">Section 1</h2>
3
- <h3 id="h3title">Subsection 1</h3>
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Page</title>
5
- </head>
6
- <body>
7
- <p>First mdx file</p>
8
-
9
- <div id="one">hello</div>
10
- <div id="url">/src/content/1.mdx</div>
11
- <div id="file">/Users/matthew/dev/astro/packages/integrations/mdx/test/fixtures/mdx-get-static-paths/src/content/1.mdx</div>
12
- </body>
13
- </html>
@@ -1 +0,0 @@
1
- <!DOCTYPE html><h1 id="hello-page">Hello page!</h1>
@@ -1 +0,0 @@
1
- {"type":"module"}