mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
Add meta.only form demo markdown file
This commit is contained in:
parent
ac900e2919
commit
5c8f41556c
@ -111,6 +111,17 @@ module.exports = function(nico) {
|
|||||||
ret.push(post);
|
ret.push(post);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
var hasOnly;
|
||||||
|
ret.forEach(function(post) {
|
||||||
|
if (post.meta.only) {
|
||||||
|
hasOnly = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (hasOnly) {
|
||||||
|
ret = ret.filter(function(post) {
|
||||||
|
return post.meta.only;
|
||||||
|
});
|
||||||
|
}
|
||||||
ret = ret.sort(function(a, b) {
|
ret = ret.sort(function(a, b) {
|
||||||
if (/index$/i.test(a.filename)) {
|
if (/index$/i.test(a.filename)) {
|
||||||
a.meta.order = 1;
|
a.meta.order = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user