Lei Mao bio photo

Lei Mao

Machine Learning, Artificial Intelligence, Computer Science.

Twitter Facebook LinkedIn GitHub   G. Scholar E-Mail RSS

Introduction

Basic Attention Token (BAT) is the crypto asset to reward internet content creators. In this blog post, I would like discuss how to enable Brave Rewards to earn BAT for Jekyll websites.

Brave Reward Verification

To verify the ownership of the website, the Brave Browser asked me to add an empty file named .nojekyll to the root of my repo first. Then I have to create a .well-known directory at the root of my repo and copy the verification text file to the directory.


I followed the protocol without even thinking about it. After I pushed the new content to the GitHub repo, I found I could no longer access my website. It turns out that the protocol provided by the Brave Browser assumes the website is a static website without building process, and.nojekyll blocks the Jekyll website building.


To allow Jekyll website building and make sure the verification text file is publicly accessible, we add the following line to the _config.yml of the Jekyll website root directory.

include: [".well-known"]

With this line of the code, Jekyll will include the .well-known directory in the static website files.

References