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

@ -173,6 +173,8 @@ h1 {
`users` - The `users` array mentioned earlier.
`usePrism` - Array of languages to use Prism syntax highlighter. Refer to [Using Prism as additional syntax highlighter](api-doc-markdown.md#using-prism-as-additional-syntax-highlighter). Set it to `true` to use Prism on all languages.
`wrapPagesHTML` - Boolean flag to indicate whether `html` files in `/pages` should be wrapped with Docusaurus site styles, header and footer. This feature is experimental and relies on the files being `html` fragments instead of complete pages. It inserts the contents of your `html` file with no extra processing. Defaults to `false`.
Users can also add their own custom fields if they wish to provide some data across different files.