fix: inline white spaces in ssg

This commit is contained in:
Anthony Fu 2021-08-01 03:03:20 +08:00
parent 91f08f3b13
commit 8363a5f955
3 changed files with 23 additions and 22 deletions

View File

@ -42,7 +42,7 @@
"vite-plugin-pwa": "^0.9.3",
"vite-plugin-vue-layouts": "^0.3.1",
"vite-plugin-windicss": "^1.2.7",
"vite-ssg": "^0.14.4",
"vite-ssg": "^0.14.5",
"vue-tsc": "^0.2.2"
}
}

View File

@ -29,7 +29,7 @@ specifiers:
vite-plugin-pwa: ^0.9.3
vite-plugin-vue-layouts: ^0.3.1
vite-plugin-windicss: ^1.2.7
vite-ssg: ^0.14.4
vite-ssg: ^0.14.5
vue: ^3.1.5
vue-demi: ^0.11.2
vue-global-api: ^0.4.1
@ -73,7 +73,7 @@ devDependencies:
vite-plugin-pwa: 0.9.3_vite@2.4.4
vite-plugin-vue-layouts: 0.3.1_vite@2.4.4
vite-plugin-windicss: 1.2.7_vite@2.4.4
vite-ssg: 0.14.4_4d4bc60af3721dd3f198b31f3d098737
vite-ssg: 0.14.5_4d4bc60af3721dd3f198b31f3d098737
vue-tsc: 0.2.2_typescript@4.3.5
packages:
@ -5808,8 +5808,8 @@ packages:
- supports-color
dev: true
/vite-ssg/0.14.4_4d4bc60af3721dd3f198b31f3d098737:
resolution: {integrity: sha512-Y2Q8Mx1FBqNcuAzRc9fx7N43uIYpkvrt0GssMa3hFVnXKZ7Zi1A0fvgvShwgH7WjZCwucZQFA5v40IvCaz1bOg==}
/vite-ssg/0.14.5_4d4bc60af3721dd3f198b31f3d098737:
resolution: {integrity: sha512-ony+HDOy+VoNboC2nD8WRTz860vhy+xMVxMtY0G6FQ1pCD06qfxCZobx3Lncza2IPB3ozmSVQNQd3W4apJI1pA==}
engines: {node: '>=14.0.0'}
hasBin: true
peerDependencies:

View File

@ -34,23 +34,6 @@ export default defineConfig({
// https://github.com/JohnCampionJr/vite-plugin-vue-layouts
Layouts(),
// https://github.com/antfu/vite-plugin-md
Markdown({
wrapperClasses: markdownWrapperClasses,
headEnabled: true,
markdownItSetup(md) {
// https://prismjs.com/
md.use(Prism)
md.use(LinkAttributes, {
pattern: /^https?:\/\//,
attrs: {
target: '_blank',
rel: 'noopener',
},
})
},
}),
// https://github.com/antfu/vite-plugin-components
ViteComponents({
// allow auto load markdown components under `./src/components/`
@ -80,6 +63,24 @@ export default defineConfig({
safelist: markdownWrapperClasses,
}),
// https://github.com/antfu/vite-plugin-md
// Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
Markdown({
wrapperClasses: markdownWrapperClasses,
headEnabled: true,
markdownItSetup(md) {
// https://prismjs.com/
md.use(Prism)
md.use(LinkAttributes, {
pattern: /^https?:\/\//,
attrs: {
target: '_blank',
rel: 'noopener',
},
})
},
}),
// https://github.com/antfu/vite-plugin-pwa
VitePWA({
registerType: 'autoUpdate',