前言
hexo的默認永久鏈接是在_config.yml里的配置permalink: :year/:month/:day/:title/。這種默認配置有個很不能接受的缺點,文件名為中文,會導致url鏈接里面出現中文。這次我來介紹一個比較方便好用的解決方案hexo-abbrlink插件。
安裝hexo-abbrlink插件
npm install hexo-abbrlink --save
然后在 Hexo 的根目錄的配置文件_config.yml 中修改:
站點配置文件(_config.yml)里:
permalink: post/:abbrlink.html
abbrlink:
alg: crc32 # 算法:crc16(default) and crc32
rep: hex # 進制:dec(default) and hex
使用hexo g 會自動在你的文章中加上abbrlink: fbf5310d
作者:xingguang
鏈接:原文鏈接:https://www.tiance.club/post/4194944743.html