···11+# tangled-pages
22+33+This gives you a way to host a website via a tangled repo.
44+You can run it as a cloudflare worker or as an express server.
55+66+Create .env:
77+88+```
99+KNOT_DOMAIN=knot.gracekind.net
1010+OWNER_DID=did:plc:p572wxnsuoogcrhlfrlizlrb
1111+REPO_NAME=static-site-example
1212+```
1313+1414+Run:
1515+1616+```bash
1717+npm install
1818+npm start
1919+```
2020+2121+## Config
2222+2323+You can configure the pages service by creating a `pages_config.yaml` file in the root of the repo.
2424+2525+```yaml
2626+baseDir: "/public"
2727+notFoundFilepath: "404.html"
2828+```
2929+3030+## Limitations
3131+3232+It fetches files from the repo on request, so it might be slow.
3333+In the future, we could cache the files and use a CI to update the cache.
+9
example/404.html
···11+<html>
22+ <head>
33+ <title>404 Not Found</title>
44+ </head>
55+ <body>
66+ <h1>404 Not Found</h1>
77+ <p>This is an example of a custom 404 page.</p>
88+ </body>
99+</html>
+9
example/index.html
···11+<html>
22+ <head>
33+ <title>Tangled Pages Example</title>
44+ </head>
55+ <body>
66+ <h1>Tangled Pages Example</h1>
77+ <p>This is an example of a static page hosted on a tangled repo!</p>
88+ </body>
99+</html>