# URL ## If your site is put in a subdirectory, set url as'http://example.com/child'and root as'/child/' url: https://QinXiuFuHui.github.io root: / permalink: :year/:month/:day/:title/ permalink_defaults: pretty_urls: trailing_index: true # Settofalsetoremove trailing 'index.html'from permalinks trailing_html: true # Settofalsetoremove trailing '.html'from permalinks
第2步:更改代码
舍无由将上面这段代码更改为如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#设置永久链接,2020年11月14日舍无由新增五行,包含该行注释(该段注释算作一行),并把原来的permalink: :year/:month/:day/:title/注释掉,操作过程依据https://www.heson10.com/next/posts/31426.html permalink: posts/:abbrlink.html # 此处可以自己设置,也可以直接使用 :/abbrlink abbrlink: alg: crc16 #算法: crc16(default) and crc32 rep: dec #进制: dec(default) and hex
# URL ## If your site is put in a subdirectory, set url as'http://example.com/child'and root as'/child/' url: https://QinXiuFuHui.github.io root: / ## permalink: :year/:month/:day/:title/ permalink_defaults: pretty_urls: trailing_index: true # Settofalsetoremove trailing 'index.html'from permalinks trailing_html: true # Settofalsetoremove trailing '.html'from permalinks
保存_config.yml文件。
第3步:发布
然后在博客根目录下,右键单击启动Git Bash Here,使用一键三连的命令hexo clean && hexo g -d, 将本地数据部署到远端服务器。