Allow per-path override of the preview/publish "open" URL
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 38
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 46
Description
## Problem
Previewing or publishing a document opens a new tab at the default AEM delivery URL (`https://main--{site}--{org}.aem.page/{path}`). Some content needs to open on a different host/URL shape (e.g. structured content served by a custom worker), but today the only override is a page-level `preview-url` / `live-url` meta that applies app-wide, it can't be scoped to specific paths.
## Proposed solution
Add two config keys (like `editor.path`):
- `preview.path` — used on Preview
- `live.path` — used on Publish
Value format `PATH=URL_TEMPLATE`, where `URL_TEMPLATE` may contain `${aemPath}`:
```preview.path = /{org}/{site}/forms=https://{site}.adobeaem.workers.dev/preview${aemPath}```
- `PATH` is prefix-matched against the doc path; longest match wins.
- Precedence: config → existing meta → default AEM URL.
- Non-matching paths are unchanged.
## Scope
- da-nx `nx2` only; applies to the `/canvas` and `/form` editors.
- The old `/edit` editor (da.live) does **not** honor this — deferred.
Contributor guide
Research direction
Start by locating how the /canvas and /form editors build the Preview and Publish destination URLs, then trace how editor.path and the existing preview-url/live-url metadata are read. Add support for preview.path and live.path with longest prefix matching and the stated config → metadata → default precedence; verify matching and non-matching paths for both editors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100