Changing Jekyll's Permalink
Let’s change the permalink format for your Jekyll blog.
In your Jekyll blog, a permalink is the name for the URL that points directly to a specific blog post. It’s a permanent link to a page.
Jekyll uses a really ugly, verbose permalink format by default which includes the date and category of the post:
Which in the live site for this post would become:
Why do you want all that extra info in your permalink? In my opinion all that’s needed is the title to uniquely identify it, and this should also be snappy and to the point (a rule I admittedly don’t always follow.). Any metadata such data or category should already be clearly included in the blog post itself.
_config.yml file, either edit the
permalink property or add it if it isn’t already there. The pattern you provide creates the structure of your permalinks. You can use certain variables that Jekyll recognises that represent metadata for the post. For example, I’ve got:
:title will map to the title of my blog post as taken from its filename and create a permalink that looks something like
You can find the other variables that Jekyll supports listed in Jekyll’s docs. Spoiler: there aren’t any interesting ones except for
Commit, build and push to see your new more succinct permalinks.