···21}
22```
2324-See `config.multiple.example.json` for an example of a multi-site config.
25-26Then:
2728```bash
···33## Example
3435You can see an example of a hosted site [here](https://tangled-pages-example.gracekind.net).
000000000000000003637## Limitations
38
···21}
22```
230024Then:
2526```bash
···31## Example
3233You can see an example of a hosted site [here](https://tangled-pages-example.gracekind.net).
34+35+## Configuration
36+37+See `config.multiple.example.json` for an example of a multi-site config.
38+39+If the repo is hosted on tangled.sh, you can use `tangledUrl` instead of specifying `ownerDid` and `repoName` directly.
40+(This is not recommended in workers since it requires an extra request to resolve the handle.)
41+42+E.g.
43+44+```json
45+{
46+ "site": {
47+ "tangledUrl": "https://tangled.sh/@gracekind.net/tangled-pages-example"
48+ }
49+}
50+```
5152## Limitations
53
···7 "branch": "main",
8 "baseDir": "/public",
9 "notFoundFilepath": "/404.html"
10+ },
11+ {
12+ "subdomain": "url-example",
13+ "tangledUrl": "https://tangled.sh/@gracekind.net/tangled-pages-example",
14+ "tangledUrl:comment": "This will render the same site as above, but it's an example of how to use the tangledUrl field",
15+ "branch": "main",
16+ "baseDir": "/public",
17+ "notFoundFilepath": "/404.html"
18 }
19 ],
20 "subdomainOffset": 1,
+12
src/atproto.js
···10 return service.serviceEndpoint;
11}
1200000000000013async function resolveDid(did) {
14 if (did.startsWith("did:plc:")) {
15 const res = await fetch(`https://plc.directory/${encodeURIComponent(did)}`);
···10 return service.serviceEndpoint;
11}
1213+export async function resolveHandle(handle) {
14+ const params = new URLSearchParams({
15+ handle,
16+ });
17+ const res = await fetch(
18+ "https://public.api.bsky.app/xrpc/com.atproto.identity.resolveHandle?" +
19+ params.toString()
20+ );
21+ const data = await res.json();
22+ return data.did;
23+}
24+25async function resolveDid(did) {
26 if (did.startsWith("did:plc:")) {
27 const res = await fetch(`https://plc.directory/${encodeURIComponent(did)}`);