chore: support blockquote dark mode & simplify markdown wrapper (#151)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
云游君 2021-07-15 16:34:52 +08:00 committed by GitHub
parent 676d01be6c
commit 9df34aa8c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

2
.gitignore vendored
View File

@ -7,3 +7,5 @@ dist-ssr
node_modules node_modules
# intellij stuff # intellij stuff
.idea/ .idea/
# logs
*.log

View File

@ -18,4 +18,4 @@ function vitesse() {
} }
``` ```
Check out the [GitHub repo](https://github.com/antfu/vitesse) for more details. > Check out the [GitHub repo](https://github.com/antfu/vitesse) for more details.

View File

@ -13,6 +13,8 @@ import Prism from 'markdown-it-prism'
// @ts-expect-error missing types // @ts-expect-error missing types
import LinkAttributes from 'markdown-it-link-attributes' import LinkAttributes from 'markdown-it-link-attributes'
const markdownWrapperClasses = 'prose prose-sm m-auto text-left'
export default defineConfig({ export default defineConfig({
resolve: { resolve: {
alias: { alias: {
@ -34,7 +36,7 @@ export default defineConfig({
// https://github.com/antfu/vite-plugin-md // https://github.com/antfu/vite-plugin-md
Markdown({ Markdown({
wrapperClasses: 'prose prose-sm m-auto text-left', wrapperClasses: markdownWrapperClasses,
headEnabled: true, headEnabled: true,
markdownItSetup(md) { markdownItSetup(md) {
// https://prismjs.com/ // https://prismjs.com/
@ -75,7 +77,7 @@ export default defineConfig({
// https://github.com/antfu/vite-plugin-windicss // https://github.com/antfu/vite-plugin-windicss
WindiCSS({ WindiCSS({
safelist: 'prose prose-sm m-auto text-left', safelist: markdownWrapperClasses,
}), }),
// https://github.com/antfu/vite-plugin-pwa // https://github.com/antfu/vite-plugin-pwa