Enable using Prism for syntax highlighting (#735)

* Enable user to use prism.js as syntax highlighter

* add package-lock

* if 'usePrism' is true, use prismjs on all languages

* don't get lang by hljs if use prism

* Update api-site-config.md

* Update api-doc-markdown.md

* only load prism css when usePrism is true
This commit is contained in:
Endilie Yacop Sucipto 2018-06-10 02:38:01 +08:00 committed by Yangshun Tay
parent 16da2fdbf6
commit c8bc00a3a7
10 changed files with 292 additions and 12 deletions

View file

@ -175,7 +175,12 @@ class Head extends React.Component {
}}
/>
)}
{this.props.config.usePrism && (
<link
rel="stylesheet"
href={this.props.config.baseUrl + 'css/prism.css'}
/>
)}
{/* Site defined code. Keep these at the end to avoid overriding. */}
<link
rel="stylesheet"