[opt] wiki toc
This commit is contained in:
parent
ea97f0f6cd
commit
977d3264b8
|
@ -30,7 +30,7 @@ function layoutDocTree(pages) {
|
||||||
el += '<div class="doc-tree' + isActive + '">';
|
el += '<div class="doc-tree' + isActive + '">';
|
||||||
if (proj.pages.length > 1) {
|
if (proj.pages.length > 1) {
|
||||||
let href = url_for(p.path);
|
let href = url_for(p.path);
|
||||||
if (i == 0) {
|
if (p.is_homepage) {
|
||||||
href += '#start'
|
href += '#start'
|
||||||
}
|
}
|
||||||
el += '<a class="doc-tree-link' + isActive + '" href="' + href + '">';
|
el += '<a class="doc-tree-link' + isActive + '" href="' + href + '">';
|
||||||
|
|
|
@ -95,6 +95,7 @@ module.exports = ctx => {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
proj.homepage = proj_pages[0]
|
proj.homepage = proj_pages[0]
|
||||||
|
proj.homepage.is_homepage = true
|
||||||
// 内页按 section 分组
|
// 内页按 section 分组
|
||||||
var section_configs = []
|
var section_configs = []
|
||||||
if (proj.sections) {
|
if (proj.sections) {
|
||||||
|
|
Loading…
Reference in New Issue