create one and only link for every post for hexo
Switch branches/tags
Nothing to show
Clone or download
Latest commit 38bbfd7 May 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib check title.length Mar 30, 2018
.gitignore 更新hexo-fs,增加新版npm需要的lockfile Dec 4, 2017
.npmignore v2.0.0 Aug 10, 2016
README.md update readme Dec 8, 2017
index.js add support org-mode file Feb 12, 2017
package-lock.json 更新hexo-fs,增加新版npm需要的lockfile Dec 4, 2017
package.json 更新hexo-fs,增加新版npm需要的lockfile Dec 4, 2017
test.js v2.0.0 Aug 10, 2016

README.md

hexo-abbrlink

npm npm npm

A Hexo plugin to generate static post link based on post titles.

How to install

Add plugin to Hexo:

npm install hexo-abbrlink --save

Modify permalink in config.yml file:

permalink: posts/:abbrlink/

There are two settings:

alg -- Algorithm (currently support crc16 and crc32, which crc16 is default)
rep -- Represent (the generated link could be presented in hex or dec value)
# abbrlink config
abbrlink:
  alg: crc32  #support crc16(default) and crc32
  rep: hex    #support dec(default) and hex

Sample

The generated link will look like the following:

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

Limitation

Maximum number of posts is 65535 for crc16. (For a personal blog site, this number is decent)

More info

see this(Chinese)

ThanksFor

NoahDragon