Skip to content

Commit 7b65a93

Browse files
authored
Release new EDS platform (#170)
* updates with eds migration * Update scripts * Update Hero to HeroSimple * testing on imports * try import * test with less content * including everything except the table * testing * testing * testing * removing br * update after remove br * fixing guide/index.md * update runtime-webhooks/index.md * update amazon-eventbridge/index.md * update runtime-webhooks/index.md * Fix local Links with link checker * fix links * update error files * update appbuilder/index * update appbuilds * update aoobuilder * update * update * update * update appbuilder/index * update * update * update appbuilder from eds-migration * update cli index.md * update links * update horizontal line * update marketo-lead-activity-data-stream-setup * update * update * update registration-api * update sdk-signarture-verfication * update marketo-lead-activity-data-stream-setup * remove syntax * remove syntax * update check-links for headings. * remove the old link checker * update on the api document. * update api.md * update api to full page * update checklinks * update links for retry-doc * update img link * update retry doc * update * update link * update common component * update * update link * update * update marketo links * update link * update link in common * update link to relative page * update relative paths in embed components * update * checking * checking * update skyline-install * update files * update outdated links * update asset-events-configuration * update scripts * update redirects
1 parent ed930de commit 7b65a93

File tree

71 files changed

+2052
-694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2052
-694
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
blank_issues_enabled: false
3+
contact_links:
4+
- name: Help Center
5+
url: https://helpx.adobe.com/support.html
6+
about: Find help with issues unrelated to documentation here.
7+
- name: Community resources
8+
url: https://developer.adobe.com/open
9+
about: Find more resources here.
10+
- name: Adobe Developer Support
11+
url: https://developer.adobe.com/developer-support
12+
about: Ask and answer questions.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Incorrect or unclear topic
2+
description: "Unclear or incorrect documentation: ambiguous guidelines, wrong or obsolete examples, typos, etc."
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Thank you for taking the time to report this issue!
8+
This request should only relate to the content of the developer.adobe.com website.
9+
Requests that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
10+
- type: checkboxes
11+
attributes:
12+
label: Is there an existing issue for this?
13+
description: Please search to see if an issue already exists for the documentation you are requesting.
14+
options:
15+
- label: I have searched the existing issues
16+
required: true
17+
- type: input
18+
attributes:
19+
label: Which topic?
20+
description: A link to the topic that needs clarification or correction
21+
placeholder: "Example: https://developer.adobe.com/commerce/webapi/rest/use-rest/search-endpoint/"
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: What's wrong with the content?
27+
validations:
28+
required: true
29+
- type: textarea
30+
attributes:
31+
label: What changes do you propose?
32+
- type: textarea
33+
attributes:
34+
label: Anything else that can help to cover this?
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Missing content
2+
description: Undocumented feature, service, command, API, UI component, procedure, etc.
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Thank you for taking the time to report this issue!
8+
This request should only relate to the content of the developer.adobe.com website.
9+
Requests that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
10+
- type: checkboxes
11+
attributes:
12+
label: Is there an existing issue for this?
13+
description: Please search to see if an issue already exists for the documentation you are requesting.
14+
options:
15+
- label: I have searched the existing issues
16+
required: true
17+
- type: textarea
18+
attributes:
19+
label: What's missing?
20+
placeholder: |
21+
- In the <guide name> or <page link> ...
22+
- Missing explanation of how ... works.
23+
- Missing steps or guidelines for ....
24+
- Missing code samples to demonstrate ....
25+
- Something else ...
26+
validations:
27+
required: true

.github/ISSUE_TEMPLATE/site_bug.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Site bug
2+
description: Something isn't working on developer.adobe.com or when building the website locally.
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for taking the time to report this issue!
9+
This bug report should only relate to the developer.adobe.com website itself or non-content issues such as rendering, 404 pages, or other unexpected behavior.
10+
Issues that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
11+
SECURITY DISCLOSURE: If this is a security disclosure please follow the guidelines in CONTRIBUTING.md. This helps keep folks from accidentally releasing vulnerabilities before the maintainers get a chance to fix the issue.
12+
- type: checkboxes
13+
attributes:
14+
label: Is there an existing issue for this?
15+
description: Please search to see if an issue already exists for the bug you encountered.
16+
options:
17+
- label: I have searched the existing issues
18+
required: true
19+
- type: textarea
20+
attributes:
21+
label: Expected behavior
22+
description: |
23+
Tell us what you expected to happen.
24+
validations:
25+
required: true
26+
- type: textarea
27+
attributes:
28+
label: Actual behavior
29+
description: |
30+
Tell us what happened. Include error messages and issues.
31+
validations:
32+
required: true
33+
- type: textarea
34+
attributes:
35+
label: Steps to reproduce
36+
description: |
37+
Provide a set of clear steps to reproduce this bug.
38+
validations:
39+
required: true
40+
- type: textarea
41+
attributes:
42+
label: Environment
43+
description: |
44+
Describe your environment such as platform, browser, and versions.
45+
Provide all the details that will help us to reproduce the bug.
46+
value: |
47+
- Browser:
48+
- OS:
49+
validations:
50+
required: true
51+
- type: textarea
52+
attributes:
53+
label: Sample code
54+
description: Sample Code that illustrates the problem
55+
- type: textarea
56+
attributes:
57+
label: Logs
58+
description: Logs taken while reproducing problem
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Site feature request
2+
description: Propose a new functionality or an improvement of the developer.adobe.com website or of the local development tools.
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Thank you for taking the time to report this issue!
8+
This feature request should only relate to the developer.adobe.com website itself and its behavior.
9+
Requests that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
10+
- type: checkboxes
11+
attributes:
12+
label: Is there an existing issue for this?
13+
description: Please search to see if an issue already exists for the feature you are requesting.
14+
options:
15+
- label: I have searched the existing issues
16+
required: true
17+
- type: textarea
18+
attributes:
19+
label: What feature should be added?
20+
validations:
21+
required: true
22+
- type: textarea
23+
attributes:
24+
label: What is the expected behavior?
25+
validations:
26+
required: true
27+
- type: textarea
28+
attributes:
29+
label: How will this feature improve the user experience?
30+
validations:
31+
required: true
32+
- type: textarea
33+
attributes:
34+
label: What would a solution for this issue look like?

.github/scripts/deploy.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
const { exec } = require('child_process');
2+
3+
module.exports = async ({ core, changes, deletions, operation, siteEnv, branch, pathPrefix }) => {
4+
let httpMethod, edsSiteEnv, codeRepoBranch, args;
5+
if (operation.includes('cache') || operation.includes('preview') || operation.includes('live')) {
6+
httpMethod = 'POST';
7+
} else {
8+
console.error('Unknown operation method');
9+
}
10+
11+
if (siteEnv.includes('stage')) {
12+
edsSiteEnv = "adp-devsite-stage";
13+
codeRepoBranch = "stage";
14+
} else if (siteEnv.includes('prod')) {
15+
edsSiteEnv = "adp-devsite";
16+
codeRepoBranch = "main";
17+
} else {
18+
console.error('Unknown env to deploy to');
19+
}
20+
21+
// hacky way to do operations on our adp-devsite-stage env
22+
if ((siteEnv.includes('stage') && operation.includes('preview')) || (siteEnv.includes('stage') && operation.includes('cache'))) {
23+
args = `--header "x-content-source-authorization: ${branch}"`;
24+
} else {
25+
args = '';
26+
}
27+
28+
changes.forEach((file) => {
29+
// have to pop src/pages from the file path
30+
file = file.replace('src/pages/', '');
31+
32+
const theFilePath = `${pathPrefix}/${file}`;
33+
const url = `https://admin.hlx.page/${operation}/adobedocs/${edsSiteEnv}/${codeRepoBranch}${theFilePath}`;
34+
const cmd = `curl -X${httpMethod} -vi ${args} ${url}`;
35+
36+
exec(cmd, (error, execOut, execErr) => {
37+
if (error) {
38+
console.error(`::group:: Error ${theFilePath} \n${execErr} \n::endgroup::`)
39+
return;
40+
}
41+
42+
console.log(`::group:: Running ${operation} on ${theFilePath} \nThe command: ${cmd} \n${execOut} \n::endgroup::`);
43+
});
44+
});
45+
46+
deletions.forEach((file) => {
47+
// have to pop src/pages from the file path
48+
file = file.replace('src/pages/', '');
49+
50+
const theFilePath = `${pathPrefix}/${file}`;
51+
const deleteUrl = `https://admin.hlx.page/${operation}/adobedocs/${edsSiteEnv}/${codeRepoBranch}${theFilePath}`;
52+
const deleteCmd = `curl -XDELETE -vi ${args} ${deleteUrl}`;
53+
54+
55+
exec(deleteCmd, (deleteError, deleteExecOut, deleteExecErr) => {
56+
if (deleteError) {
57+
console.error(`::group:: Deleting error ${theFilePath} \n${deleteExecErr} \n::endgroup::`)
58+
return;
59+
}
60+
61+
console.log(`::group:: Deleting ${operation} on ${theFilePath} \nThe command: ${deleteCmd} \n${deleteExecOut} \n::endgroup::`);
62+
});
63+
});
64+
}

.github/scripts/get-path-prefix.js

Lines changed: 110 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,127 @@
1-
// This script retrieves the pathPrefix from the gatsby-config.js file.
1+
// This script retrieves the pathPrefix from the config.md file and validates it against the pathPrefix from devsite-paths.json.
22
// It serves as an example for how to set up external javascript functions
33
// outside workflow .yml files when they get too big or complex to keep them inline.
44

55
// Documentation for the actions/github-script:
66
// https://github.com/actions/github-script#run-a-separate-file
77

8-
module.exports = async ({ core }) => {
9-
const { pathPrefix } = await require('../../gatsby-config.js');
8+
const CONFIG_PATH = `./src/pages/config.md`;
9+
const DEVSITE_STAGE_HOST = `https://main--adp-devsite-stage--adobedocs.aem.page`;
10+
const DEVSITE_PROD_HOST = `https://main--adp-devsite--adobedocs.aem.live`;
11+
const DEVSITE_PATHNAME = `/franklin_assets/devsitepaths.json`;
1012

11-
if (!pathPrefix) {
12-
core.setFailed(
13-
`The pathPrefix in the site's gatsby-config.js file is missing.
13+
module.exports = async ({ core, isStage, isProd }) => {
14+
const fs = await require('fs');
15+
if (!fs.existsSync(CONFIG_PATH)) {
16+
core.setFailed(
17+
`The site's config.md file is missing.
18+
19+
To fix this, either create one in ./src/pages, or auto-generate one from the site's gatsby-config.md file by building navigation file.`
20+
);
21+
return;
22+
}
1423

15-
To fix this, open your gatsby-config.js file, and add it to the config object:
24+
const string = fs.readFileSync(CONFIG_PATH).toString() ?? "";
25+
const lines = string.split('\n');
1626

17-
module.exports = {
18-
pathPrefix: "/commerce/frontend-core/",
19-
...
20-
}`
21-
);
22-
} else if (pathPrefix === '/') {
23-
core.setFailed(
24-
`The pathPrefix in the site's gatsby-config.js file is set to "/". This is not allowed.
27+
// find the pathPrefix key
28+
const keyIndex = lines.findIndex(line => line.includes("pathPrefix:"));
2529

26-
To fix this, change the pathPrefix to include a name that starts and ends with "/":
30+
if (keyIndex < 0) {
31+
core.setFailed(
32+
`The pathPrefix in the site's config.md file is missing.
2733
28-
pathPrefix: "/commerce/frontend - core/"
34+
To fix this, open your config.md file, and add it to the config object:
35+
36+
- pathPrefix:
37+
...`
38+
);
39+
return;
40+
}
2941

30-
This name identifies the site within the developer.adobe.com domain:
31-
https://developer.adobe.com/document-services/<PATH_TO_FILES>.
32-
`
33-
);
34-
} else {
35-
if (!pathPrefix.startsWith('/') || !pathPrefix.endsWith('/')) {
42+
// find the pathPrefix value
43+
const line = lines.slice(keyIndex + 1)?.find(line => line.trimStart().startsWith("-")) ?? "";
44+
45+
// remove whitespace at start, remove dash (i.e. first non-whitespace character), and remove whitespace at start and end
46+
const pathPrefix = line.trimStart().substring(1).trim();
47+
48+
if (!pathPrefix) {
3649
core.setFailed(
37-
`The pathPrefix in the site's gatsby-config.js file does not start or end with "/".
50+
`The pathPrefix in the site's config.md file is missing.
3851
39-
To fix this, change the pathPrefix to include a name that starts and ends with "/".
40-
For example: "/document-services/" or "/commerce/cloud-tools/".
52+
To fix this, open your config.md file, and add it to the config object:
4153
42-
This is required by convention because of the way we construct site URLs.
43-
For example: https://developer.adobe.com + /document-services/ + path/to/files/.
44-
`
54+
- pathPrefix:
55+
- /commerce/frontend-core/
56+
...`
4557
);
58+
} else if (pathPrefix === '/') {
59+
core.setFailed(
60+
`The pathPrefix in the site's config.md file is set to "/". This is not allowed.
61+
62+
To fix this, change the pathPrefix to include a name that starts and ends with "/".
63+
64+
For example: "/commerce/frontend - core/"
65+
66+
This name identifies the site within the developer.adobe.com domain:
67+
https://developer.adobe.com/document-services/<PATH_TO_FILES>.
68+
`
69+
);
70+
} else if (!pathPrefix.startsWith('/') || !pathPrefix.endsWith('/')) {
71+
core.setFailed(
72+
`The pathPrefix in the site's config.md file does not start or end with "/".
73+
74+
pathPrefix: "${pathPrefix}"
75+
76+
To fix this, change the pathPrefix to include a name that starts and ends with "/".
77+
For example: "/document-services/" or "/commerce/cloud-tools/".
78+
79+
This is required by convention because of the way we construct site URLs.
80+
For example: https://developer.adobe.com + /document-services/ + path/to/files/.
81+
`
82+
);
83+
}
84+
85+
// TODO: devsitepaths pathPrefix currently do not have a trailing slash
86+
// will need to refactor all path prefix listings to include them
87+
// but for now checked with a popped trailing slash
88+
89+
const poppedPathPrefix = pathPrefix.substring(0, pathPrefix.length-1);
90+
// must convert values to boolean from string
91+
if(isStage.toLowerCase() === 'true') {
92+
const stageEntries = await (await fetch(`${DEVSITE_STAGE_HOST}${DEVSITE_PATHNAME}`)).json();
93+
const stageEntry = stageEntries?.data?.find(entry => entry.pathPrefix === poppedPathPrefix);
94+
95+
if(!stageEntry) {
96+
core.setFailed(
97+
`The pathPrefix in the site's config.md file was not found in the STAGE gdrive's devsitepaths.json.
98+
99+
pathPrefix from config.md: "${pathPrefix}"
100+
devsitepath.json location: "${DEVSITE_STAGE_HOST}${DEVSITE_PATHNAME}"
101+
102+
To fix this, make sure the pathPrefix listed in the config.md is in the devsitepath.json location.
103+
`
104+
);
105+
}
46106
}
47-
}
48-
core.setOutput('path_prefix', pathPrefix);
49-
};
107+
108+
// must convert values to boolean from string
109+
if(isProd.toLowerCase() === 'true') {
110+
const prodEntries = await (await fetch(`${DEVSITE_PROD_HOST}${DEVSITE_PATHNAME}`)).json();
111+
const prodEntry = prodEntries?.data?.find(entry => entry.pathPrefix === poppedPathPrefix);
112+
113+
if(!prodEntry) {
114+
core.setFailed(
115+
`The pathPrefix in the site's config.md file was not found in the PROD gdrive's devsitepaths.json.
116+
117+
pathPrefix from config.md: "${pathPrefix}"
118+
devsitepath.json location: "${DEVSITE_PROD_HOST}${DEVSITE_PATHNAME}"
119+
120+
To fix this, make sure the pathPrefix listed in the config.md is in the devsitepath.json location.
121+
`
122+
);
123+
}
124+
}
125+
126+
core.setOutput('path_prefix', poppedPathPrefix);
127+
}

0 commit comments

Comments
 (0)