hexo-abbrlink-iuxt
Version:
create one and only link for every post for hexo
90 lines (66 loc) • 3.06 kB
Markdown
[](https://www.npmjs.com/package/hexo-abbrlink)
[](https://www.npmjs.com/package/hexo-abbrlink)
[](https://www.npmjs.com/package/hexo-abbrlink)
A [Hexo plugin](https://hexo.io/plugins/) to generate static post link based on title and data in the post front.
This plugin supports `.textbundle` -- a file format contents markdown and its assets. Actually, `.textbundle` file is a folder which shows like a file in Finder on macOS.
[](https://github.com/rozbo/hexo-abbrlink2), supports the orderly growth of ID is beta now.
The working principle of `hexo-abbrlink2` is different from this plug-in, not as an upgraded version of this plugin, they are different individuals.
But `hexo-abbrlink2` is compatible with the previous configuration of this plugin.
As a supplement to this plugin, use it only when you really need an orderly growing id.
Add plugin to Hexo:
```
npm install hexo-abbrlink --save
```
Modify permalink in config.yml file:
```
permalink: posts/:abbrlink/
permalink: posts/:abbrlink.html
```
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:
alg: crc32
rep: hex
drafts: false
auto_category:
enable: true
depth:
over_write: false
auto_title: false
auto_date: false
force: false
```
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
```
[] Maximum number of posts is 65535 for crc16. (now, if a abbrlink already exist, it will change another one and try again and again...)
see [this](https://post.zz173.com/detail/hexo-abbrlink.html)(Chinese)
[](https://github.com/NoahDragon)
The project is develop by [JetBrains Ide](https://www.jetbrains.com/?from=puck)
[](https://www.jetbrains.com/?from=puck)