Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jekyll-shorts

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-shorts

  • 0.0.10
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

rake Gem Version

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:letter.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, like 23 or 76
  • :month - the month of the post, like 01 or 12
  • :day - the day of the post, like 07 or 29
  • :letter - a unique English letter for a short URL, like a, b, etc.

If you don't use the :letter, you may end up with duplicated URLs. For example, you have two pages written in 2023-11-23. Their URLs will be the same, if the permalink is :year:month:day.html, as in the example above. With the help of the :letter, two URLs become different.

Inside the Jekyll page, you can use {{ page.short-url }} for the value of the short URL.

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.

FAQs

Package last updated on 08 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc