Skip to content

Allow per-path override of the preview/publish "open" URL #629

Description

@kozmaadrian

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions