Static site hosting via tangled
1# tangled-pages
2
3This gives you a way to host a website via a tangled repo.
4You can run it as a cloudflare worker or as an express server.
5
6Create .env:
7
8```
9KNOT_DOMAIN=knot.gracekind.net
10OWNER_DID=did:plc:p572wxnsuoogcrhlfrlizlrb
11REPO_NAME=static-site-example
12```
13
14Run:
15
16```bash
17npm install
18npm start
19```
20
21## Config
22
23You can configure the pages service by creating a `pages_config.yaml` file in the root of the repo.
24
25```yaml
26baseDir: "/public"
27notFoundFilepath: "404.html"
28```
29
30## Limitations
31
32It fetches files from the repo on request, so it might be slow.
33In the future, we could cache the files and use a CI to update the cache.