Skip to content

Instantly share code, notes, and snippets.

@pfrazee
Last active October 31, 2018 23:07
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pfrazee/8eb85d7bb33efb52c7d6d1a2e639d979 to your computer and use it in GitHub Desktop.
Save pfrazee/8eb85d7bb33efb52c7d6d1a2e639d979 to your computer and use it in GitHub Desktop.

Using Dat with a github.io domain

https://i.imgur.com/akOrIOq.png

My personl site is hosted at hashbase.io (link) so that you can access it via dat and https. My canonical dat url is dat://pfrazee.hashbase.io.

Before I used hashbase I used Github Pages, and today it dawned on me that I can have dat://pfrazee.github.io work too. It's pretty simple if you know the dat dns spec.

All I had to do was add /.well-known/dat to my site (click to view). I put the raw dat URL of my site in that file, along with a TTL.

dat://40a7f6b6147ae695bcbcff432f684c7bb5291ea339c28c1755896cdeb80bd2f9/
TTL=3600

I'm still hosted at hashbase.io, but the dat site is "available" at the github.io domain now too!

@ChildishGiant
Copy link

Is there any way to get this to work on a project page? I have the dat file in place at https://childishgiant.github.io/perdola/.well-known/dat and also the _config.yml in place but the button to switch isn't appearing.

@KarlesP
Copy link

KarlesP commented Jul 12, 2018

@ChildishGiant did you get it to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment