You publish a ledgdex in the same way as any dex, with dexweb. The destination is a git repository or a folder. GitHub Pages hosts git repositories at no cost.
One thing is different: config.json has "append_only": ["ledgdex.jsonl"]. So dexweb refuses to publish a ledger that does not extend the published ledger.
1. Make a repository. On GitHub, use YOU.github.io, or any repository with Pages on.
2. Name the repository when you run init, or at a later time in "publish" in config.json:
ledgdex init biobot --name "biobot" --key biobot --url https://YOU.github.io \
--dest git@github.com:YOU/YOU.github.io.git --branch main3. Publish after each change:
ledgdex publish shop4. Others read your ledgdex at its address:
ledgdex verify https://YOU.github.ioWith a git repository, you can publish from many devices. Each device keeps a copy of the dex and has its own device key.
If a different device published first, ledgdex publish signs the unpublished entries of this device again, after the published ledger. Then it publishes again.
So there is one history, and never two entries at one position. Example: Publish runs these steps with a local repository.
Static hosting is enough. Examples are GitHub Pages, any web server, or a shared folder on a local network. Computers can trade over plain HTTP (Bots and Agents).
Publish into a folder, without git. Dexweb has a second publish method, folder. It copies gen/ into a folder. Use it for a dex on your own computer, for tests, or for a web server on a local network. You do not need git or a repository.
1. Make the dex without --dest. The --url is the address where the web server will serve the published dex:
ledgdex init biobot --name "biobot" --key biobot --url http://127.0.0.1:8000/biobot2. ledgdex init writes only the settings of the git method. So add "method" and "path" to "publish" in config.json. The path is relative to the dex folder:
"publish": {"method": "folder", "path": "../site/shop", "append_only": ["ledgdex.jsonl"]}3. Publish after each change. Dexweb copies gen/ into ../site/shop. The append_only check works as with git:
ledgdex publish shop4. Serve the folder site with any web server, for example python3 -m http.server 8000 in that folder. Then others read your ledgdex at its address:
ledgdex verify http://127.0.0.1:8000/shopUse the folder method on one device only. It has no atomic step. Thus two devices that publish into one folder at the same time can overwrite each other. With a git repository, ledgdex finds the conflict, catches up and publishes again.