This repository collects standalone JavaScript examples for AEM Edge Functions—patterns that work well with Adobe Experience Manager. Each example lives entirely under examples/<name>/ (source, configuration, package.json, Makefile, and tests) so you can copy, adapt, or deploy it without pulling in unrelated code.
Official product overview, setup, build, deploy, and local development are covered in the AEM Edge Functions documentation.
| Path | Role |
|---|---|
examples/*/ |
Individual edge function examples and their documentation |
Makefile |
Install dependencies and run tests across all examples |
| Example | Description |
|---|---|
| edge-delivery-transformer | Fetches Edge Delivery HTML and composes header/footer fragments; demonstrates routing, upstream fetch, and response shaping. |
| publish-delivery-transformer | Fetches AEMaaCS publish HTML via a CDN loopback, transforms it at the edge, and returns the result; demonstrates the loopback pattern with x-edgefunction-request loop prevention. |
| publish-delivery-redirect-maps | Serves large-scale URL redirect maps at the edge for AEMaaCS publish; demonstrates KV-sharded lookups and a maintenance endpoint, with the loopback pattern for redirect misses. |
From the repository root:
make install-examples # npm ci in each example that has a Makefile
make test # run tests in every exampleUse Node.js as required by your toolchain (see the workflow for a version used in CI). For build, deploy, and local serving, follow the AEM Edge Functions guide and the README inside each example.