Serving the well-known webfinger from github pages

My website is built with gatsby. Serving a generic webfinger as described on Andrew Shell’s blog or Maarten Balliauw’s blog (in order to simplify user discovery in the Fediverse) is easy enough by providing a static file. However, since the relevant file is served under a directory starting with a dot, thias causes some additional troubles:

With these two additional twists, my webfinger file is now correctly served, and you’ll find me when you search on a Mastodon server e.g. for frank@realfiction.net