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:
- I deploy the output of the gatsby build with the CLI tool
gh-pages. Here, you need to make sure that you pass the
--dotfilesoption to ensure that the
.well-knowndirectory is also pushed to the relevant branch
- Now it is the github pages serving that is not playing nicely. This Stackoverflow answer explains what has to be done: A
.nojekyllfile needs to be present in the github pages directory for dotfiles to also be served.
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