TIL: Getting GitHub Pages to publish your Matrix
My files inside the
.well-known directory never showed up in the deployed GitHub Pages site. So after some frustration and couple of unsuccessful deploys, I realized that Jekyll still processes your files by default, even if you don't care about Jekyll or intend to use it in the first place:
GitHub Pages will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, disable the Jekyll build process by creating an empty file called
.nojekyllin the root of your publishing source, then follow your static site generator's instructions to build your site locally.
I was trying to expose a
.well-known directory that may host, among other things, Matrix server configuration files, and managed to find the
include escape hatch in the Jekyll docs, but if you don't use Jekyll at all, just turning it off with
.nojekyll might be the easiest, as recommended by the docs above.
Access-Control-Allow-Origin headers for these files should allow access for various web clients to work correctly. It looks like GitHub Pages correctly exposes these headers, as of pretty recently.