Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

Commit 9e12f34

Browse files
committed
Load pages instantly and highlight code after each navigation
1 parent 062dc9b commit 9e12f34

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎admin/assets/hljs.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
document.addEventListener('DOMContentLoaded', (event) => {
1+
// Material's document$ emits on the first load and after every instant navigation.
2+
document$.subscribe(() => {
23
hljs.highlightAll();
34
});

‎mkdocs.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ theme:
2727
icon: material/brightness-4
2828
name: Switch to light mode
2929
features:
30-
# - navigation.instant
31-
# - navigation.instant.prefetch
32-
# - navigation.instant.progress
30+
- navigation.instant
31+
- navigation.instant.prefetch
32+
- navigation.instant.progress
3333
- content.code.copy
3434
- navigation.footer
3535
- content.action.edit

0 commit comments

Comments
 (0)