Static site hosting via tangled

Update example

+1 -1
.example.env
···
# note these aren't secrets, just config
KNOT_DOMAIN = "knot.gracekind.net"
OWNER_DID = "did:plc:p572wxnsuoogcrhlfrlizlrb"
-
REPO_NAME = "static-site-example"
+
REPO_NAME = "tangled-pages-example"
+4 -4
README.md
···
# tangled-pages
-
This gives you a way to host a website via a tangled repo.
+
A simple way to host a website via a tangled repo.
You can run it as a cloudflare worker or as an express server.
-
Create .env:
+
Create .env pointing to your repo:
```
KNOT_DOMAIN=knot.gracekind.net
OWNER_DID=did:plc:p572wxnsuoogcrhlfrlizlrb
-
REPO_NAME=static-site-example
+
REPO_NAME=tangled-pages-example
```
-
Run:
+
Run server:
```bash
npm install
-9
example/404.html
···
-
<html>
-
<head>
-
<title>404 Not Found</title>
-
</head>
-
<body>
-
<h1>404 Not Found</h1>
-
<p>This is an example of a custom 404 page.</p>
-
</body>
-
</html>
-9
example/index.html
···
-
<html>
-
<head>
-
<title>Tangled Pages Example</title>
-
</head>
-
<body>
-
<h1>Tangled Pages Example</h1>
-
<p>This is an example of a static page hosted on a tangled repo!</p>
-
</body>
-
</html>
-2
pages_config.yaml
···
-
baseDir: /example
-
notFoundFilepath: /404.html
+2 -2
test/knot-client-test.js
···
-
import { createUnsignedClient } from "./knot-client.js";
+
import { createUnsignedClient } from "../src/knot-client.js";
const OWNER_DID = "did:plc:p572wxnsuoogcrhlfrlizlrb";
-
const REPO_NAME = "static-site-example";
+
const REPO_NAME = "tangled-pages-example";
const KNOT_DOMAIN = "knot.gracekind.net";
const client = createUnsignedClient(KNOT_DOMAIN);