For a static site, you can generate a json-ld file to integrate into the fediverse but mastodon discovery is handled through webfinger, which requires some ability to serve dynamic content. A DNS TXT record might work here as well.
@stevej strictly speaking, for a single webfinger address you can use a static file. Working on some stuff that I hope will fix this, because DNS TXT is also not quite the right thing (though the existence of DNS-over-HTTPS makes it a better option than it was 15 years ago!).
@blaine oh well a static file is preferable to a dns hack, that’s for sure!