Getting Pelican to Play Nice With Keybase

I use Keybase prove my online identiy. Of course, when I moved my website over to pelican, I accidentally nuked my proof-of-ownership token. Keybase requires you to host you to host a file: .well-known/keybase.txt. This way the world knows that the person claiming to be me on, say, Twitter also owns Recently I broke that by copying my pelican-generated website into my webroot (pelican recommends using rsync with the --delete option to remove unused files.).

This presents a new problem: how do I host static content without linking to it? The answer is to pretend it's a template. I store my keybase.txt in /content/resources/keybase.txt (root means pelican's root dir). And then I add it to my TEMPLATE_PAGES:

ARTICLE_EXCLUDES = ['resources']
    'resources/keybase.txt': '.well-known/keybase.txt'

the code above assumes you're not using ARTICLE_EXCLUDES and TEMPLATE_PAGES already, if you are, then you need to append the code above

This causes the /content/resources folder to be ignored when searching for articles, and adding your keybase.txt as a template. The idea here is that your keybase.txt is a template mapping its entire contents (unchanged) to /output/.well_known/keybase.txt.