Add name link

This commit is contained in:
qingwei.li
2017-01-12 20:16:18 +08:00
parent 6c6f687925
commit 4a7df99224
3 changed files with 4 additions and 3 deletions

View File

@@ -133,7 +133,7 @@ export function renderSidebar (content) {
html = tpl.tree(genTree(toc, OPTIONS.maxLevel), '<ul>')
}
html = (OPTIONS.name ? `<h1><a href="/">${OPTIONS.name}</a></h1>` : '') + html
html = (OPTIONS.name ? `<h1><a href="${OPTIONS.nameLink}">${OPTIONS.name}</a></h1>` : '') + html
renderTo('aside.sidebar', html)
const target = event.activeLink('aside.sidebar', true)
if (target) renderSubSidebar(target)