Skip to content

Commit 62b4fc2

Browse files
soulflyQingWei-Li
authored andcommitted
Ability to set a custom page title via _sidebar.md (#557)
* Ability to set a custom page title via _sidebar.md * fixes after review
1 parent a91d2da commit 62b4fc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/event/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function getAndActive(router, el, isParent, autoTitle) {
7878
})
7979

8080
if (autoTitle) {
81-
dom.$.title = target ? `${target.innerText} - ${title}` : title
81+
dom.$.title = target ? (target.title || `${target.innerText} - ${title}`) : title
8282
}
8383

8484
return target

0 commit comments

Comments
 (0)