Loading...
Loading...
Creates a new AEM Edge Delivery site from scratch — GitHub repo from the boilerplate, aem-code-sync installation, initial DA content (nav, footer, homepage), and a live preview URL. Use this skill whenever a user wants to create a new AEM Edge Delivery site and no repository or DA content exists yet.
npx skill4agent add adobe/skills create-siteghgh auth statusrepomy-orgmy-siteMy Site{{ORG}}{{REPO}}{{SITE_NAME}}adobe/aem-boilerplategh repo create {{ORG}}/{{REPO}} \
--template adobe/aem-boilerplate \
--description "{{SITE_NAME}} — AEM Edge Delivery site" \
--publicghgh auth statusgh auth loginghPOST https://api.github.com/repos/adobe/aem-boilerplate/generate
Authorization: Bearer {{GITHUB_TOKEN}}
Content-Type: application/json
{
"owner": "{{ORG}}",
"name": "{{REPO}}",
"description": "{{SITE_NAME}} — AEM Edge Delivery site",
"private": false,
"include_all_branches": false
}repohttps://github.com/{{ORG}}/{{REPO}}Action required: Install the AEM Code Sync app on your new repository.
- Open this URL: https://github.com/apps/aem-code-sync/installations/new
- Under "Repository access", select Only select repositories
- Choose {{ORG}}/{{REPO}} from the list
- Click Save
Reply "done" when complete.
https://admin.hlx.page/status/{{ORG}}/{{REPO}}/main/da-auth-helper~/.aem/da-token.jsonnode -e "
const fs = require('fs');
const p = process.env.HOME + '/.aem/da-token.json';
if (!fs.existsSync(p)) { console.log('No cache'); process.exit(1); }
const t = JSON.parse(fs.readFileSync(p));
console.log('Valid:', t.expires_at > Date.now());
console.log('Expires:', new Date(t.expires_at).toISOString());
"DA_TOKEN=$(node -e "const t = require(process.env.HOME + '/.aem/da-token.json'); process.stdout.write(t.access_token);")npm install -g github:adobe-rnd/da-auth-helper
da-auth-helper token~/.aem/da-token.json{{DA_TOKEN}}@-F 'data=...'/usr/bin/curlcat > /tmp/nav.html << 'EOF'
<nav content>
EOF
/usr/bin/curl -s -o /dev/null -w "%{http_code}" -X POST "https://admin.da.live/source/{{ORG}}/{{REPO}}/nav.html" \
-H "Authorization: Bearer {{DA_TOKEN}}" \
-F "data=@/tmp/nav.html;type=text/html"footer.htmlindex.html<main>
<div>
<p><a href="/">{{SITE_NAME}}</a></p>
</div>
<div>
<ul>
<li><a href="/">Home</a></li>
</ul>
</div>
<div></div>
</main><main>
<div>
<p>© 2024 {{SITE_NAME}}. All rights reserved.</p>
</div>
</main><main>
<div>
<h1>Welcome to {{SITE_NAME}}</h1>
<p>Your new site is ready. Start editing this page in DA.</p>
</div>
</main>.aem.page/usr/bin/curl/usr/bin/curl -s -o /dev/null -w "%{http_code}" -X POST "https://admin.hlx.page/preview/{{ORG}}/{{REPO}}/main/nav" \
-H "Authorization: Bearer {{DA_TOKEN}}"
/usr/bin/curl -s -o /dev/null -w "%{http_code}" -X POST "https://admin.hlx.page/preview/{{ORG}}/{{REPO}}/main/footer" \
-H "Authorization: Bearer {{DA_TOKEN}}"
/usr/bin/curl -s -o /dev/null -w "%{http_code}" -X POST "https://admin.hlx.page/preview/{{ORG}}/{{REPO}}/main/" \
-H "Authorization: Bearer {{DA_TOKEN}}"https://main--{{REPO}}--{{ORG}}.aem.page/Your site is ready!
- Preview:
https://main--{{REPO}}--{{ORG}}.aem.page/- Browse content in DA:
https://da.live/#/{{ORG}}/{{REPO}}/- Edit homepage:
https://da.live/edit#/{{ORG}}/{{REPO}}/index- Edit nav:
https://da.live/edit#/{{ORG}}/{{REPO}}/nav- Edit footer:
https://da.live/edit#/{{ORG}}/{{REPO}}/footer- GitHub repo:
https://github.com/{{ORG}}/{{REPO}}To start developing locally:bashgit clone https://github.com/{{ORG}}/{{REPO}}.git cd {{REPO}} npm install aem upWhat would you like to do next — add more pages, customize a block, or set up a custom domain?
| Symptom | Likely cause | Fix |
|---|---|---|
| Step 2 returns 422 | Repo name already exists | Ask user for a different name |
| Step 3 verify returns 404 | aem-code-sync not installed | Re-send the installation URL |
| Step 4 cached token missing/expired | No prior DA session on this machine | Install da-auth-helper from GitHub ( |
| Step 5 curl exits with code 26 | Inline multiline content in | Write content to a temp file and use |
| Step 5 returns 401 | Expired or missing IMS token | Re-check |
| Step 5 returns 403 | Token lacks permission for this org/repo | Confirm the user has write access to |
| Step 6 returns 401 | DA-sourced content requires auth on preview | Add |
| Step 6 returns 404 | aem-code-sync not installed correctly | Verify Step 3, then retry |
| PATH not resolved in subshell | Use |
| Preview URL shows blank page | nav or index not previewed | Re-run Step 6 for the failing path |
https://da.live/#/{{org}}/{{repo}}{{folder-path}}https://da.live/edit#/{{org}}/{{repo}}{{path-without-extension}}https://da.live/sheet#/{{org}}/{{repo}}{{path-without-extension}}