[opt] widgets default layout
This commit is contained in:
parent
f788b3938c
commit
79e380b4ee
|
@ -25,10 +25,10 @@ sidebar:
|
||||||
# about: '[关于](/about/)'
|
# about: '[关于](/about/)'
|
||||||
# Sidebar widgets
|
# Sidebar widgets
|
||||||
widgets:
|
widgets:
|
||||||
index: [welcome, recent, timeline] # for home/wiki/categories/tags/archives/404 pages
|
index: welcome, recent, timeline # for home/wiki/categories/tags/archives/404 pages
|
||||||
page: [welcome, toc] # for pages using 'layout:page'
|
page: welcome, toc # for pages using 'layout:page'
|
||||||
post: [toc, ghrepo, ghissues] # for pages using 'layout:post'
|
post: toc, ghrepo, ghissues # for pages using 'layout:post'
|
||||||
wiki: [toc, ghrepo, ghissues, related] # for pages using 'layout:wiki'
|
wiki: toc, ghrepo, ghissues, related # for pages using 'layout:wiki'
|
||||||
|
|
||||||
######## Index ########
|
######## Index ########
|
||||||
post-index: # 近期发布 分类 标签 归档 and ...
|
post-index: # 近期发布 分类 标签 归档 and ...
|
||||||
|
|
|
@ -18,6 +18,12 @@ if (page.sidebar == undefined) {
|
||||||
page.sidebar = [];
|
page.sidebar = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// parse array string
|
||||||
|
if (typeof page.sidebar == 'string') {
|
||||||
|
page.sidebar = page.sidebar.replace(/ /g, '').split(',');
|
||||||
|
}
|
||||||
|
|
||||||
function layoutWidgets() {
|
function layoutWidgets() {
|
||||||
var el = '';
|
var el = '';
|
||||||
el += '<div class="widgets">';
|
el += '<div class="widgets">';
|
||||||
|
|
Loading…
Reference in New Issue