diff --git a/docs/index.html b/docs/index.html index 050b21dde..f8487ddb3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -98,6 +98,7 @@ + - - + + ``` -To use the new languages, make sure the code block label matches the part after `prism-` in the file name. FOr example, for `prism-bash.js` write a code block labeled with `bash` like this: +To enable syntax highlighting, wrap each code block in triple backticks with the [language](https://prismjs.com/#supported-languages) specified on the first line: ```` +```html +
This is a paragraph
+Docsify +``` + ```bash echo "hello" ``` + +```php +function getAdder(int $x): int +{ + return 123; +} +``` ```` -?> Note that with GitHub-flavored markdown, `sh` and `bash` are effectively aliases of each other, but this is not the case with Prism. So using `sh` will not enable `bash` syntax in this case. +The above markdown will be rendered as: -For `prism-php.js`, it would be: +```html +This is a paragraph
+Docsify +``` + +```bash +echo "hello" +``` -```` ```php function getAdder(int $x): int { return 123; } ``` -```` - -?> Check the [component files](https://github.com/PrismJS/prism/tree/gh-pages/components) list for more options.