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/)'
|
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"/>](/)'
|
title: '[config.title](/)' # you can set html tag like: '[<img no-lazy height="32px" src="xxx"/>](/)'
|
||||||
menu:
|
menu:
|
||||||
post: '[btn.blog](/)'
|
post: # '[btn.blog](/)'
|
||||||
wiki: '[btn.wiki](/wiki/)'
|
wiki: # '[btn.wiki](/wiki/)'
|
||||||
friends: # '[友链](/friends/)'
|
friends: # '[友链](/friends/)'
|
||||||
about: # '[关于](/about/)'
|
about: # '[关于](/about/)'
|
||||||
# Sidebar widgets
|
# Sidebar widgets
|
||||||
widgets:
|
widgets:
|
||||||
# default layout in home/wiki/categories/tags/archives pages
|
# default layout in home/wiki/categories/tags/archives pages
|
||||||
default: [welcome, recent]
|
default: # [welcome, recent]
|
||||||
# Recent update
|
# Recent update
|
||||||
recent:
|
recent:
|
||||||
layout: 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
|
// 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) {
|
if (hexo.theme.config.sidebar.widgets.wiki_more == undefined) {
|
||||||
hexo.theme.config.sidebar.widgets.wiki_more = {layout: 'wiki_more'};
|
hexo.theme.config.sidebar.widgets.wiki_more = {layout: 'wiki_more'};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue