You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.test(/\.(vue|md)$/) // <-- allows Vue to compile Markdown files
68
+
},
69
+
}
70
+
```
71
+
72
+
<br></details>
36
73
37
74
## Import Markdown as Vue components
38
75
@@ -123,7 +160,7 @@ npm i @unhead/vue
123
160
```js
124
161
// vite.config.js
125
162
importVuefrom'@vitejs/plugin-vue'
126
-
importMarkdownfrom'vite-plugin-vue-markdown'
163
+
importMarkdownfrom'unplugin-vue-markdown'
127
164
128
165
exportdefault {
129
166
plugins: [
@@ -164,11 +201,11 @@ For more options available, please refer to [`@unhead/vue`'s docs](https://unhea
164
201
165
202
## Options
166
203
167
-
`vite-plugin-vue-markdown` uses [`markdown-it`](https://github.com/markdown-it/markdown-it) under the hood, see [`markdown-it`'s docs](https://markdown-it.github.io/markdown-it/) for more details
204
+
`unplugin-vue-markdown` uses [`markdown-it`](https://github.com/markdown-it/markdown-it) under the hood, see [`markdown-it`'s docs](https://markdown-it.github.io/markdown-it/) for more details
168
205
169
206
```ts
170
207
// vite.config.js
171
-
importMarkdownfrom'vite-plugin-vue-markdown'
208
+
importMarkdownfrom'unplugin-vue-markdown/vite'
172
209
importMarkdownItAnchorfrom'markdown-it-anchor'
173
210
importMarkdownItPrismfrom'markdown-it-prism'
174
211
@@ -201,19 +238,23 @@ See [the tsdoc](./src/types.ts) for more advanced options
201
238
202
239
See the [/example](./example).
203
240
204
-
Or the pre-configured starter template [Vitesse](https://github.com/antfu/vitesse).
241
+
Or the pre-configured Markdown template [Vitesse](https://github.com/antfu/vitesse).
205
242
206
243
## Integrations
207
244
208
-
### Work with [vite-plugin-voie](https://github.com/vamplate/vite-plugin-voie)
245
+
### Work with [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages)
209
246
210
247
```ts
211
-
importMarkdownfrom'vite-plugin-vue-markdown'
212
-
importVoiefrom'vite-plugin-voie'
248
+
importVuefrom'@vitejs/plugin-vue'
249
+
importMarkdownfrom'unplugin-vue-markdown/vite'
250
+
importPagesfrom'vite-plugin-pages'
213
251
214
252
exportdefault {
215
253
plugins: [
216
-
Voie({
254
+
Vue({
255
+
include: [/\.vue$/,/\.md$/],
256
+
}),
257
+
Pages({
217
258
extensions: ['vue', 'md'],
218
259
}),
219
260
Markdown()
@@ -223,20 +264,23 @@ export default {
223
264
224
265
Put your markdown under `./src/pages/xx.md`, then you can access the page via route `/xx`.
225
266
267
+
### Work with [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
226
268
227
-
### Work with [vite-plugin-components](https://github.com/antfu/vite-plugin-components)
228
-
229
-
`vite-plugin-components` allows you to do on-demand components auto importing without worrying about registration.
269
+
`vite-plugin-components` allows you to do on-demand components auto-importing without worrying about registration.
0 commit comments