Coder Social home page Coder Social logo

plugin-highlight's Introduction

Code highlighting in GitBook

This plugin is the default GitBook plugin used to highlight code blocks.

You can remove it using:

{
    plugins: ["-highlight"]
}

plugin-highlight's People

Contributors

ariafallah avatar jpreynat avatar samypesse avatar soreine avatar twang2218 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plugin-highlight's Issues

Where is highlight.js?

If I want to add a new language for syntax highlighting, where would I need to place the file? I can't find highlight.js anywhere on my machine, although I built a few Gitbooks with JS(ON) highlighting. There's no subfolder node_modules in gitbook-plugin-highlight, where I had expected the files of highlight.js...

Where I can find the documentation on how to install and start to use it?

Hey,
I am new into CS and have little idea about npm and node.js, I tried to read the code but still not know how to use it.

This is my book.json file:
{
"gitbook": "2.x.x",
"plugins": [
"katex",
"include-codeblock",
"image-captions",
"search",
"codesnippet",
"katex",
"highlight"
],
"pluginsConfig": {
"include-codeblock": {
"unindent": true
}
}
}

however, after I enable "highlight", I still don't know how to start using it. For example if I had a code block like this:

int main(){
    cout << "Hello world" << endl;
    return 0;
}
and I want to highlight "return 0", how can I do that?

Thanks...!!

Python syntax highlighting not working?

This code is seen with proper highlighting here.

from Crypto.Cipher import DES3
from Crypto import Random

key = b'Sixteen byte key
iv = Random.new().read(DES3.block_size)
cipher = DES3.new(key, DES3.MODE_OFB, iv)
plaintext = b'Sample plaintext'
msg = iv + cipher.encrypt(plaintext)

But on Gitbook it appears without the highlighting :
screen shot 2016-10-26 at 4 07 23 pm

I am using triple backquotes followed by python and ending the code chunk with triple backquotes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.