mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Updated highlight.js example (#2568)
* Update highlight.js version in example * Fix for instant navigation
This commit is contained in:
parent
21b543a038
commit
eeb3b239dc
@ -56,17 +56,19 @@ configuring syntax highlighting of code blocks:
|
||||
=== "docs/javascripts/config.js"
|
||||
|
||||
``` js
|
||||
hljs.initHighlighting()
|
||||
document$.subscribe(() => {
|
||||
hljs.highlightAll()
|
||||
})
|
||||
```
|
||||
|
||||
=== "mkdocs.yml"
|
||||
|
||||
``` yaml
|
||||
extra_javascript:
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js
|
||||
- javascripts/config.js
|
||||
extra_css:
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/default.min.css
|
||||
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/default.min.css
|
||||
```
|
||||
|
||||
Note that Highlight.js has no affiliation with the Highlight extension.
|
||||
|
Loading…
Reference in New Issue
Block a user