Gitbook Plugin for Prism
Before
After
Usage
Add the plugin to yourbook.json
, and disable default GitBook code highlighting:{
"plugins": ["prism", "-highlight"]
}
Options
css
Override default styles. All css files must reside in the same folder."pluginsConfig": {
"prism": {
"css": [
"prismjs/themes/prism-solarizedlight.css"
]
}
}
lang
Support non-standard syntax prefixes by aliasing existing prefixes."pluginsConfig": {
"prism": {
"lang": {
"flow": "typescript"
}
}
}
ignore
Due to other plugins using code block notion to denote other functionality, you can ignore certain langs"pluginsConfig": {
"prism": {
"ignore": [
"mermaid",
"eval-js"
]
}
}