Static site hosting via tangled
JavaScript 100.0%
Other 0.1%
13 1 0

Clone this repository

https://tangled.org/gracekind.net/tangled-pages
git@knot.gracekind.net:gracekind.net/tangled-pages

For self-hosted knots, clone URLs may differ based on your setup.

README.md

tangled-pages#

A simple way to host a website via a tangled repo. You can run it as a cloudflare worker or as an express server.

Run#

Create a config.json for your site(s).

{
  "site": {
    "knotDomain": "knot.gracekind.net",
    "ownerDid": "did:plc:p572wxnsuoogcrhlfrlizlrb",
    "repoName": "tangled-pages-example",
    "branch": "main",
    "baseDir": "/public", // optional
    "notFoundFilepath": "/404.html" // optional
  }
}

See config.multiple.example.json for an example of a multi-site config.

Then run:

npm install
npx tangled-pages --config config.json

Limitations#

The server fetches files from the repo on request, so it might be slow. In the future, we could cache the files and use a CI to clear the cache as needed.