Skip to content

Commit 16e3709

Browse files
committed
Switch to highlightjs to cut down on page size
1 parent 31dd6a7 commit 16e3709

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"es6": true,
55
"node": true
66
},
7-
"ignorePatterns": ["site/"],
7+
"ignorePatterns": ["docs/", "site/"],
88
"extends": "eslint:recommended",
99
"globals": {
1010
"Atomics": "readonly",

docs/assets/script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hljs.initHighlighting();

docs/assets/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
.hljs-string, .hljs-literal, .hljs-number {
2+
color: var(--md-code-hl-string-color);
3+
}
4+
.hljs-comment {
5+
color: var(--md-code-hl-comment-color);
6+
}
7+
18
label {
29
cursor: pointer;
310
}

docs/mkdocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ theme:
1616

1717
extra_css:
1818
- assets/style.css
19+
extra_javascript:
20+
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js
21+
- assets/script.js
1922

2023
plugins:
2124
- search
@@ -26,7 +29,8 @@ plugins:
2629
- gen_pages.py
2730

2831
markdown_extensions:
29-
- pymdownx.highlight
32+
- pymdownx.highlight:
33+
use_pygments: false
3034
- pymdownx.magiclink
3135
- pymdownx.superfences
3236
- pymdownx.details

0 commit comments

Comments
 (0)