去除数组中重复对象 思路 :给一个空对象,遍历数组,给空对象赋值,对象的键是数组每项的对象,然后值随便,这样重复的键,赋值同样的值,只会显示一个,达到排重的作用,最后使用Object.keys()方法提取对象的键反到一个数组中
|
|
去除空对象
|
|
数组排序
|
|
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true