The files
brand.yaml
rules/color.yaml
pages/logo.yaml
logos, then logos-2) unless it has one of its own.
Where an asset id goes, a path under assets/ goes too.
Pushing and pulling
push uploads what assets/ adds, checks every file, and writes the brand
as one version of its history, so it is undone like any other edit. A
problem comes back at its file and line:
pull writes only the files whose meaning changed: a file that says the same
keeps its comments and its layout.
Both ways
A brand kept in a repository remembers where (PUT /api/v1/brands/{slug}/source)
and what the two last agreed on. From then on:
- The repository changes (a push to its branch):
POST .../files/importwith the files and theircommit. What was edited here since the last sync is kept; the files win only where both sides changed the same rule, page or theme setting, and the answer names each inconflicts. The side that lost is in the brand’s history, a restore away. - The brand changes here: the source reads
pending.POST .../files/exportwith the repository’s files aspreviousanswers the files to commit, only those that changed. Commit them, as a commit or a pull request, then send them back withPUT .../sourceandsynced: { commit, files }.
Previews
POST /api/v1/brands/{slug}/previews with a pull request’s files and a ref
(pull/12) answers a link to the brand’s site as those files say it, and
what it would change. It needs no account, like a share link, and keeps its
address as the pull request changes. Delete it when the pull request closes.