[SOLVED] How to parse date from markdown

So I have a main home page that displays blog posts which are named things like “2018-05-03-something-something.md” and in each of these markdown files there are things like “date: 2018-05-03”, “title: Something Something”, etc.

I’m trying to add a permalink to each of these posts with a format like “posts = ‘:year/:month-:day-:title’” but I can’t figure out how to parse the date from the markdown file.

Edit: This was actually pretty simple, in fact the code snippet posts = ':year/:month-:day-:title" worked exactly like that, and I was making it more complicated in my actual config file.