Skip to content

Commit 7be6baa

Browse files
committed
Fix nav highlight
1 parent 24ab3d4 commit 7be6baa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { load, camel2kebab, isNil, getRoute } from './util'
2-
import { scrollIntoView } from './event'
2+
import { scrollIntoView, activeLink } from './event'
33
import * as render from './render'
44

55
const OPTIONS = {
@@ -92,7 +92,10 @@ const Docsify = function () {
9292
const dom = document.querySelector(OPTIONS.el) || document.body
9393
const replace = dom !== document.body
9494
const main = function () {
95-
mainRender(_ => scrollIntoView())
95+
mainRender(_ => {
96+
scrollIntoView()
97+
activeLink('nav')
98+
})
9699
}
97100

98101
// Render app

0 commit comments

Comments
 (0)