m455.casa


Redirecting your GitHub Pages website to a Dat URL

Date published: 2019-12-07

This guide will teach you how to automatically redirect users from your GitHub Pages website to a Dat website (a dat:// link) when they are accessing your GitHub Pages website using Beaker Browser.

This guide is intended for users who dabble, or want to dabble, with the Dat protocol or decentralized/distributed technology.

This guide consists of the following sections:

Conventions used in this guide

Requirements

For this guide, ensure you have:

Note: You can find instructions on how to make a GitHub Pages website repository here.

Enabling Dat

  1. Add a .well-known/dat file to the root folder of your GitHub Pages repository.
  2. Inside the .well-known/dat file, add the following:

    dat://your-dat-url/
    TTL=3600

    Note: Make sure you include the / at the end of the your-dat-url. This seemed to be a make-or-break for me when trying to get this to work.

  3. Add a _config.yml file to the root folder of your GitHub Pages repository.
  4. Inside the _config.yml file, add the following:

    include: [".well-known"]