hexo permalink plugin

说明

hexo permalink 插件,使用时间戳生成固定链接

安装

1
2
3
4
# npm 方式安装
$ npm install hexo-number-title --save
# yarn 方式安装
$ yarn add hexo-number-title

使用

1
2
3
4
5
6
7
8
9
10
11
$ hexo new test    
INFO Created: ~/newblog/source/_posts/test.md

$ hexo number-title -h
Usage: hexo number-title

Description:
hexo-number-title plugin, For all didn't set the permalink post

Options:
-f, --force overwrite permalink

例子

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$ hexo number-title
# before
---
title: test
---
# after
---
title: test
permalink: 1500846110031
---

$ hexo number-title -f
# before
---
title: test
permalink: has-been-set-value
---
# after
---
title: test
permalink: 1500846110031
---

$ hexo new test
---
title: test
permalink: 1500846110031
---

源码

hexo-number-title