hexo隐藏首页文章
本文最后更新于:2 年前
今天从新整了下hexo,谷歌了半天隐藏首页文章,最后发现自己原来老早之前写过这个博客?果然我的记忆力约等于无。
声明
本文档的一切内容均为本地测试结果,受限于本人知识与能力,仅供参考,如因参照本文档操作而发生任何问题,无论是否严格参照本文档操作,请恕本人概不负责。
文档中的任何观点受限于本人知识、能力及眼界,不保证理智,公正,客观。如本文档中观点与您相左,以您的意见为准。
前言
用的插件,且插件的文档写的很好了
下面是搬运的内容
安装
1 | |
hexo-generator-index2可以完全替代官方的hexo-generator-index,所以安装之后,先卸载官方的插件,不然会引起一些冲突。
选项
1 | |
per_page: Posts displayed per page. (0 = disable pagination)
order_by: Posts order. (Order by date descending by default)
layout: Set the layout, default is index
path: Output path, if path is ‘’, means output to the root directory (http://127.0.0.1:4000/ )
index: Home index or not, if true and the path is ‘’, same to offical hexo-generator-index
include: Posts filter include option
exclude: Posts filter exclude option
除了include和exclude,其它如per_page和order_by都是原有的官方首页生成器选项,不必更改。
Include/exclude 选项格式为属性 值(注意,属性与值中间有个英文的空格),可选的属性有:
category: 文章分类
tag: 文章标签
path: 文章源路径