Redirecting your GitHub Pages website to a Dat URL
2019-12-07 00:00
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
- Note: Signifies additional information
- Tip: Signifies an alternative procedure for completing a step
- Warning: Signifies that damage, such as data loss, may occur
- Example: Shows how a procedure would be performed in a real scenario
Inline code and code blocks
: Signify package names, filenames, file contents, or commands<variable>
Signifies that the text between the<
and>
should be replaced, and the<
and>
should be removed- Bold font Signifies user interface items
Requirements
For this guide, ensure you have:
- A GitHub account
- A GitHub Pages website repository
- Installed Dat
Enabling Dat
Add a
.well-known/dat
file to the root folder of your GitHub Pages repository.Inside the
.well-known/dat
file, add the following:dat://your-dat-url/ TTL=3600
Add a
_config.yml
file to the root folder of your GitHub Pages repository.Inside the
_config.yml
file, add the following:include: [".well-known"]