hexo short link

2020-05-01
hexo
short link

hexo-shortlink

A Hexo plugin for generate static post link based on post file name.

Install

Add plugin to Hexo:

1npm install hexo-shortlink --save

Modify permalink in config.yml file:

1permalink: :shortlink.html

Sample

The generated link will look like the following:

1source: _posts/books/a-book.md
2permalink: /books/261f97f7.html
3
4source: _posts/hello-word.md
5permalink: /b1d4025b.html
6
7source: _posts/books/computer/a-book.md
8permalink: /books/computer/261f97f7.html

Customize permalink

Set shortlink in front-matter, example:

1---
2title: 'hello word'
3shortlink: myshortlink
4---

The permalink will look like the following:

1/myshortlink.html
2/books/myshortlink.html
3/books/computer/myshortlink.html

ThanksFor

Rozbo sheetjs

关注 “AUTRE” 微信公众号,给我留言
Placeholder Image