gitbook plugin [updated pkgs] https://github.com/windhamdavid/gitbook-plugin-prism-dw

Robert McGuinness 446f69d6cd fix path creation for prism-pdf.css fix 8 years ago
.eslintrc a97ccd23d0 Fixes #9: Theme not correclty applied to code blocks 8 years ago
.gitignore a97ccd23d0 Fixes #9: Theme not correclty applied to code blocks 8 years ago
.travis.yml a97ccd23d0 Fixes #9: Theme not correclty applied to code blocks 8 years ago
LICENSE 828f3df964 Initial commit 10 years ago
README.md 1ac824d498 header changes in README 8 years ago
index.js 446f69d6cd fix path creation for prism-pdf.css fix 8 years ago
package.json f64ba3a787 Remove ::selection background color from code block in PDFs. Fixes #11. 8 years ago
prism-pdf.css f64ba3a787 Remove ::selection background color from code block in PDFs. Fixes #11. 8 years ago
test.js f64ba3a787 Remove ::selection background color from code block in PDFs. Fixes #11. 8 years ago

README.md

Gitbook Plugin for Prism

Before

After

Usage

Add the plugin to your book.json, and disable default GitBook code highlighting:

{
  "plugins": ["prism", "-highlight"]
}

Options

Override default styles. All css files must reside in the same folder.

"pluginsConfig": {  
  "prism": {
    "css": [
      "prismjs/themes/prism-solarizedlight.css"
    ]
  }
}

Prism Themes

https://github.com/PrismJS/prism

Okaidia prismjs/themes/prism-okaidia.css

Okaidia

Solarized Light prismjs/themes/prism-solarizedlight.css

Solarized Light

Tomorrow prismjs/themes/prism-tomorrow.css

Tomorrow

Dark prismjs/themes/prism-dark.css

Dark

Coy prismjs/themes/prism-coy.css

Coy

Atelierbram Themes

https://github.com/atelierbram/syntax-highlighting

Base16 Ocean Dark syntax-highlighting/assets/css/prism/prism-base16-ocean.dark.css

Base16 Ocean Dark

Google Light syntax-highlighting/assets/css/prism/prism-base16-google.light.css

Google Light

Xonokai syntax-highlighting/assets/css/prism/prism-xonokai.css

Google Light

Credits

Originally based on https://github.com/spricity/google_code_prettify.

License

Apache 2