
Like this picture, when I change the codeBgColor into white, some words become invisible.
I have used Prism.js but failed.
Yes, would you mind give me some suggestions?
You can import theme stylesheet in index.styl or Layout.vue:
@import "prismjs/themes/prism-tomorrow.css"
// currently used, but you can specify another
Also, we have planned to enhance code snippet in the next two months.
Like https://github.com/vuejs/vuepress/issues/736, currently, when we import another Prism theme, the default theme (Tomorrow) hard-coded in layout.vue will override the one imported.
@kidonng thank you for your working, is there some docs to be written in the future?
@kidonng thank you for your working, is there some docs to be written in the future?
About what? If you are looking for a minimal workaround, check out Theme Inheritance feature introduced in 1.x.
Here's an example used in my project, it is basically a copy of layouts/Layout.vue (with Prism theme removed) and utils/index.js (which can't be inherited). Add these files and you should be able to customize code background as you wish 馃槂
@kidonng
thank you very much, I think we could write some documentation to help people who need help about this, it is a good job, isn't it?
thank you very much, I think we could write some documentation to help people who need help about this, it is a good job, isn't it?
It is better to fix the problem instead 馃榿 I have created a pull request.
As v1.0.3 has released, you should be able to customize the code theme now.
Most helpful comment
You can import theme stylesheet in
index.stylorLayout.vue:Also, we have planned to enhance code snippet in the next two months.