gitbook-plugin-prism

WebJar for gitbook-plugin-prism

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

gitbook-plugin-prism
Last Version

Last Version

2.4.0
Release Date

Release Date

Type

Type

jar
Description

Description

gitbook-plugin-prism
WebJar for gitbook-plugin-prism
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/gaearon/gitbook-plugin-prism

Download gitbook-plugin-prism

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/gitbook-plugin-prism/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>gitbook-plugin-prism</artifactId>
    <version>2.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/gitbook-plugin-prism/
implementation 'org.webjars.npm:gitbook-plugin-prism:2.4.0'
// https://jarcasting.com/artifacts/org.webjars.npm/gitbook-plugin-prism/
implementation ("org.webjars.npm:gitbook-plugin-prism:2.4.0")
'org.webjars.npm:gitbook-plugin-prism:jar:2.4.0'
<dependency org="org.webjars.npm" name="gitbook-plugin-prism" rev="2.4.0">
  <artifact name="gitbook-plugin-prism" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='gitbook-plugin-prism', version='2.4.0')
)
libraryDependencies += "org.webjars.npm" % "gitbook-plugin-prism" % "2.4.0"
[org.webjars.npm/gitbook-plugin-prism "2.4.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.npm : cheerio jar [0.22.0]
org.webjars.npm : mkdirp jar [0.5.1]
org.webjars.npm : prismjs jar [1.15.0,2)

Project Modules

There are no modules declared in this project.

Gitbook Plugin for Prism

NPM

Before

After

Usage

Add the plugin to your book.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"
    ]
  }
}

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

Versions

Version
2.4.0