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