Workspace Draft Editing
Workspace Draft Editing Contract
Last updated: 2026-05-27
This note aligns the shared generator editor with the workspace-app draft model.
Surfaces
- Published sites are immutable release output.
- Draft sites under
*.drafts.quantalumin.comare the primary hosted editing surface. - Nextcloud External Sites may frame or link draft sites, but Nextcloud is the shell entrypoint, not the source of render authority.
- Hugo remains the render authority. Browser editors write Markdown/config source through the configured provider.
Provider Rules
Hosted workspace editing should use the workspace provider backed by
generator-api.
Site config should provide:
[params.qlMarkdownEditor]
generatorApiBase = "https://generator.example"
workspaceId = "..."
workspaceTargetId = "..."
refBibPath = "assets/bibliography.bib"
[params.qlMarkdownEditor.workspacePrincipal]
uid = "..."The editor must stay hidden unless the page is on localhost or an authenticated session exists. Anonymous draft visitors must not receive general-purpose edit controls.
Draft Mode Behavior
In draft mode, replace-main remains the preferred editing presentation:
- open the Hugo-rendered page,
- resolve the current Markdown source path from page metadata/provider state,
- load source through
generator-api, - edit in Nowtype,
- save Markdown back through
generator-api, - refresh via SPA navigation when available.
The local bridge is still the local-development analogue of the hosted workspace provider. WebDAV remains a compatibility transport only.
Draft preview routes are workspace-protected, but content-authored page locks
are shown as page status rather than enforced inside drafts. A page with
draft: true gets a draft badge, and a page covered by pageLocks gets a lock
badge. Production routes continue enforcing the generated lock manifest.
Ownership Boundary
Workspace-app owns workspace identity, route assignment, draft hostnames, SSH sandboxing, and storage exposure. Generator owns shared Hugo templates, runtime/editor assets, and the browser-side editing contract.