Federation across repositories
A corpus with page identity can be shared across repositories without a central registry. Two shapes exist, and they use different mechanisms:
- A fork that merges back – a contractor writes specs in a clone
and the work returns months later – is plain git. Pages arrive with
their
uids, nothing renumbers on either side, andaccent validateproves zero collisions and zero broken references after the merge. - A corpus that stays foreign – you track another site’s specs beside your own – is an import: a stamped copy, never a live mount.
Declare your origin
A site names itself once, in its configuration:
site: origin: accent-sass
The slug is a local name with git-remote semantics: it means something to the sites that import this corpus, and nothing anywhere else. It is never written into the site’s own pages.
Import a corpus
accent content import ../accent-sass
The command reads the source checkout’s config.yaml for its content
directory and its site.origin (or takes --origin <slug>), and
copies every markdown page to content/imports/<slug>/, stamping
origin: <slug> into each copy’s frontmatter. Each page keeps its
uid forever, so re-importing replaces changed pages in place and a
page the source moved replaces its old copy – the uid is the merge
key, file paths are not.
Reference a foreign page
A foreign page’s alias stays claimed in its own origin, so it can never
collide with yours: your f12 and the imported f12 coexist. Written
references tell them apart with the origin qualifier:
dep: accent-sass/f12
A bare alias always names your own page. Inside an imported page, a bare alias keeps meaning what it meant at home – its own corpus – so imported cross-references stay intact without rewriting.
accent validate checks it all: a duplicate alias within one origin is
an error, a reference to a foreign page that is not imported is a
warning naming the origin, and a qualified reference that resolves to a
page of the wrong model is the same error a local one would be.
Count by origin
Imported pages are ordinary pages, so computed values see them. A tracker that counts specs per corpus is one declaration:
computed: by_origin: { query: group, from: spec, by: origin }
Local pages land in the (absent) bucket; each import counts under its
slug.