@astrojs/mdx 0.19.1 → 0.19.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.
Files changed (139) hide show
  1. package/package.json +8 -4
  2. package/.turbo/turbo-build.log +0 -4
  3. package/CHANGELOG.md +0 -725
  4. package/src/index.ts +0 -226
  5. package/src/plugins.ts +0 -185
  6. package/src/rehype-collect-headings.ts +0 -11
  7. package/src/rehype-meta-string.ts +0 -17
  8. package/src/remark-images-to-component.ts +0 -98
  9. package/src/remark-prism.ts +0 -18
  10. package/src/remark-shiki.ts +0 -115
  11. package/src/utils.ts +0 -108
  12. package/test/css-head-mdx.test.js +0 -98
  13. package/test/fixtures/css-head-mdx/node_modules/.bin/astro +0 -17
  14. package/test/fixtures/css-head-mdx/package.json +0 -10
  15. package/test/fixtures/css-head-mdx/src/components/BaseHead.astro +0 -11
  16. package/test/fixtures/css-head-mdx/src/components/BasicBlock.astro +0 -14
  17. package/test/fixtures/css-head-mdx/src/components/GenericComponent.astro +0 -1
  18. package/test/fixtures/css-head-mdx/src/components/HelloWorld.astro +0 -11
  19. package/test/fixtures/css-head-mdx/src/components/MDXWrapper.astro +0 -9
  20. package/test/fixtures/css-head-mdx/src/components/P.astro +0 -3
  21. package/test/fixtures/css-head-mdx/src/components/SmallCaps.astro +0 -3
  22. package/test/fixtures/css-head-mdx/src/components/UsingMdx.astro +0 -8
  23. package/test/fixtures/css-head-mdx/src/components/WithHoistedScripts.astro +0 -6
  24. package/test/fixtures/css-head-mdx/src/content/blog/_styles.css +0 -3
  25. package/test/fixtures/css-head-mdx/src/content/blog/using-mdx.mdx +0 -6
  26. package/test/fixtures/css-head-mdx/src/content/posts/test.mdx +0 -5
  27. package/test/fixtures/css-head-mdx/src/content/posts/using-component.mdx +0 -13
  28. package/test/fixtures/css-head-mdx/src/layouts/ContentLayout.astro +0 -18
  29. package/test/fixtures/css-head-mdx/src/layouts/DocumentLayout.astro +0 -15
  30. package/test/fixtures/css-head-mdx/src/layouts/One.astro +0 -15
  31. package/test/fixtures/css-head-mdx/src/layouts/Three.astro +0 -6
  32. package/test/fixtures/css-head-mdx/src/layouts/Two.astro +0 -6
  33. package/test/fixtures/css-head-mdx/src/pages/DirectContentUsage.astro +0 -17
  34. package/test/fixtures/css-head-mdx/src/pages/componentwithtext.mdx +0 -12
  35. package/test/fixtures/css-head-mdx/src/pages/indexOne.astro +0 -10
  36. package/test/fixtures/css-head-mdx/src/pages/indexThree.astro +0 -10
  37. package/test/fixtures/css-head-mdx/src/pages/indexTwo.astro +0 -10
  38. package/test/fixtures/css-head-mdx/src/pages/noLayoutWithComponent.mdx +0 -22
  39. package/test/fixtures/css-head-mdx/src/pages/posts/[post].astro +0 -18
  40. package/test/fixtures/css-head-mdx/src/pages/remote.astro +0 -17
  41. package/test/fixtures/css-head-mdx/src/pages/testOne.mdx +0 -15
  42. package/test/fixtures/css-head-mdx/src/pages/testThree.mdx +0 -15
  43. package/test/fixtures/css-head-mdx/src/pages/testTwo.mdx +0 -15
  44. package/test/fixtures/css-head-mdx/src/styles/global.css +0 -3
  45. package/test/fixtures/css-head-mdx/src/test.mdx +0 -14
  46. package/test/fixtures/mdx-astro-markdown-remarkRehype/src/pages/index.mdx +0 -5
  47. package/test/fixtures/mdx-component/src/components/Test.mdx +0 -3
  48. package/test/fixtures/mdx-component/src/components/WithFragment.mdx +0 -3
  49. package/test/fixtures/mdx-component/src/pages/glob.astro +0 -20
  50. package/test/fixtures/mdx-component/src/pages/index.astro +0 -5
  51. package/test/fixtures/mdx-component/src/pages/w-fragment.astro +0 -5
  52. package/test/fixtures/mdx-escape/src/components/Em.astro +0 -7
  53. package/test/fixtures/mdx-escape/src/components/P.astro +0 -1
  54. package/test/fixtures/mdx-escape/src/components/Title.astro +0 -1
  55. package/test/fixtures/mdx-escape/src/pages/html-tag.mdx +0 -5
  56. package/test/fixtures/mdx-escape/src/pages/index.mdx +0 -13
  57. package/test/fixtures/mdx-frontmatter/src/layouts/Base.astro +0 -38
  58. package/test/fixtures/mdx-frontmatter/src/pages/glob.json.js +0 -9
  59. package/test/fixtures/mdx-frontmatter/src/pages/index.mdx +0 -10
  60. package/test/fixtures/mdx-frontmatter/src/pages/with-headings.mdx +0 -7
  61. package/test/fixtures/mdx-frontmatter-injection/astro.config.mjs +0 -12
  62. package/test/fixtures/mdx-frontmatter-injection/node_modules/.bin/astro +0 -17
  63. package/test/fixtures/mdx-frontmatter-injection/package.json +0 -12
  64. package/test/fixtures/mdx-frontmatter-injection/src/layouts/Base.astro +0 -17
  65. package/test/fixtures/mdx-frontmatter-injection/src/markdown-plugins.mjs +0 -27
  66. package/test/fixtures/mdx-frontmatter-injection/src/pages/glob.json.js +0 -6
  67. package/test/fixtures/mdx-frontmatter-injection/src/pages/page-1.mdx +0 -8
  68. package/test/fixtures/mdx-frontmatter-injection/src/pages/page-2.mdx +0 -24
  69. package/test/fixtures/mdx-get-headings/src/pages/pages.json.js +0 -11
  70. package/test/fixtures/mdx-get-headings/src/pages/test-with-frontmatter.mdx +0 -45
  71. package/test/fixtures/mdx-get-headings/src/pages/test-with-jsx-expressions.mdx +0 -8
  72. package/test/fixtures/mdx-get-headings/src/pages/test.mdx +0 -9
  73. package/test/fixtures/mdx-get-static-paths/src/content/1.mdx +0 -5
  74. package/test/fixtures/mdx-get-static-paths/src/pages/[slug].astro +0 -34
  75. package/test/fixtures/mdx-images/astro.config.ts +0 -8
  76. package/test/fixtures/mdx-images/node_modules/.bin/astro +0 -17
  77. package/test/fixtures/mdx-images/package.json +0 -10
  78. package/test/fixtures/mdx-images/src/assets/houston in space.webp +0 -0
  79. package/test/fixtures/mdx-images/src/assets/houston.webp +0 -0
  80. package/test/fixtures/mdx-images/src/pages/index.mdx +0 -11
  81. package/test/fixtures/mdx-infinite-loop/astro.config.ts +0 -6
  82. package/test/fixtures/mdx-infinite-loop/node_modules/.bin/astro +0 -17
  83. package/test/fixtures/mdx-infinite-loop/package.json +0 -11
  84. package/test/fixtures/mdx-infinite-loop/src/components/Test.js +0 -3
  85. package/test/fixtures/mdx-infinite-loop/src/pages/doc.mdx +0 -6
  86. package/test/fixtures/mdx-infinite-loop/src/pages/index.astro +0 -5
  87. package/test/fixtures/mdx-math/src/pages/mathjax.mdx +0 -5
  88. package/test/fixtures/mdx-namespace/astro.config.mjs +0 -6
  89. package/test/fixtures/mdx-namespace/node_modules/.bin/astro +0 -17
  90. package/test/fixtures/mdx-namespace/package.json +0 -11
  91. package/test/fixtures/mdx-namespace/src/components/Component.jsx +0 -6
  92. package/test/fixtures/mdx-namespace/src/pages/object.mdx +0 -3
  93. package/test/fixtures/mdx-namespace/src/pages/star.mdx +0 -3
  94. package/test/fixtures/mdx-page/astro.config.ts +0 -5
  95. package/test/fixtures/mdx-page/node_modules/.bin/astro +0 -17
  96. package/test/fixtures/mdx-page/package.json +0 -10
  97. package/test/fixtures/mdx-page/src/pages/index.mdx +0 -3
  98. package/test/fixtures/mdx-page/src/styles.css +0 -3
  99. package/test/fixtures/mdx-plugins/src/pages/with-plugins.mdx +0 -25
  100. package/test/fixtures/mdx-plus-react/astro.config.mjs +0 -6
  101. package/test/fixtures/mdx-plus-react/node_modules/.bin/astro +0 -17
  102. package/test/fixtures/mdx-plus-react/package.json +0 -11
  103. package/test/fixtures/mdx-plus-react/src/components/Component.jsx +0 -5
  104. package/test/fixtures/mdx-plus-react/src/pages/index.astro +0 -11
  105. package/test/fixtures/mdx-script-style-raw/src/pages/index.mdx +0 -13
  106. package/test/fixtures/mdx-slots/src/components/Slotted.astro +0 -4
  107. package/test/fixtures/mdx-slots/src/components/Test.mdx +0 -15
  108. package/test/fixtures/mdx-slots/src/pages/glob.astro +0 -11
  109. package/test/fixtures/mdx-slots/src/pages/index.astro +0 -5
  110. package/test/fixtures/mdx-syntax-hightlighting/src/pages/index.mdx +0 -9
  111. package/test/fixtures/mdx-url-export/src/pages/pages.json.js +0 -9
  112. package/test/fixtures/mdx-url-export/src/pages/test-1.mdx +0 -1
  113. package/test/fixtures/mdx-url-export/src/pages/test-2.mdx +0 -1
  114. package/test/fixtures/mdx-url-export/src/pages/with-url-override.mdx +0 -3
  115. package/test/fixtures/mdx-vite-env-vars/astro.config.mjs +0 -9
  116. package/test/fixtures/mdx-vite-env-vars/node_modules/.bin/astro +0 -17
  117. package/test/fixtures/mdx-vite-env-vars/package.json +0 -8
  118. package/test/fixtures/mdx-vite-env-vars/src/pages/frontmatter.json.js +0 -7
  119. package/test/fixtures/mdx-vite-env-vars/src/pages/vite-env-vars.mdx +0 -38
  120. package/test/mdx-astro-markdown-remarkRehype.test.js +0 -85
  121. package/test/mdx-component.test.js +0 -191
  122. package/test/mdx-escape.test.js +0 -32
  123. package/test/mdx-frontmatter-injection.test.js +0 -53
  124. package/test/mdx-frontmatter.test.js +0 -77
  125. package/test/mdx-get-headings.test.js +0 -194
  126. package/test/mdx-get-static-paths.test.js +0 -32
  127. package/test/mdx-images.test.js +0 -40
  128. package/test/mdx-infinite-loop.test.js +0 -30
  129. package/test/mdx-math.test.js +0 -64
  130. package/test/mdx-namespace.test.js +0 -83
  131. package/test/mdx-page.test.js +0 -64
  132. package/test/mdx-plugins.test.js +0 -285
  133. package/test/mdx-plus-react.test.js +0 -25
  134. package/test/mdx-script-style-raw.test.js +0 -70
  135. package/test/mdx-slots.js +0 -124
  136. package/test/mdx-syntax-highlighting.test.js +0 -145
  137. package/test/mdx-url-export.test.js +0 -28
  138. package/test/mdx-vite-env-vars.test.js +0 -54
  139. package/tsconfig.json +0 -10
