diff --git a/_config.yml b/_config.yml index caab23c..864994a 100755 --- a/_config.yml +++ b/_config.yml @@ -26,7 +26,7 @@ sidebar: # Sidebar widgets widgets: # default layout in home/wiki/categories/tags/archives pages - default: # [welcome, recent] + default_layout: [welcome, recent] # Recent update recent: layout: recent diff --git a/layout/_partial/sidebar/index.ejs b/layout/_partial/sidebar/index.ejs index e37dd74..30d9292 100755 --- a/layout/_partial/sidebar/index.ejs +++ b/layout/_partial/sidebar/index.ejs @@ -2,13 +2,27 @@ // 默认组件 if (page.sidebar == undefined) { if (page.layout == 'post' && page.content) { - page.sidebar = ['toc']; + page.sidebar = ['toc', 'repo_info']; } else if (page.layout == 'wiki' && page.content) { - page.sidebar = ['toc', 'wiki_more']; + page.sidebar = ['toc', 'repo_info', 'wiki_more']; } else { - page.sidebar = theme.sidebar.widgets.default; + page.sidebar = theme.sidebar.widgets.default_layout; } } +function layoutWidgets() { + var el = ''; + el += '
'; + return el; +} function layoutFooterDiv() { if (theme.footer.social && theme.footer.social.length > 0) { var el = '