Can the filename for a post exclude the title?

I’d like to have the filenames for all my blog posts be just the date and exclude the title, i.e., When I try to name the files in this way, Jekyll doesn’t recognize them as posts and ignores them.

Is there a configuration option that I can use to do this change?

If you use the title front matter, then I believe you should be good:

title: My post title
Blog content...

I do use the title front matter, but Jekyll won’t even recognize that the file is a post unless it has a filename of the format

Yes this is known limitation of Jekyll and there’s actually an open PR enabling leaving it out of the filename. You always use something short and similar to a category like

or if you want to just number it.
The result will be 2020/08/21/1.html

The last part of the filename is not used for the presentation in the html. I guess it is intended for making post files easy to glance at and to have multiple posts on one day.
Use the title in frontmatter for user-facing info and the filename for the URL

Thank you @MichaelCurrin I wish this was different, but now that I understand, I can work with this.

1 Like

You can create a custom collection called ‘myposts’ and use your date-filenames there. I believe this restriction only exists for the ‘posts’ type.

Michael, sorry I had not realized that was a limitation. Thanks for pointing it out.