package/CHANGELOG.md DELETED
@@ -1,725 +0,0 @@
1
- # @astrojs/mdx
2
-
3
- ## 0.19.1
4
-
5
- ### Patch Changes
6
-
7
- - [#6932](https://github.com/withastro/astro/pull/6932) [`49514e4ce`](https://github.com/withastro/astro/commit/49514e4ce40fedb39bf7decd2c296258efbdafc7) Thanks [@bluwy](https://github.com/bluwy)! - Upgrade shiki to v0.14.1. This updates the shiki theme colors and adds the theme name to the `pre` tag, e.g. `<pre class="astro-code github-dark">`.
8
-
9
- - Updated dependencies [[`49514e4ce`](https://github.com/withastro/astro/commit/49514e4ce40fedb39bf7decd2c296258efbdafc7)]:
10
- - @astrojs/markdown-remark@2.2.0
11
-
12
- ## 0.19.0
13
-
14
- ### Minor Changes
15
-
16
- - [#6824](https://github.com/withastro/astro/pull/6824) [`2511d58d5`](https://github.com/withastro/astro/commit/2511d58d586af080a78e5ef8a63020b3e17770db) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Add support for using optimized and relative images in MDX files with `experimental.assets`
17
-
18
- ### Patch Changes
19
-
20
- - Updated dependencies [[`2511d58d5`](https://github.com/withastro/astro/commit/2511d58d586af080a78e5ef8a63020b3e17770db)]:
21
- - @astrojs/markdown-remark@2.1.4
22
-
23
- ## 0.18.4
24
-
25
- ### Patch Changes
26
-
27
- - [#6817](https://github.com/withastro/astro/pull/6817) [`f882bc163`](https://github.com/withastro/astro/commit/f882bc1636d5ce1c3b8faae47df36b4dc758045a) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix sourcemap warnings when using Content Collections and MDX with the `vite.build.sourcemap` option
28
-
29
- ## 0.18.3
30
-
31
- ### Patch Changes
32
-
33
- - [#6779](https://github.com/withastro/astro/pull/6779) [`a98f6f418`](https://github.com/withastro/astro/commit/a98f6f418c92261a06ef79624a8c86e288c21eab) Thanks [@matthewp](https://github.com/matthewp)! - Prevent body head content injection in MDX when using layout
34
-
35
- ## 0.18.2
36
-
37
- ### Patch Changes
38
-
39
- - [#6552](https://github.com/withastro/astro/pull/6552) [`392ba3e4d`](https://github.com/withastro/astro/commit/392ba3e4d55f73ce9194bd94a2243f1aa62af079) Thanks [@bluwy](https://github.com/bluwy)! - Fix integration return type
40
-
41
- - Updated dependencies [[`90e5f87d0`](https://github.com/withastro/astro/commit/90e5f87d03215a833bb6ac91f9548670a25ce659), [`f5fddafc2`](https://github.com/withastro/astro/commit/f5fddafc248bb1ef57b7349bfecc25539ae2b5ea)]:
42
- - @astrojs/markdown-remark@2.1.1
43
-
44
- ## 0.18.1
45
-
46
- ### Patch Changes
47
-
48
- - [#6494](https://github.com/withastro/astro/pull/6494) [`a13e9d7e3`](https://github.com/withastro/astro/commit/a13e9d7e33baccf51e7d4815f99b481ad174bc57) Thanks [@Yan-Thomas](https://github.com/Yan-Thomas)! - Consistency improvements to several package descriptions
49
-
50
- - Updated dependencies [[`a13e9d7e3`](https://github.com/withastro/astro/commit/a13e9d7e33baccf51e7d4815f99b481ad174bc57)]:
51
- - @astrojs/prism@2.1.1
52
-
53
- ## 0.18.0
54
-
55
- ### Minor Changes
56
-
57
- - [#6344](https://github.com/withastro/astro/pull/6344) [`694918a56`](https://github.com/withastro/astro/commit/694918a56b01104831296be0c25456135a63c784) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Add a new experimental flag (`experimental.assets`) to enable our new core Assets story.
58
-
59
- This unlocks a few features:
60
-
61
- - A new built-in image component and JavaScript API to transform and optimize images.
62
- - Relative images with automatic optimization in Markdown.
63
- - Support for validating assets using content collections.
64
- - and more!
65
-
66
- See [Assets (Experimental)](https://docs.astro.build/en/guides/assets/) on our docs site for more information on how to use this feature!
67
-
68
- - [#6213](https://github.com/withastro/astro/pull/6213) [`afbbc4d5b`](https://github.com/withastro/astro/commit/afbbc4d5bfafc1779bac00b41c2a1cb1c90f2808) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Updated compilation settings to disable downlevelling for Node 14
69
-
70
- ### Patch Changes
71
-
72
- - [#6209](https://github.com/withastro/astro/pull/6209) [`fec583909`](https://github.com/withastro/astro/commit/fec583909ab62829dc0c1600e2387979365f2b94) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Introduce the (experimental) `@astrojs/markdoc` integration. This unlocks Markdoc inside your Content Collections, bringing support for Astro and UI components in your content. This also improves Astro core internals to make Content Collections extensible to more file types in the future.
73
-
74
- You can install this integration using the `astro add` command:
75
-
76
- ```
77
- astro add markdoc
78
- ```
79
-
80
- [Read the `@astrojs/markdoc` documentation](https://docs.astro.build/en/guides/integrations-guide/markdoc/) for usage instructions, and browse the [new `with-markdoc` starter](https://astro.new/with-markdoc) to try for yourself.
81
-
82
- - Updated dependencies [[`694918a56`](https://github.com/withastro/astro/commit/694918a56b01104831296be0c25456135a63c784), [`afbbc4d5b`](https://github.com/withastro/astro/commit/afbbc4d5bfafc1779bac00b41c2a1cb1c90f2808)]:
83
- - @astrojs/markdown-remark@2.1.0
84
- - @astrojs/prism@2.1.0
85
-
86
- ## 0.17.2
87
-
88
- ### Patch Changes
89
-
90
- - [#6296](https://github.com/withastro/astro/pull/6296) [`075b87e8b`](https://github.com/withastro/astro/commit/075b87e8b72a69a608cd2ff1196dc0989e2cf1e1) Thanks [@RaphaelBossek](https://github.com/RaphaelBossek)! - Update to `es-module-lexer@1.1.1`
91
-
92
- ## 0.17.1
93
-
94
- - Updated to es-module-lexer@1.1.1
95
-
96
- ## 0.17.0
97
-
98
- ### Minor Changes
99
-
100
- - [#6253](https://github.com/withastro/astro/pull/6253) [`0049fda62`](https://github.com/withastro/astro/commit/0049fda62fa8650a0d250adb00a2c5d82679aeaf) Thanks [@bluwy](https://github.com/bluwy)! - Support rehype plugins that inject namespaced attributes. This introduces a breaking change if you use [custom components for HTML elements](https://docs.astro.build/en/guides/markdown-content/#assigning-custom-components-to-html-elements), where the prop passed to the component will be normal HTML casing, e.g. `class` instead of `className`, and `xlink:href` instead of `xlinkHref`.
101
-
102
- ## 0.16.2
103
-
104
- ### Patch Changes
105
-
106
- - [#6252](https://github.com/withastro/astro/pull/6252) [`0fbcf838a`](https://github.com/withastro/astro/commit/0fbcf838a775d3b07e7c2372888a8aa6c190278e) Thanks [@bluwy](https://github.com/bluwy)! - Revert previous breaking change
107
-
108
- ## 0.16.1
109
-
110
- ### Patch Changes
111
-
112
- - [#6243](https://github.com/withastro/astro/pull/6243) [`4f6ecba4c`](https://github.com/withastro/astro/commit/4f6ecba4c1b35bacbbc0097854ee2b7b8c878e71) Thanks [@bluwy](https://github.com/bluwy)! - Support rehype plugins that inject namespaced attributes
113
-
114
- ## 0.16.0
115
-
116
- ### Minor Changes
117
-
118
- - [#6050](https://github.com/withastro/astro/pull/6050) [`2ab32b59e`](https://github.com/withastro/astro/commit/2ab32b59ef0a28d34757f2c2adb9cf2baa86855e) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: load syntax highlighters after MDX remark plugins. This keeps MDX consistent with Astro's markdown behavior.
119
-
120
- ### Patch Changes
121
-
122
- - [#6062](https://github.com/withastro/astro/pull/6062) [`c6cf847bd`](https://github.com/withastro/astro/commit/c6cf847bd0b6bef3c51a5710fba5ca43b11e46f9) Thanks [@delucis](https://github.com/delucis)! - Update MDX README
123
-
124
- ## 0.15.2
125
-
126
- ### Patch Changes
127
-
128
- - [#5478](https://github.com/withastro/astro/pull/5478) [`1c7eef308`](https://github.com/withastro/astro/commit/1c7eef308e808aa5ed4662b53e67ec8d1b814d1f) Thanks [@nemo0](https://github.com/nemo0)! - Update READMEs for consistency
129
-
130
- ## 0.15.1
131
-
132
- ### Patch Changes
133
-
134
- - [#5978](https://github.com/withastro/astro/pull/5978) [`7abb1e905`](https://github.com/withastro/astro/commit/7abb1e9056c4b4fd0abfced347df32a41cdfbf28) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fix MDX heading IDs generation when using a frontmatter reference
135
-
136
- - Updated dependencies [[`7abb1e905`](https://github.com/withastro/astro/commit/7abb1e9056c4b4fd0abfced347df32a41cdfbf28)]:
137
- - @astrojs/markdown-remark@2.0.1
138
-
139
- ## 0.15.0
140
-
141
- ### Minor Changes
142
-
143
- - [#5684](https://github.com/withastro/astro/pull/5684) [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Refine Markdown and MDX configuration options for ease-of-use. & [#5769](https://github.com/withastro/astro/pull/5769) [`93e633922`](https://github.com/withastro/astro/commit/93e633922c2e449df3bb2357b3683af1d3c0e07b) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Introduce a `smartypants` flag to opt-out of Astro's default SmartyPants plugin.
144
-
145
- - **Markdown**
146
-
147
- - **Replace the `extendDefaultPlugins` option** with a `gfm` boolean and a `smartypants` boolean. These are enabled by default, and can be disabled to remove GitHub-Flavored Markdown and SmartyPants.
148
-
149
- - Ensure GitHub-Flavored Markdown and SmartyPants are applied whether or not custom `remarkPlugins` or `rehypePlugins` are configured. If you want to apply custom plugins _and_ remove Astro's default plugins, manually set `gfm: false` and `smartypants: false` in your config.
150
-
151
- - **Migrate `extendDefaultPlugins` to `gfm` and `smartypants`**
152
-
153
- You may have disabled Astro's built-in plugins (GitHub-Flavored Markdown and Smartypants) with the `extendDefaultPlugins` option. This has now been split into 2 flags to disable each plugin individually:
154
-
155
- - `markdown.gfm` to disable GitHub-Flavored Markdown
156
- - `markdown.smartypants` to disable SmartyPants
157
-
158
- ```diff
159
- // astro.config.mjs
160
- import { defineConfig } from 'astro/config';
161
-
162
- export default defineConfig({
163
- markdown: {
164
- - extendDefaultPlugins: false,
165
- + smartypants: false,
166
- + gfm: false,
167
- }
168
- });
169
- ```
170
-
171
- Additionally, applying remark and rehype plugins **no longer disables** `gfm` and `smartypants`. You will need to opt-out manually by setting `gfm` and `smartypants` to `false`.
172
-
173
- - **MDX**
174
-
175
- - Support _all_ Markdown configuration options (except `drafts`) from your MDX integration config. This includes `syntaxHighlighting` and `shikiConfig` options to further customize the MDX renderer.
176
-
177
- - Simplify `extendPlugins` to an `extendMarkdownConfig` option. MDX options will default to their equivalent in your Markdown config. By setting `extendMarkdownConfig` to false, you can "eject" to set your own syntax highlighting, plugins, and more.
178
-
179
- - **Migrate MDX's `extendPlugins` to `extendMarkdownConfig`**
180
-
181
- You may have used the `extendPlugins` option to manage plugin defaults in MDX. This has been replaced by 3 flags:
182
-
183
- - `extendMarkdownConfig` (`true` by default) to toggle Markdown config inheritance. This replaces the `extendPlugins: 'markdown'` option.
184
- - `gfm` (`true` by default) and `smartypants` (`true` by default) to toggle GitHub-Flavored Markdown and SmartyPants in MDX. This replaces the `extendPlugins: 'defaults'` option.
185
-
186
- - [#5687](https://github.com/withastro/astro/pull/5687) [`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Give remark and rehype plugins access to user frontmatter via frontmatter injection. This means `data.astro.frontmatter` is now the _complete_ Markdown or MDX document's frontmatter, rather than an empty object.
187
-
188
- This allows plugin authors to modify existing frontmatter, or compute new properties based on other properties. For example, say you want to compute a full image URL based on an `imageSrc` slug in your document frontmatter:
189
-
190
- ```ts
191
- export function remarkInjectSocialImagePlugin() {
192
- return function (tree, file) {
193
- const { frontmatter } = file.data.astro;
194
- frontmatter.socialImageSrc = new URL(frontmatter.imageSrc, 'https://my-blog.com/').pathname;
195
- };
196
- }
197
- ```
198
-
199
- When using Content Collections, you can access this modified frontmatter using the `remarkPluginFrontmatter` property returned when rendering an entry.
200
-
201
- **Migration instructions**
202
-
203
- Plugin authors should now **check for user frontmatter when applying defaults.**
204
-
205
- For example, say a remark plugin wants to apply a default `title` if none is present. Add a conditional to check if the property is present, and update if none exists:
206
-
207
- ```diff
208
- export function remarkInjectTitlePlugin() {
209
- return function (tree, file) {
210
- const { frontmatter } = file.data.astro;
211
- + if (!frontmatter.title) {
212
- frontmatter.title = 'Default title';
213
- + }
214
- }
215
- }
216
- ```
217
-
218
- This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or reype.
219
-
220
- - [#5891](https://github.com/withastro/astro/pull/5891) [`05caf445d`](https://github.com/withastro/astro/commit/05caf445d4d2728f1010aeb2179a9e756c2fd17d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Remove deprecated Markdown APIs from Astro v0.X. This includes `getHeaders()`, the `.astro` property for layouts, and the `rawContent()` and `compiledContent()` error messages for MDX.
221
-
222
- - [#5782](https://github.com/withastro/astro/pull/5782) [`1f92d64ea`](https://github.com/withastro/astro/commit/1f92d64ea35c03fec43aff64eaf704dc5a9eb30a) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0
223
-
224
- - [#5825](https://github.com/withastro/astro/pull/5825) [`52209ca2a`](https://github.com/withastro/astro/commit/52209ca2ad72a30854947dcb3a90ab4db0ac0a6f) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Baseline the experimental `contentCollections` flag. You're free to remove this from your astro config!
225
-
226
- ```diff
227
- import { defineConfig } from 'astro/config';
228
-
229
- export default defineConfig({
230
- - experimental: { contentCollections: true }
231
- })
232
- ```
233
-
234
- ### Patch Changes
235
-
236
- - [#5837](https://github.com/withastro/astro/pull/5837) [`12f65a4d5`](https://github.com/withastro/astro/commit/12f65a4d55e3fd2993c2f67b18794dd536280c69) Thanks [@giuseppelt](https://github.com/giuseppelt)! - fix shiki css class replace logic
237
-
238
- - [#5741](https://github.com/withastro/astro/pull/5741) [`000d3e694`](https://github.com/withastro/astro/commit/000d3e6940839c2aebba1984e6fb3b133cec6749) Thanks [@delucis](https://github.com/delucis)! - Fix broken links in README
239
-
240
- - Updated dependencies [[`93e633922`](https://github.com/withastro/astro/commit/93e633922c2e449df3bb2357b3683af1d3c0e07b), [`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144), [`1f92d64ea`](https://github.com/withastro/astro/commit/1f92d64ea35c03fec43aff64eaf704dc5a9eb30a), [`12f65a4d5`](https://github.com/withastro/astro/commit/12f65a4d55e3fd2993c2f67b18794dd536280c69), [`16107b6a1`](https://github.com/withastro/astro/commit/16107b6a10514ef1b563e585ec9add4b14f42b94), [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d), [`52209ca2a`](https://github.com/withastro/astro/commit/52209ca2ad72a30854947dcb3a90ab4db0ac0a6f), [`7572f7402`](https://github.com/withastro/astro/commit/7572f7402238da37de748be58d678fedaf863b53)]:
241
- - @astrojs/markdown-remark@2.0.0
242
- - @astrojs/prism@2.0.0
243
-
244
- ## 1.0.0-beta.2
245
-
246
- <details>
247
- <summary>See changes in 1.0.0-beta.2</summary>
248
-
249
- ### Major Changes
250
-
251
- - [#5825](https://github.com/withastro/astro/pull/5825) [`52209ca2a`](https://github.com/withastro/astro/commit/52209ca2ad72a30854947dcb3a90ab4db0ac0a6f) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Baseline the experimental `contentCollections` flag. You're free to remove this from your astro config!
252
-
253
- ```diff
254
- import { defineConfig } from 'astro/config';
255
-
256
- export default defineConfig({
257
- - experimental: { contentCollections: true }
258
- })
259
- ```
260
-
261
- ### Minor Changes
262
-
263
- - [#5782](https://github.com/withastro/astro/pull/5782) [`1f92d64ea`](https://github.com/withastro/astro/commit/1f92d64ea35c03fec43aff64eaf704dc5a9eb30a) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0
264
-
265
- ### Patch Changes
266
-
267
- - [#5837](https://github.com/withastro/astro/pull/5837) [`12f65a4d5`](https://github.com/withastro/astro/commit/12f65a4d55e3fd2993c2f67b18794dd536280c69) Thanks [@giuseppelt](https://github.com/giuseppelt)! - fix shiki css class replace logic
268
-
269
- - Updated dependencies [[`1f92d64ea`](https://github.com/withastro/astro/commit/1f92d64ea35c03fec43aff64eaf704dc5a9eb30a), [`12f65a4d5`](https://github.com/withastro/astro/commit/12f65a4d55e3fd2993c2f67b18794dd536280c69), [`16107b6a1`](https://github.com/withastro/astro/commit/16107b6a10514ef1b563e585ec9add4b14f42b94), [`52209ca2a`](https://github.com/withastro/astro/commit/52209ca2ad72a30854947dcb3a90ab4db0ac0a6f), [`7572f7402`](https://github.com/withastro/astro/commit/7572f7402238da37de748be58d678fedaf863b53)]:
270
- - @astrojs/prism@2.0.0-beta.0
271
- - @astrojs/markdown-remark@2.0.0-beta.2
272
-
273
- </details>
274
-
275
- ## 0.15.0-beta.1
276
-
277
- <details>
278
- <summary>See changes in 0.15.0-beta.1</summary>
279
-
280
- ### Minor Changes
281
-
282
- - [#5769](https://github.com/withastro/astro/pull/5769) [`93e633922`](https://github.com/withastro/astro/commit/93e633922c2e449df3bb2357b3683af1d3c0e07b) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Introduce a `smartypants` flag to opt-out of Astro's default SmartyPants plugin.
283
-
284
- ```js
285
- {
286
- markdown: {
287
- smartypants: false,
288
- }
289
- }
290
- ```
291
-
292
- #### Migration
293
-
294
- You may have disabled Astro's built-in plugins (GitHub-Flavored Markdown and Smartypants) with the `extendDefaultPlugins` option. This has now been split into 2 flags to disable each plugin individually:
295
-
296
- - `markdown.gfm` to disable GitHub-Flavored Markdown
297
- - `markdown.smartypants` to disable SmartyPants
298
-
299
- ```diff
300
- // astro.config.mjs
301
- import { defineConfig } from 'astro/config';
302
-
303
- export default defineConfig({
304
- markdown: {
305
- - extendDefaultPlugins: false,
306
- + smartypants: false,
307
- + gfm: false,
308
- }
309
- });
310
- ```
311
-
312
- ### Patch Changes
313
-
314
- - [#5741](https://github.com/withastro/astro/pull/5741) [`000d3e694`](https://github.com/withastro/astro/commit/000d3e6940839c2aebba1984e6fb3b133cec6749) Thanks [@delucis](https://github.com/delucis)! - Fix broken links in README
315
-
316
- - Updated dependencies [[`93e633922`](https://github.com/withastro/astro/commit/93e633922c2e449df3bb2357b3683af1d3c0e07b)]:
317
- - @astrojs/markdown-remark@2.0.0-beta.1
318
-
319
- </details>
320
-
321
- ## 0.15.0-beta.0
322
-
323
- <details>
324
- <summary>See changes in 0.15.0-beta.0</summary>
325
-
326
- ### Minor Changes
327
-
328
- - [#5687](https://github.com/withastro/astro/pull/5687) [`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Give remark and rehype plugins access to user frontmatter via frontmatter injection. This means `data.astro.frontmatter` is now the _complete_ Markdown or MDX document's frontmatter, rather than an empty object.
329
-
330
- This allows plugin authors to modify existing frontmatter, or compute new properties based on other properties. For example, say you want to compute a full image URL based on an `imageSrc` slug in your document frontmatter:
331
-
332
- ```ts
333
- export function remarkInjectSocialImagePlugin() {
334
- return function (tree, file) {
335
- const { frontmatter } = file.data.astro;
336
- frontmatter.socialImageSrc = new URL(frontmatter.imageSrc, 'https://my-blog.com/').pathname;
337
- };
338
- }
339
- ```
340
-
341
- #### Content Collections - new `remarkPluginFrontmatter` property
342
-
343
- We have changed _inject_ frontmatter to _modify_ frontmatter in our docs to improve discoverability. This is based on support forum feedback, where "injection" is rarely the term used.
344
-
345
- To reflect this, the `injectedFrontmatter` property has been renamed to `remarkPluginFrontmatter`. This should clarify this plugin is still separate from the `data` export Content Collections expose today.
346
-
347
- #### Migration instructions
348
-
349
- Plugin authors should now **check for user frontmatter when applying defaults.**
350
-
351
- For example, say a remark plugin wants to apply a default `title` if none is present. Add a conditional to check if the property is present, and update if none exists:
352
-
353
- ```diff
354
- export function remarkInjectTitlePlugin() {
355
- return function (tree, file) {
356
- const { frontmatter } = file.data.astro;
357
- + if (!frontmatter.title) {
358
- frontmatter.title = 'Default title';
359
- + }
360
- }
361
- }
362
- ```
363
-
364
- This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or reype.
365
-
366
- - [#5684](https://github.com/withastro/astro/pull/5684) [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Refine Markdown and MDX configuration options for ease-of-use.
367
-
368
- #### Markdown
369
-
370
- - **Remove `remark-smartypants`** from Astro's default Markdown plugins.
371
- - **Replace the `extendDefaultPlugins` option** with a simplified `gfm` boolean. This is enabled by default, and can be disabled to remove GitHub-Flavored Markdown.
372
- - Ensure GitHub-Flavored Markdown is applied whether or not custom `remarkPlugins` or `rehypePlugins` are configured. If you want to apply custom plugins _and_ remove GFM, manually set `gfm: false` in your config.
373
-
374
- #### MDX
375
-
376
- - Support _all_ Markdown configuration options (except `drafts`) from your MDX integration config. This includes `syntaxHighlighting` and `shikiConfig` options to further customize the MDX renderer.
377
- - Simplify `extendDefaults` to an `extendMarkdownConfig` option. MDX options will default to their equivalent in your Markdown config. By setting `extendMarkdownConfig` to false, you can "eject" to set your own syntax highlighting, plugins, and more.
378
-
379
- #### Migration
380
-
381
- To preserve your existing Markdown and MDX setup, you may need some configuration changes:
382
-
383
- ##### Smartypants manual installation
384
-
385
- [Smartypants](https://github.com/silvenon/remark-smartypants) has been removed from Astro's default setup. If you rely on this plugin, [install `remark-smartypants`](https://github.com/silvenon/remark-smartypants#installing) and apply to your `astro.config.*`:
386
-
387
- ```diff
388
- // astro.config.mjs
389
- import { defineConfig } from 'astro/config';
390
- + import smartypants from 'remark-smartypants';
391
-
392
- export default defineConfig({
393
- markdown: {
394
- + remarkPlugins: [smartypants],
395
- }
396
- });
397
- ```
398
-
399
- ##### Migrate `extendDefaultPlugins` to `gfm`
400
-
401
- You may have disabled Astro's built-in plugins (GitHub-Flavored Markdown and Smartypants) with the `extendDefaultPlugins` option. Since Smartypants has been removed, this has been renamed to `gfm`.
402
-
403
- ```diff
404
- // astro.config.mjs
405
- import { defineConfig } from 'astro/config';
406
-
407
- export default defineConfig({
408
- markdown: {
409
- - extendDefaultPlugins: false,
410
- + gfm: false,
411
- }
412
- });
413
- ```
414
-
415
- Additionally, applying remark and rehype plugins **no longer disables** `gfm`. You will need to opt-out manually by setting `gfm` to `false`.
416
-
417
- ##### Migrate MDX's `extendPlugins` to `extendMarkdownConfig`
418
-
419
- You may have used the `extendPlugins` option to manage plugin defaults in MDX. This has been replaced by 2 flags:
420
-
421
- - `extendMarkdownConfig` (`true` by default) to toggle Markdown config inheritance. This replaces the `extendPlugins: 'markdown'` option.
422
- - `gfm` (`true` by default) to toggle GitHub-Flavored Markdown in MDX. This replaces the `extendPlugins: 'defaults'` option.
423
-
424
- ### Patch Changes
425
-
426
- - Updated dependencies [[`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144), [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d)]:
427
- - @astrojs/markdown-remark@2.0.0-beta.0
428
-
429
- </details>
430
-
431
- ## 0.14.0
432
-
433
- ### Minor Changes
434
-
435
- - [#5654](https://github.com/withastro/astro/pull/5654) [`2c65b433b`](https://github.com/withastro/astro/commit/2c65b433bf840a1bb93b0a1947df5949e33512ff) Thanks [@delucis](https://github.com/delucis)! - Run heading ID injection after user plugins
436
-
437
- ⚠️ BREAKING CHANGE ⚠️
438
-
439
- If you are using a rehype plugin that depends on heading IDs injected by Astro, the IDs will no longer be available when your plugin runs by default.
440
-
441
- To inject IDs before your plugins run, import and add the `rehypeHeadingIds` plugin to your `rehypePlugins` config:
442
-
443
- ```diff
444
- // astro.config.mjs
445
- + import { rehypeHeadingIds } from '@astrojs/markdown-remark';
446
- import mdx from '@astrojs/mdx';
447
-
448
- export default {
449
- integrations: [mdx()],
450
- markdown: {
451
- rehypePlugins: [
452
- + rehypeHeadingIds,
453
- otherPluginThatReliesOnHeadingIDs,
454
- ],
455
- },
456
- }
457
- ```
458
-
459
- ### Patch Changes
460
-
461
- - [#5667](https://github.com/withastro/astro/pull/5667) [`a5ba4af79`](https://github.com/withastro/astro/commit/a5ba4af79930145f4edf66d45cd40ddad045cc86) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Chore: remove verbose "Now interiting Markdown plugins..." logs
462
-
463
- - [#5648](https://github.com/withastro/astro/pull/5648) [`853081d1c`](https://github.com/withastro/astro/commit/853081d1c857d8ad8a9634c37ed8fd123d32d241) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Prevent relative image paths in `src/content/`
464
-
465
- - Updated dependencies [[`853081d1c`](https://github.com/withastro/astro/commit/853081d1c857d8ad8a9634c37ed8fd123d32d241), [`2c65b433b`](https://github.com/withastro/astro/commit/2c65b433bf840a1bb93b0a1947df5949e33512ff)]:
466
- - @astrojs/markdown-remark@1.2.0
467
-
468
- ## 0.13.0
469
-
470
- ### Minor Changes
471
-
472
- - [#5291](https://github.com/withastro/astro/pull/5291) [`5ec0f6ed5`](https://github.com/withastro/astro/commit/5ec0f6ed55b0a14a9663a90a03428345baf126bd) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Introduce Content Collections experimental API
473
- - Organize your Markdown and MDX content into easy-to-manage collections.
474
- - Add type safety to your frontmatter with schemas.
475
- - Generate landing pages, static routes, and SSR endpoints from your content using the collection query APIs.
476
-
477
- ## 0.12.2
478
-
479
- ### Patch Changes
480
-
481
- - [#5586](https://github.com/withastro/astro/pull/5586) [`f4ff69a3c`](https://github.com/withastro/astro/commit/f4ff69a3cd874c8804c6d01c7cbbaed8a8e90be7) Thanks [@delucis](https://github.com/delucis)! - Fix link in MDX integration README
482
-
483
- - [#5570](https://github.com/withastro/astro/pull/5570) [`3f811eb68`](https://github.com/withastro/astro/commit/3f811eb682d55bd1f908f9b4bc3b795d2859d713) Thanks [@sarah11918](https://github.com/sarah11918)! - Revise README
484
-
485
- ## 0.12.1
486
-
487
- ### Patch Changes
488
-
489
- - [#5522](https://github.com/withastro/astro/pull/5522) [`efc4363e0`](https://github.com/withastro/astro/commit/efc4363e0baf7f92900e20af339811bb3df42b0e) Thanks [@delucis](https://github.com/delucis)! - Support use of `<Fragment>` in MDX files rendered with `<Content />` component
490
-
491
- ## 0.12.0
492
-
493
- ### Minor Changes
494
-
495
- - [#5427](https://github.com/withastro/astro/pull/5427) [`2a1c085b1`](https://github.com/withastro/astro/commit/2a1c085b199f24e34424ec8c19041c03602c53c5) Thanks [@backflip](https://github.com/backflip)! - Uses remark-rehype options from astro.config.mjs
496
-
497
- ### Patch Changes
498
-
499
- - [#5448](https://github.com/withastro/astro/pull/5448) [`ef2ffc7ae`](https://github.com/withastro/astro/commit/ef2ffc7ae9ff554860238ecd2fb3bf6d82b5801b) Thanks [@delucis](https://github.com/delucis)! - Fix broken link in README
500
-
501
- ## 0.11.6
502
-
503
- ### Patch Changes
504
-
505
- - [#5335](https://github.com/withastro/astro/pull/5335) [`dca762cf7`](https://github.com/withastro/astro/commit/dca762cf734a657d8f126fd6958892b6163a4f67) Thanks [@bluwy](https://github.com/bluwy)! - Preserve code element node `data.meta` in `properties.metastring` for rehype syntax highlighters, like `rehype-pretty-code``
506
-
507
- ## 0.11.5
508
-
509
- ### Patch Changes
510
-
511
- - [#5146](https://github.com/withastro/astro/pull/5146) [`308e565ad`](https://github.com/withastro/astro/commit/308e565ad39957e3353d72ca5d3bbce1a1b45008) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Support recmaPlugins config option
512
-
513
- ## 0.11.4
514
-
515
- ### Patch Changes
516
-
517
- - [#4953](https://github.com/withastro/astro/pull/4953) [`a59731995`](https://github.com/withastro/astro/commit/a59731995b93ae69c21dc3adc5c8b482b466d12e) Thanks [@bluwy](https://github.com/bluwy)! - Log markdown hints with console.info
518
-
519
- ## 0.11.3
520
-
521
- ### Patch Changes
522
-
523
- - [#4842](https://github.com/withastro/astro/pull/4842) [`812658ad2`](https://github.com/withastro/astro/commit/812658ad2ab3732a99e35c4fd903e302e723db46) Thanks [@bluwy](https://github.com/bluwy)! - Add missing dependencies, support strict dependency installation (e.g. pnpm)
524
-
525
- ## 0.11.2
526
-
527
- ### Patch Changes
528
-
529
- - [#4700](https://github.com/withastro/astro/pull/4700) [`e5f71142e`](https://github.com/withastro/astro/commit/e5f71142eb62bd72456e889dad5774347c3753f2) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Document MDXLayoutProps utility type
530
-
531
- - [#4858](https://github.com/withastro/astro/pull/4858) [`58a2dca22`](https://github.com/withastro/astro/commit/58a2dca2286cb14f6211cf51267c02447e78433a) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Correctly parse import.meta.env in MDX files
532
-
533
- ## 0.11.1
534
-
535
- ### Patch Changes
536
-
537
- - [#4588](https://github.com/withastro/astro/pull/4588) [`db38f61b2`](https://github.com/withastro/astro/commit/db38f61b2b2dc55f03b28797d19b163b1940f1c8) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: Add GFM and Smartypants to MDX by default
538
-
539
- ## 0.11.0
540
-
541
- ### Minor Changes
542
-
543
- - [#4504](https://github.com/withastro/astro/pull/4504) [`8f8dff4d3`](https://github.com/withastro/astro/commit/8f8dff4d339a3a12ee155d81a97132032ef3b622) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Introduce new `extendPlugins` configuration option. This defaults to inheriting all remark and rehype plugins from your `markdown` config, with options to use either Astro's defaults or no inheritance at all.
544
-
545
- ## 0.10.3
546
-
547
- ### Patch Changes
548
-
549
- - [#4519](https://github.com/withastro/astro/pull/4519) [`a2e8e76c3`](https://github.com/withastro/astro/commit/a2e8e76c303e8d6f39c24c122905a10f06907997) Thanks [@JuanM04](https://github.com/JuanM04)! - Upgraded Shiki to v0.11.1
550
-
551
- - [#4530](https://github.com/withastro/astro/pull/4530) [`8504cd79b`](https://github.com/withastro/astro/commit/8504cd79b708e0d3bf1a2bb4ff9b86936bdd692b) Thanks [@kylebutts](https://github.com/kylebutts)! - Add custom components to README
552
-
553
- ## 0.10.2
554
-
555
- ### Patch Changes
556
-
557
- - [#4423](https://github.com/withastro/astro/pull/4423) [`d4cd7a59f`](https://github.com/withastro/astro/commit/d4cd7a59fd38d411c442a818cfaab40f74106628) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Update Markdown type signature to match new markdown plugin,and update top-level layout props for better alignment
558
-
559
- ## 0.10.2-next.0
560
-
561
- ### Patch Changes
562
-
563
- - [#4423](https://github.com/withastro/astro/pull/4423) [`d4cd7a59f`](https://github.com/withastro/astro/commit/d4cd7a59fd38d411c442a818cfaab40f74106628) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Update Markdown type signature to match new markdown plugin,and update top-level layout props for better alignment
564
-
565
- ## 0.10.1
566
-
567
- ### Patch Changes
568
-
569
- - [#4443](https://github.com/withastro/astro/pull/4443) [`adb207979`](https://github.com/withastro/astro/commit/adb20797962c280d4d38f335f577fd52a1b48d4b) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix MDX style imports when layout is not applied
570
-
571
- * [#4428](https://github.com/withastro/astro/pull/4428) [`a2414bf59`](https://github.com/withastro/astro/commit/a2414bf59e2e2cd633aece68e724401c4ad281b9) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix dev server reload performance when globbing from an MDX layout
572
-
573
- ## 0.10.0
574
-
575
- ### Minor Changes
576
-
577
- - [#4292](https://github.com/withastro/astro/pull/4292) [`f1a52c18a`](https://github.com/withastro/astro/commit/f1a52c18afe66e6d310743ae6884be76f69be265) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Switch from Shiki Twoslash to Astro's Shiki Markdown highlighter
578
-
579
- ## 0.9.0
580
-
581
- ### Minor Changes
582
-
583
- - [#4268](https://github.com/withastro/astro/pull/4268) [`f7afdb889`](https://github.com/withastro/astro/commit/f7afdb889fe4e97177958c8ec92f80c5f6e5cb51) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Align MD with MDX on layout props and "glob" import results:
584
- - Add `Content` to MDX
585
- - Add `file` and `url` to MDX frontmatter (layout import only)
586
- - Update glob types to reflect differences (lack of `rawContent` and `compiledContent`)
587
-
588
- ### Patch Changes
589
-
590
- - [#4272](https://github.com/withastro/astro/pull/4272) [`24d2f7a6e`](https://github.com/withastro/astro/commit/24d2f7a6e6700c10c863f826f37bb653d70e3a83) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Properly handle hydration for namespaced components
591
-
592
- ## 0.8.3
593
-
594
- ### Patch Changes
595
-
596
- - [#4248](https://github.com/withastro/astro/pull/4248) [`869d00935`](https://github.com/withastro/astro/commit/869d0093596b709cfcc1a1a95ee631b48d6d1c26) Thanks [@svemat01](https://github.com/svemat01)! - Load builtin rehype plugins before user plugins instead of after
597
-
598
- * [#4255](https://github.com/withastro/astro/pull/4255) [`411612808`](https://github.com/withastro/astro/commit/4116128082121ee276d51cb245bf8095be4728a1) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Pass injected frontmatter from remark and rehype plugins to layouts
599
-
600
- * Updated dependencies [[`1f0dd31d9`](https://github.com/withastro/astro/commit/1f0dd31d9239b5e3dca99c88d021e7a9a3e2054d)]:
601
- - @astrojs/prism@1.0.1
602
-
603
- ## 0.8.2
604
-
605
- ### Patch Changes
606
-
607
- - [#4237](https://github.com/withastro/astro/pull/4237) [`9d5ab5508`](https://github.com/withastro/astro/commit/9d5ab55086964fbede17da3d78c209c6d8d13711) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Update "Astro.props.content" -> "Astro.props.frontmatter" in README
608
-
609
- ## 0.8.1
610
-
611
- ### Patch Changes
612
-
613
- - Updated dependencies [[`04ad44563`](https://github.com/withastro/astro/commit/04ad445632c67bdd60c1704e1e0dcbcaa27b9308)]:
614
- - @astrojs/prism@1.0.0
615
-
616
- ## 0.8.0
617
-
618
- ### Minor Changes
619
-
620
- - [#4204](https://github.com/withastro/astro/pull/4204) [`4c2ca5352`](https://github.com/withastro/astro/commit/4c2ca5352d0c4119ed2a9e5e0b78ce71eb1b414a) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Remove `frontmatterOptions` from MDX config
621
-
622
- ### Patch Changes
623
-
624
- - [#4205](https://github.com/withastro/astro/pull/4205) [`6c9736cbc`](https://github.com/withastro/astro/commit/6c9736cbc90162f1de3ebccd7cfe98332749b639) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Add frontmatter injection instructions to README
625
-
626
- ## 0.7.0
627
-
628
- ### Minor Changes
629
-
630
- - [#4176](https://github.com/withastro/astro/pull/4176) [`2675b8633`](https://github.com/withastro/astro/commit/2675b8633c5d5c45b237ec87940d5eaf1bfb1b4b) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Support frontmatter injection for MD and MDX using remark and rehype plugins
631
-
632
- ### Patch Changes
633
-
634
- - [#4181](https://github.com/withastro/astro/pull/4181) [`77cede720`](https://github.com/withastro/astro/commit/77cede720b09bce34f29c3d2d8b505311ce876b1) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Make collect-headings rehype plugin non-overridable
635
-
636
- * [#4174](https://github.com/withastro/astro/pull/4174) [`8eb3a8c6d`](https://github.com/withastro/astro/commit/8eb3a8c6d9554707963c3a3bc36ed8b68d3cf0fb) Thanks [@matthewp](https://github.com/matthewp)! - Allows using React with automatic imports alongside MDX
637
-
638
- - [#4145](https://github.com/withastro/astro/pull/4145) [`c7efcf57e`](https://github.com/withastro/astro/commit/c7efcf57e00a0fcde3bc9f813e3cc59902bd484c) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Fix a missing newline bug when `layout` was set.
639
-
640
- ## 0.6.0
641
-
642
- ### Minor Changes
643
-
644
- - [#4134](https://github.com/withastro/astro/pull/4134) [`2968ba2b6`](https://github.com/withastro/astro/commit/2968ba2b6f00775b6e9872681b390cb466fdbfa2) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Add `headings` and `frontmatter` properties to layout props
645
-
646
- ## 0.5.0
647
-
648
- ### Minor Changes
649
-
650
- - [#4095](https://github.com/withastro/astro/pull/4095) [`40ef43a59`](https://github.com/withastro/astro/commit/40ef43a59b08a1a8fbcd9f4a53745a9636a4fbb9) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Add IDs to MDX headings and expose via getHeadings() export
651
-
652
- * [#4114](https://github.com/withastro/astro/pull/4114) [`64432bcb8`](https://github.com/withastro/astro/commit/64432bcb873efd0e4297c00fc9583a1fe516dfe7) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Refactor `@astrojs/mdx` and `@astrojs/markdown-remark` to use `@astrojs/prism` instead of duplicating the code
653
-
654
- ### Patch Changes
655
-
656
- - [#4112](https://github.com/withastro/astro/pull/4112) [`e33fc9bc4`](https://github.com/withastro/astro/commit/e33fc9bc46ff0a30013deb6dc76e545e70cc3a3e) Thanks [@matthewp](https://github.com/matthewp)! - Fix MDX working with a ts config file
657
-
658
- * [#4049](https://github.com/withastro/astro/pull/4049) [`b60cc0538`](https://github.com/withastro/astro/commit/b60cc0538bc5c68dd411117780d20d892530789d) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Improve `injectScript` handling for non-Astro pages
659
-
660
- * Updated dependencies [[`64432bcb8`](https://github.com/withastro/astro/commit/64432bcb873efd0e4297c00fc9583a1fe516dfe7)]:
661
- - @astrojs/prism@0.7.0
662
-
663
- ## 0.4.0
664
-
665
- ### Minor Changes
666
-
667
- - [#4088](https://github.com/withastro/astro/pull/4088) [`1743fe140`](https://github.com/withastro/astro/commit/1743fe140eb58d60e26cbd11a066bb60de046e0c) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Support "layout" frontmatter property
668
-
669
- ## 0.3.1
670
-
671
- ### Patch Changes
672
-
673
- - [#4076](https://github.com/withastro/astro/pull/4076) [`6120a71e5`](https://github.com/withastro/astro/commit/6120a71e5425ad55a17ddac800d64a3f50273bce) Thanks [@matthewp](https://github.com/matthewp)! - Ensure file and url are always present in MDX for Astro.glob
674
-
675
- ## 0.3.0
676
-
677
- ### Minor Changes
678
-
679
- - [#3977](https://github.com/withastro/astro/pull/3977) [`19433eb4a`](https://github.com/withastro/astro/commit/19433eb4a4441522f68492ca914ad2ab4f061343) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Add remarkPlugins and rehypePlugins to config, with the same default plugins as our standard Markdown parser
680
-
681
- * [#4002](https://github.com/withastro/astro/pull/4002) [`3b8a74452`](https://github.com/withastro/astro/commit/3b8a7445247221100462ba035f6778b43ea180e7) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Support Prism and Shiki syntax highlighting based on project config
682
-
683
- - [#3995](https://github.com/withastro/astro/pull/3995) [`b2b367c96`](https://github.com/withastro/astro/commit/b2b367c969493aaf21c974064beb241d05228066) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Support YAML frontmatter in MDX files
684
-
685
- ### Patch Changes
686
-
687
- - [#4050](https://github.com/withastro/astro/pull/4050) [`9ab66c4ba`](https://github.com/withastro/astro/commit/9ab66c4ba9bf2250990114c76b792f26d0694365) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Add support for injected "page-ssr" scripts
688
-
689
- * [#3981](https://github.com/withastro/astro/pull/3981) [`61fec6304`](https://github.com/withastro/astro/commit/61fec63044e1585348e8405bee6fdf4dec635efa) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Include page url in MDX glob result
690
-
691
- ## 0.2.1
692
-
693
- ### Patch Changes
694
-
695
- - [#3937](https://github.com/withastro/astro/pull/3937) [`31f9c0bf0`](https://github.com/withastro/astro/commit/31f9c0bf029ffa4b470e620f2c32e1370643e81e) Thanks [@delucis](https://github.com/delucis)! - Roll back supported Node engines
696
-
697
- ## 0.2.0
698
-
699
- ### Minor Changes
700
-
701
- - [#3914](https://github.com/withastro/astro/pull/3914) [`b48767985`](https://github.com/withastro/astro/commit/b48767985359bd359df8071324952ea5f2bc0d86) Thanks [@ran-dall](https://github.com/ran-dall)! - Rollback supported `node@16` version. Minimum versions are now `node@14.20.0` or `node@16.14.0`.
702
-
703
- ## 0.1.1
704
-
705
- ### Patch Changes
706
-
707
- - [#3885](https://github.com/withastro/astro/pull/3885) [`bf5d1cc1e`](https://github.com/withastro/astro/commit/bf5d1cc1e71da38a14658c615e9481f2145cc6e7) Thanks [@delucis](https://github.com/delucis)! - Integration README fixes
708
-
709
- ## 0.1.0
710
-
711
- ### Minor Changes
712
-
713
- - [#3871](https://github.com/withastro/astro/pull/3871) [`1cc5b7890`](https://github.com/withastro/astro/commit/1cc5b78905633608e5b07ad291f916f54e67feb1) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Update supported `node` versions. Minimum versions are now `node@14.20.0` or `node@16.16.0`.
714
-
715
- ## 0.0.3
716
-
717
- ### Patch Changes
718
-
719
- - [#3854](https://github.com/withastro/astro/pull/3854) [`b012ee55`](https://github.com/withastro/astro/commit/b012ee55b107dea0730286263b27d83e530fad5d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - [astro add] Support adapters and third party packages
720
-
721
- ## 0.0.2
722
-
723
- ### Patch Changes
724
-
725
- - [#3706](https://github.com/withastro/astro/pull/3706) [`032ad1c0`](https://github.com/withastro/astro/commit/032ad1c047a62dd663067cc562537d16f2872aa7) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Initial release! 🎉