Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Gitbook plugin for Prism highlighting
https://github.com/gaearon/gitbook-plugin-prism

Last synced: 8 days ago
JSON representation

Gitbook plugin for Prism highlighting

Awesome Lists containing this project

README

        

Gitbook Plugin for [Prism](http://prismjs.com/)
==============

[![NPM](http://img.shields.io/npm/v/gitbook-plugin-prism.svg?style=flat-square&label=npm)](https://www.npmjs.com/package/gitbook-plugin-prism)

##### Before

##### After

## Usage

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

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

## Options

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

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

### `lang`
Support non-standard syntax prefixes by aliasing existing prefixes.

```json
"pluginsConfig": {
"prism": {
"lang": {
"flow": "typescript"
}
}
}
```

### `ignore`
Due to other plugins using code block notion to denote other functionality, you can ignore certain langs

```json
"pluginsConfig": {
"prism": {
"ignore": [
"mermaid",
"eval-js"
]
}
}
```

### Prism Themes

[https://github.com/PrismJS/prism](https://github.com/PrismJS/)

#### Okaidia `prismjs/themes/prism-okaidia.css`
![Okaidia](http://i.imgur.com/uhe0yQY.png)

#### Solarized Light `prismjs/themes/prism-solarizedlight.css`
![Solarized Light](http://i.imgur.com/71sT5XB.png)

#### Tomorrow `prismjs/themes/prism-tomorrow.css`
![Tomorrow](http://i.imgur.com/Li3AHXU.png)

#### Dark `prismjs/themes/prism-dark.css`
![Dark](http://i.imgur.com/vA5P6fy.png)

#### Coy `prismjs/themes/prism-coy.css`
![Coy](http://i.imgur.com/kSJP9tq.png)

## Atelierbram Themes

[https://github.com/atelierbram/syntax-highlighting](https://github.com/atelierbram/syntax-highlighting)

#### Base16 Ocean Dark `syntax-highlighting/assets/css/prism/prism-base16-ocean.dark.css`
![Base16 Ocean Dark](http://i.imgur.com/REJCdrA.png)

#### Google Light `syntax-highlighting/assets/css/prism/prism-base16-google.light.css`
![Google Light](http://i.imgur.com/TyBYmSu.png)

#### Xonokai `syntax-highlighting/assets/css/prism/prism-xonokai.css`
![Google Light](http://i.imgur.com/fPjEEv8.png)

## Credits

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

## License

Apache 2