If you have a Jekyll static site, this plugin may help you automatically generate short links for every page. I'm using this plugin for my blog.
Install it first (you need Ruby 3+ and Jekyll 3+):
$ gem install jekyll-shorts
Then, add this to _config.yml
:
plugins:
- ... your other plugins here ...
- jekyll-shorts
shorts:
permalink: :year:month:day.html
Here, every page in the site will get a sibling with the name
:year:month:day.html
, which will redirect to the page itself. You can use:
:year
- the short form of the year of the post, like23
or76
:month
- the month of the post, like01
or12
:day
- the day of the post, like07
or29
:position
- the unique position of the post in the entire list of them, like42
or256
:letter
- one English letter inside a month
Be careful with the :position
, since it may change when you add a new post
somewhere in the middle of existing flow of posts.
How to Contribute
Make a fork and then test it locally like this:
$ bundle update
$ bundle exec rake
If it works, make changes, test again, and then submit a pull request.