博客更改日记

本文最后更新于:2 年前

静

记录我对HEXO博客的配置更改记录,作换系统时还原配置使用。

日志

问题

‘hexo d’ 上传失败,停留在writing objects。

时间

2020/02/17

解决

原因

有上传比较大的文件。

解决方法

1
$ git config --global http.postBuffer 524288000

原理

因为http.postBuffer默认上限为1M,上面的命令是把git的配置里http.postBuffer的变量改大为500M

插件

安装

1
npm install hexo-abbrlink --save

配置

1
2
3
4
permalink: posts/:abbrlink.html  # 此处可以自己设置,也可以直接使用 :/abbrlink
abbrlink:
alg: crc32 #算法: crc16(default) and crc32
rep: hex #进制: dec(default) and hex

示例(官方)

1
2
3
4
5
6
7
8
9
10
crc16 & hex
https://post.zz173.com/posts/66c8.html

crc16 & dec
https://post.zz173.com/posts/65535.html
crc32 & hex
https://post.zz173.com/posts/8ddf18fb.html

crc32 & dec
https://post.zz173.com/posts/1690090958.html

hexo-generator-feed 生成 RSS 文件的插件

安装

1
npm install hexo-generator-feed

配置

1
2
3
4
5
6
7
8
9
YAML
# Extensions
plugins:
hexo-generator-feed
#Feed Atom
feed:
type: atom # 生成的类型,RSS对应atom
path: atom.xml # 生成的文件名
limit: 20 # 选取推送的文章数量

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!