in the markdown files for collections (article.md for example) is it possible to get the slug and date in the yaml frontmatter?

I understand the slug is the file name and the date is in the title (when ordering by date).

I have a scenario in which the markdown files themselves are being used by a static site generator and if I could get the slug and date in the yaml it would be really helpful.

Thanks