How to make a like counter on a static site, linked to Mastodon

from blog Drew's blogsite, | ↗ original
The answer is a little javascript, along with a little knowledge of HTML templating and the Mastodon API.