[`fetch-servers.php`](php/fetch-servers.php) queries available servers, and [`generate-html.php`](php/generate-html.php) generates static HTML. Static HTML is generated from the [`sites`](sites) directory to the [`output`](output) directory, which additionally contains static assets. All contents of `sites` are invoked to produce a HTML page unless they are prefixed with a `+` sign.
Run at least once: `make fetch` to query servers. This takes around 30 seconds thanks to the coroutine implementation. Alternatively, run `make fetch-steal` to copy the fetching results from SessionCommunities.online.
Run when developing: `make dev` to watch for changes & serve HTML locally in browser, or `make lan-dev` to also expose the website to LAN and view the site on a mobile device.
The current working directory of all entrypoints in the `sites` directory is anchored to `sites` itself.
This ensures that references to components are not broken when the page changes locations. For example, `require '+getenv.php';` works in both `index.php` and `about/index.php`. However, as a result, files included from such endpoints (even from the `php/` subtree) may have their parent folders shadowed when trying to use `include` themselves. Files in the same folder and in subfolders can be included, however. How PHP's `include` fallback mechanism implies this behavior is unclear.