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## Setup
7
8Create .env pointing to the repo you want to host:
9
10```
11KNOT_DOMAIN=knot.gracekind.net
12OWNER_DID=did:plc:p572wxnsuoogcrhlfrlizlrb
13REPO_NAME=tangled-pages-example
14```
15
16Run server:
17
18```bash
19npm install
20npm start
21```
22
23## Config
24
25You can configure the site by creating a `pages_config.yaml` file in the root of the repo.
26
27```yaml
28baseDir: "/public"
29notFoundFilepath: "404.html"
30```
31
32## Limitations
33
34It 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 update the cache.