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 14BRANCH=main 15``` 16 17Run server: 18 19```bash 20npm install 21npm start 22``` 23 24## Config 25 26You can configure the site by creating a `pages_config.yaml` file in the root of the repo. 27 28```yaml 29baseDir: "/public" 30notFoundFilepath: "404.html" 31``` 32 33## Limitations 34 35It fetches files from the repo on request, so it might be slow. 36In the future, we could cache the files and use a CI to clear the cache as needed.