Path Mapping for Edge Delivery Services path-mapping
Learn how to map page paths used on the AEM authoring instance to public page paths used on the website and control which content is published to Edge Delivery Services.
Overview overview
To be able to author WYSIWYG content using AEM and publish it to Edge Delivery Services, you must set up your project’s path mapping. This mapping has two purposes.
- It maps and creates a relationship between page paths used on your AEM authoring instance and the public page paths used on your website.
- It controls which content (pages, sheets, assets, etc.) are published to Edge Delivery Services.
The path mapping must be configured for each project individually and according to the project’s content and URL structure. It is used by AEM during content publishing and while editing content in the Universal Editor.
Configuration Format configuration-format
The format of the path mapping configuration contains two sections (mappings
and includes
) similar to the following example.
{
"mappings": [
"/content/aem-boilerplate/:/",
"/content/aem-boilerplate/configuration:/.helix/config.json"
],
"includes:" [
"/content/aem-boilerplate/"
]
}
mappings mappings
The mappings
configuration holds an array of internal paths (on the AEM authoring instance) and external URL paths (on the public website).
The format is <internal paths>:<external path>
. It typically consists of a minimum of two entries.
- The first entry from the example is the path mapping of the website pages.
- The second entry controls the mapping of the
.helix/config.json
to the corresponding spreadsheet page in the AEM authoring repository.
In this example, all pages stored under /content/aem-boilerplate/...
will be publicly accessible on the Edge Delivery Services site directly under https://main--my-site--org.aem.live/....
.
.json
API URLs on Edge Delivery Services. To do so, they must be individually listed in the mapping configuration.includes includes
The includes
configuration controls which content paths are actually replicated to Edge Delivery Services. It can hold any array of paths as well and typically contains the sites top level root page.
Assets used on Edge Delivery Services pages are typically published alongside the webpage. They will be exported from the AEM authoring instance to Edge Delivery Services automatically.
includes
section of the configuration as well./content/dam/my-site/documents
containing a set of PDF should be publicly accessible via /assets/...
, an entry must be added to the includes
section of the configuration.How to Configure how-to-configure
Your path mappings can be configured in one of two ways depending on the setup of your project.
-
If the project is configured for
aem.live
and uses the configuration service for centralized configurations, the paths mapping for each site is configured via this configuration service.- Here is an example cURL request to configure path mappings.
code language-text curl --request POST \ --url https://admin.aem.page/config/{org}/sites/{site}/public.json \ --header 'Content-Type: application/json' \ --header 'x-auth-token: ......' \ --data '{ "paths": { "mappings": [ "/content/aem-boilerplate/:/", "/content/aem-boilerplate/configuration:/.helix/config.json" ], "includes": [ "/content/aem-boilerplate/" ] } }'
-
If the project does not use the configuration service, the paths mapping is configured via a
paths.json
file in you projects GitHub repository.- See
https://github.com/adobe-rnd/aem-boilerplate-xwalk/blob/main/paths.json
for an example.
- See
In both cases, once you configure your path mappings, you can check the configuration via the publicly-accessible configuration URL https://<branch>--<site>--<org>.aem.page/config.json
.