Static site hosting via tangled
1# tangled-pages
2
3A simple way to host a website via a tangled repo.
4You can run it as a cloudflare worker or as an express server.
5
6## Run
7
8Create a `config.json` for your site(s).
9
10```json
11{
12 "site": {
13 "knotDomain": "knot.gracekind.net",
14 "ownerDid": "did:plc:p572wxnsuoogcrhlfrlizlrb",
15 "repoName": "tangled-pages-example",
16 "branch": "main",
17 "baseDir": "/public", // optional
18 "notFoundFilepath": "/404.html" // optional
19 }
20}
21```
22
23See `config.multiple.example.json` for an example of a multi-site config.
24
25Then run:
26
27```bash
28npm install
29npx tangled-pages --config config.json
30```
31
32## Limitations
33
34The server fetches files from the repo on request, so it might be slow.
35In the future, we could cache the files and use a CI to clear the cache as needed.