-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Is there any possibility to change the prism.js theme? #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Of course we can. e.g. Create a @import "~prismjs/themes/prism-dark.css" |
Where should I place prism theme css? When I place it project root and .vuepress/prismjs/themes "module not found" error occurred. |
For those who are wondering about how you might do it... If you use the vuepress default-theme, it will auto-import prism-coy theme. I am using a small hack to remove it from the Layout.vue file during build setup, and then importing a new theme css file in the "scripts": {
"remove-prism": "sed -i.bak -e \":a\" -e 'N' -e '$!ba' -e \"s/<style src=\\\"prismjs.*css\\\"><\\/style>/ /\" node_modules/@vuepress/theme-default/layouts/Layout.vue",
"docs:dev": "yarn remove-prism && vuepress dev docs",
"docs:build": "yarn remove-prism && vuepress build docs"
}, Would be nice to have a better way to change the theme. |
Any update on this? |
@avivace it was fixed with https://github.com/vuejs/vuepress/pull/1707/files |
@darrenjennings Got it. I was mixing this problem up with the styles "code.styl" is pushing on the default them. Thanks. |
I would like to know if is it possible to change the prism theme used to do the highlighting?
The text was updated successfully, but these errors were encountered: