Problem#
Right now Sequoia only works with multiple publications if they are in different repos. You can't have multiple publications for the same site since the config is limited to just one publisher record.
Proposed Solution#
Follow a similar path that's used in credentials where if there is multiple publications in the config, prompt the user with a choice, or bypass using a flag / ENV variable. Implementation must have backwards compatibility and be able to work from the old config format and the new one.
Existing configs continue to work unchanged:
{
"siteUrl": "https://example.com",
"contentDir": "./blog",
"publicationUri": "at://did:plc:.../site.standard.publication/abc123"
}
New multi-publication config:
{
"siteUrl": "https://example.com",
"defaultPublication": "blog",
"publications": {
"blog": {
"contentDir": "./blog",
"publicationUri": "at://...",
"pathPrefix": "/posts"
},
"podcast": {
"contentDir": "./episodes",
"publicationUri": "at://...",
"pathPrefix": "/podcast",
"frontmatter": { "title": "episodeTitle" }
}
}
}
This will also require updating how .sequoia-state.json is created, read, and updated. Must also be backwards compatible.