default value
This commit is contained in:
parent
fe6dbaed3f
commit
e339601fab
|
@ -19,14 +19,14 @@ sidebar:
|
|||
avatar: '[config.avatar](/about/)' # you can set avatar link in _config.yml or '[https://xxx.png](/about/)'
|
||||
title: '[config.title](/)' # you can set html tag like: '[<img no-lazy height="32px" src="xxx"/>](/)'
|
||||
menu:
|
||||
post: '[btn.blog](/)'
|
||||
wiki: '[btn.wiki](/wiki/)'
|
||||
post: # '[btn.blog](/)'
|
||||
wiki: # '[btn.wiki](/wiki/)'
|
||||
friends: # '[友链](/friends/)'
|
||||
about: # '[关于](/about/)'
|
||||
# Sidebar widgets
|
||||
widgets:
|
||||
# default layout in home/wiki/categories/tags/archives pages
|
||||
default: [welcome, recent]
|
||||
default: # [welcome, recent]
|
||||
# Recent update
|
||||
recent:
|
||||
layout: recent
|
||||
|
|
|
@ -31,8 +31,14 @@ module.exports = hexo => {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// default menu
|
||||
if (hexo.theme.config.sidebar.menu == undefined) {
|
||||
hexo.theme.config.sidebar.menu = [];
|
||||
}
|
||||
// default widgets
|
||||
if (hexo.theme.config.sidebar.widgets.default == undefined) {
|
||||
hexo.theme.config.sidebar.widgets.default = ['welcome', 'recent'];
|
||||
}
|
||||
if (hexo.theme.config.sidebar.widgets.wiki_more == undefined) {
|
||||
hexo.theme.config.sidebar.widgets.wiki_more = {layout: 'wiki_more'};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue