mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 09:07:29 +02:00
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:
parent
16da2fdbf6
commit
c8bc00a3a7
10 changed files with 292 additions and 12 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue