How to get page title in config file in Eleventy JS?

Ok, so you want to use a regular function, not fat arrow, and that gives you access to the page object, but, you do not get access to the front matter. However, you know where the file is now and can use gray-matter to read it in. This answer explains how to do it.