hexo使用技巧
参考:
首页设置
首页副标题设置
在 _config.butterfly.yml 中添加 subtitle 配置项,即可自定义副标题。
1 | subtitle: |
首页顶层图片设置
在 _config.butterfly.yml 中添加 index_img 配置项,即可自定义首页顶层banner图片。
1 | index_img: img/1.jpg # 自定义首页顶层banner图片 |
头像设置
在 _config.butterfly.yml 中添加 avatar 配置项,即可自定义头像。
1 | avatar: |
搜索栏设置
下载插件:hexo-generator-search
1 | npm install hexo-generator-search --save |
在 _config.butterfly.yml 中添加 search 配置项,即可自定义搜索栏。
参考:
1 | search: |
文章设置
隐藏指定文章目录序号
如果只想单独关闭某一篇文章的目录序号,在该文章 .md 文件的 Front-matter 中添加:
1 |
|
文章摘要
在 _config.butterfly.yml 中添加 index_post_content 配置项,即可自定义文章摘要。
1 | index_post_content: |
- method: 1
只显示 Front-Matter 里的 description
没写 description → 不显示简介 - method: 2(混合模式)
有 description → 用 description
没有 → 自动截取正文前 N 字(length 控制) - method: 3(默认)
永远自动截取正文
忽略 description,直接取文章开头
在文章 .md 文件的 Front-matter 中添加 description 配置项,即可自定义文章摘要。
1 |
|
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 shaplus's blog!
评论
