[opt] widgets default layout
This commit is contained in:
parent
f788b3938c
commit
79e380b4ee
|
@ -25,10 +25,10 @@ sidebar:
|
|||
# about: '[关于](/about/)'
|
||||
# Sidebar widgets
|
||||
widgets:
|
||||
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'
|
||||
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'
|
||||
|
||||
######## Index ########
|
||||
post-index: # 近期发布 分类 标签 归档 and ...
|
||||
|
|
|
@ -18,6 +18,12 @@ if (page.sidebar == undefined) {
|
|||
page.sidebar = [];
|
||||
}
|
||||
}
|
||||
|
||||
// parse array string
|
||||
if (typeof page.sidebar == 'string') {
|
||||
page.sidebar = page.sidebar.replace(/ /g, '').split(',');
|
||||
}
|
||||
|
||||
function layoutWidgets() {
|
||||
var el = '';
|
||||
el += '<div class="widgets">';
|
||||
|
|
Loading…
Reference in New Issue