Filtering new posts to be published

I’m working on a WebMention and IndieWeb integration. Part of that build is a custom Liquid Tag that checks if the post has been published before. I could probably check if the post already exists in the _site directory. But it would be a lot simpler to check the post date against the last build date. (I tend to have a lot of posts with future dates.)

I thought about storing the build date in a text file within the repo but this seems like it should exist somewhere. Anyone have an idea?

Maybe you could just compare to the /index.html modification date to have the building time data.