Builds and parses the site's page paths, by the one rule they all follow:
the path is a hierarchy, @name is a user (@name@host one whose account
lives on another instance), and any other word under the
root is a dump category or an app page, /playlists holding the playlist
categories. Under a user each segment is a fixed tab name, and under dumps
or playlists a slug. A view of a page is one more segment, and a default
view is the bare path. A category narrowing a list on another page, a
profile's or a search's, is a query, ?category=, not a segment, and so is
the order of a list of playlists, ?sort=, the default order being the
bare path, and the playlists page's list of the viewer's own, ?mine=1.
The client links every page through the builders (src/utils/shared/urls.ts
wraps the dump and playlist ones), the emails prefix them with the
frontend's URL, and the server's matchers (the Open Graph tags, the
previews and backlinks of links to this site) read paths with
parsePagePath. Migration 0021 rewrote the v3 links in stored text
with the builders.
Usage
import * as mod from "shared/paths.ts";