mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix categories
This commit is contained in:
parent
31daadf847
commit
84740e38b6
@ -1,5 +1,5 @@
|
||||
<script src="/dist/index.js"></script>
|
||||
{%- set categories = resource.pages|get_all_category %}
|
||||
{%- set categories = resource.pages|get_components_categories %}
|
||||
<aside class="aside-container">
|
||||
<ul>
|
||||
{%- for category in categories %}
|
||||
|
@ -36,12 +36,13 @@ module.exports = function(nico) {
|
||||
});
|
||||
return ret;
|
||||
},
|
||||
get_all_category: function(pages) {
|
||||
get_components_categories: function(pages) {
|
||||
return _.uniq(Object.keys(pages).map(function(key) {
|
||||
var item = nico.sdk.post.read(key);
|
||||
if (item.meta.template !== 'component') {
|
||||
return;
|
||||
}
|
||||
return item.meta.category;
|
||||
}).filter(function(item) {
|
||||
return item;
|
||||
}));
|
||||
},
|
||||
find_demo_in_component: function(pages, directory) {
|
||||
|
Loading…
Reference in New Issue
Block a user