diff --git a/_config.yml b/_config.yml index fe4dfda..02870d9 100755 --- a/_config.yml +++ b/_config.yml @@ -28,7 +28,7 @@ sidebar: index: welcome, recent, timeline # for home/wiki/categories/tags/archives/404 pages page: welcome, toc # for pages using 'layout:page' post: toc, ghrepo, ghissues # for pages using 'layout:post' - wiki: toc, ghrepo, ghissues, related # for pages using 'layout:wiki' + wiki: ghrepo, toc, ghissues, related # for pages using 'layout:wiki' ######## Index ######## post-index: # 近期发布 分类 标签 归档 and ... diff --git a/layout/_partial/main/navbar/list_wiki.ejs b/layout/_partial/main/navbar/list_wiki.ejs index d7ece55..0f6fe71 100644 --- a/layout/_partial/main/navbar/list_wiki.ejs +++ b/layout/_partial/main/navbar/list_wiki.ejs @@ -13,9 +13,7 @@ function layoutDiv() { // 项目分类 for (let id of Object.keys(theme.wiki.all_tags)) { let tag = theme.wiki.all_tags[id]; - let projects = tag.items.filter(function(item){ - return item.index !== false; - }) + let projects = tag.items.filter(item => item.index !== false) if (projects && projects.length > 0) { el += ' 0 && page.tagName === tag.name) { diff --git a/layout/_partial/sidebar/widgets/recent.ejs b/layout/_partial/sidebar/widgets/recent.ejs index 6cc1b92..736f8a7 100644 --- a/layout/_partial/sidebar/widgets/recent.ejs +++ b/layout/_partial/sidebar/widgets/recent.ejs @@ -13,20 +13,20 @@ function layoutDiv() { // body var arr = []; if (page.menu_id == 'wiki') { - arr = theme.wiki.all_pages.filter(function(p){ + arr = theme.wiki.all_pages.filter( p => { if (p.wiki) { let proj = theme.wiki.projects[p.wiki]; return proj.index != false; } - return false; - }); + return false + }) } else { - arr = site.posts.filter(function(p){ - return p.title && p.title.length > 0; - }); + arr = site.posts.filter( p => p.title && p.title.length > 0) } el += '