This has probably been done a million times (and done better), but I quickly threw together a (for now) basic Webmention endpoint. https://github.com/janboddez/iw-utils #indieweb
Speaking of, this “list of known URLs” (a plain-text sitemap, kinda): let’s say I generate this halfway the build process, but keep its previous version as `pages.old.txt` or something. I could then diff both files and send outgoing webmentions (if applicable) for the couple pages that were added (or changed, or deleted, even). Hypothetically speaking and all.
@jan Nice
Validates target pages against a list of known URLs, which is not, uhm, a very generic solution. (We could, e.g., do a HEAD request instead.) Also, the actual “comments” are stored in a second table.