What’s the origin of the gingerbread man?

https://www.straightdope.com/columns/read/1912/whats-the-origin-of-the-gingerbread-man/

Since the internet has advanced greatly since 2001, a little google-fu gives me this:

Apparently, Grantham Gingerbread was invented in Grantham (in 1740) which should not come as a shock to many people. It is a particular type of Gingerbread that was quite popular with the locals and became something of a mascot food. (Perhaps in a similar way to bagels in New York or Pepperoni Rolls in West Virginia or beignets in New Orleans) The author of the Reuters piece likely found this tidbit (perhaps a fan of the Grantham Gingerbreads, a local football club that uses the food as its nickname?) and confused a particular expression of gingerbread with the whole enchilada, perhaps similar to how if you didn’t know better and you listened to people from the city, you’d think New York invented the bagel. There’s my google info for the day.