Search code examples
jekyllpermalinks

Jekyll permalink with filename based url


I need some help with jekyll permalinks. I've a post named: DATE-my-title.md and inside it I have:

---
title: My beautiful extended title
---

In _config.yml I've defined

permalink:   /:categories/:title

So it seems that jekyll ignores the filename and instead of getting /my-titleI'm getting /my-beautiful-extended-title

How can I tell jekyll to use the filename url instead of the titleattribute itself?


Solution

  • If you set a title in the front matter this is the one used to generate the file name. If you want to use the file name as generated file name, don't use the front matter title. It's the only way.