Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
b85863d
update scripts and files
louisachu May 7, 2025
5eb48e6
update scripts and file paths
louisachu May 8, 2025
7e6dbe0
update
louisachu May 8, 2025
ce734ed
update links
louisachu May 8, 2025
0cf43bc
update embed links
louisachu May 8, 2025
0b15bb9
update embed links
louisachu May 8, 2025
47c53aa
update application-state
louisachu May 8, 2025
320100c
Update application-state.md
louisachu May 8, 2025
f3f53c3
update application-state
louisachu May 8, 2025
489582a
update userapi.md
louisachu May 8, 2025
45cd2a6
update runtime
louisachu May 8, 2025
e1c3e3c
update runtime
louisachu May 9, 2025
e625279
update runtime
louisachu May 9, 2025
0226629
update runtime
louisachu May 9, 2025
8c3bdac
update runtime
louisachu May 9, 2025
708e3fc
update runtime
louisachu May 10, 2025
d7036e7
update runtime
louisachu May 10, 2025
3476205
update runtime
louisachu May 10, 2025
7e0f653
update files with horizontal ruler
louisachu May 12, 2025
75ec467
update runtime.md
louisachu May 12, 2025
02464c0
update application-state
louisachu May 13, 2025
a991cb6
update
louisachu May 13, 2025
df311f8
update for testing
louisachu May 13, 2025
d9a6c32
update
louisachu May 13, 2025
2dc0184
update
louisachu May 13, 2025
6081d64
update
louisachu May 13, 2025
b928f42
update
louisachu May 13, 2025
dbcee7b
update
louisachu May 13, 2025
ac3ced4
update
louisachu May 13, 2025
6614198
update
louisachu May 13, 2025
618f42d
update
louisachu May 13, 2025
83ba0ed
update
louisachu May 13, 2025
7527980
update
louisachu May 13, 2025
7a2123b
update
louisachu May 13, 2025
180b559
update
louisachu May 13, 2025
088fe87
update
louisachu May 13, 2025
3f82bf0
update
louisachu May 13, 2025
4d66655
update
louisachu May 13, 2025
589349f
update
louisachu May 13, 2025
f03310c
update
louisachu May 13, 2025
ba4d5fd
update
louisachu May 13, 2025
6ffee17
update
louisachu May 13, 2025
a8d5218
update
louisachu May 13, 2025
164cb68
update
louisachu May 13, 2025
15de06e
update throughput-tuning
louisachu May 13, 2025
b4c7a7e
update throughput
louisachu May 13, 2025
8679af8
update throughput
louisachu May 13, 2025
59263ab
update config.md
louisachu May 13, 2025
c4dc5bc
update
louisachu May 14, 2025
a850b07
update
louisachu May 14, 2025
d453cd1
update
louisachu May 14, 2025
64a978b
update
louisachu May 14, 2025
e464b3e
update api-ref.md
louisachu May 14, 2025
fc273a6
update
louisachu May 14, 2025
ea91d80
update
louisachu May 14, 2025
d6bfcde
update throughput-tuning
louisachu May 14, 2025
97f0bf2
update throughput
louisachu May 14, 2025
92b7921
update
louisachu May 14, 2025
4ac422e
update
louisachu May 14, 2025
8194fab
update throughput-tuning
louisachu May 14, 2025
993f176
update
louisachu May 14, 2025
3bff4c7
update
louisachu May 14, 2025
eaec75f
update throughput
louisachu May 14, 2025
5927199
update
louisachu May 14, 2025
e709c80
update
louisachu May 14, 2025
76f3f84
update
louisachu May 14, 2025
4aeb039
update
louisachu May 14, 2025
5836140
update
louisachu May 14, 2025
42d9e89
update with escape
louisachu May 14, 2025
843ed33
update < syntax
louisachu May 14, 2025
71692b0
update missing links
louisachu May 14, 2025
350e4e7
update links
louisachu May 14, 2025
7eda793
update missing images
louisachu May 14, 2025
e425539
update understanding runtime paths
louisachu May 15, 2025
3e64dab
update application-state.md
louisachu May 15, 2025
39d2a4a
update application-state.md
louisachu May 15, 2025
e80a54d
update
louisachu May 15, 2025
26ef13a
update
louisachu May 15, 2025
b11e87b
update configuringproxy.md
louisachu May 15, 2025
df5441e
update requirements.md
louisachu May 15, 2025
ab9224b
update fragment
louisachu May 15, 2025
d12f71c
update
louisachu May 15, 2025
b09316c
update requirements fragment
louisachu May 15, 2025
ca9d1cb
update requirements
louisachu May 15, 2025
e7cb6f3
update requirement component link
louisachu May 15, 2025
77b7baa
update
louisachu May 15, 2025
8ea1f09
update link
louisachu May 15, 2025
b052c47
update sampleApp
louisachu May 15, 2025
427f613
update
louisachu May 15, 2025
4811dcc
update
louisachu May 15, 2025
0543750
update application-state
louisachu May 15, 2025
8033561
update
louisachu May 15, 2025
2c40450
with no table
louisachu May 15, 2025
c6e741b
update
louisachu May 15, 2025
463f8b3
update
louisachu May 16, 2025
8bf9c3f
update
louisachu May 16, 2025
14c832b
without badge
louisachu May 16, 2025
e8dd065
update
louisachu May 16, 2025
2041ce2
update badge icon
louisachu May 20, 2025
28a2f1b
update sample app
louisachu May 21, 2025
9b1ab52
test
louisachu May 21, 2025
e08ea90
update
louisachu May 21, 2025
b0c79ec
update
louisachu May 21, 2025
718b7f1
update
louisachu May 21, 2025
9fc81c1
update
louisachu May 21, 2025
997a293
update demo
louisachu May 21, 2025
49c0ea3
update
louisachu May 21, 2025
1bbf291
update sample_app
louisachu May 21, 2025
0a6695e
update
louisachu May 21, 2025
c41d4f4
update sample_app
louisachu May 21, 2025
1c4dd82
remove badge from setup page
louisachu May 21, 2025
801b7b6
update scripts
louisachu May 21, 2025
c9cccf9
update sample_app
louisachu May 21, 2025
b5fa6a2
update sample_app
louisachu May 21, 2025
46040aa
update first-app changes
louisachu May 21, 2025
838bfef
update interface.md
louisachu May 22, 2025
e1a4d3a
resolve conflicts
louisachu May 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
blank_issues_enabled: false
contact_links:
- name: Help Center
url: https://helpx.adobe.com/support.html
about: Find help with issues unrelated to documentation here.
- name: Community resources
url: https://developer.adobe.com/open
about: Find more resources here.
- name: Adobe Developer Support
url: https://developer.adobe.com/developer-support
about: Ask and answer questions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/incorrect_topic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Incorrect or unclear topic
description: "Unclear or incorrect documentation: ambiguous guidelines, wrong or obsolete examples, typos, etc."
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to report this issue!
This request should only relate to the content of the developer.adobe.com website.
Requests that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the documentation you are requesting.
options:
- label: I have searched the existing issues
required: true
- type: input
attributes:
label: Which topic?
description: A link to the topic that needs clarification or correction
placeholder: "Example: https://developer.adobe.com/commerce/webapi/rest/use-rest/search-endpoint/"
validations:
required: true
- type: textarea
attributes:
label: What's wrong with the content?
validations:
required: true
- type: textarea
attributes:
label: What changes do you propose?
- type: textarea
attributes:
label: Anything else that can help to cover this?
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/missing_content.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Missing content
description: Undocumented feature, service, command, API, UI component, procedure, etc.
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to report this issue!
This request should only relate to the content of the developer.adobe.com website.
Requests that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the documentation you are requesting.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: What's missing?
placeholder: |
- In the <guide name> or <page link> ...
- Missing explanation of how ... works.
- Missing steps or guidelines for ....
- Missing code samples to demonstrate ....
- Something else ...
validations:
required: true
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/site_bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Site bug
description: Something isn't working on developer.adobe.com or when building the website locally.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to report this issue!
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.
Issues that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
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.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Expected behavior
description: |
Tell us what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Actual behavior
description: |
Tell us what happened. Include error messages and issues.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: |
Provide a set of clear steps to reproduce this bug.
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
Describe your environment such as platform, browser, and versions.
Provide all the details that will help us to reproduce the bug.
value: |
- Browser:
- OS:
validations:
required: true
- type: textarea
attributes:
label: Sample code
description: Sample Code that illustrates the problem
- type: textarea
attributes:
label: Logs
description: Logs taken while reproducing problem
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/site_feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Site feature request
description: Propose a new functionality or an improvement of the developer.adobe.com website or of the local development tools.
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to report this issue!
This feature request should only relate to the developer.adobe.com website itself and its behavior.
Requests that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the feature you are requesting.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: What feature should be added?
validations:
required: true
- type: textarea
attributes:
label: What is the expected behavior?
validations:
required: true
- type: textarea
attributes:
label: How will this feature improve the user experience?
validations:
required: true
- type: textarea
attributes:
label: What would a solution for this issue look like?
64 changes: 64 additions & 0 deletions .github/scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const { exec } = require('child_process');

module.exports = async ({ core, changes, deletions, operation, siteEnv, branch, pathPrefix }) => {
let httpMethod, edsSiteEnv, codeRepoBranch, args;
if (operation.includes('cache') || operation.includes('preview') || operation.includes('live')) {
httpMethod = 'POST';
} else {
console.error('Unknown operation method');
}

if (siteEnv.includes('stage')) {
edsSiteEnv = "adp-devsite-stage";
codeRepoBranch = "stage";
} else if (siteEnv.includes('prod')) {
edsSiteEnv = "adp-devsite";
codeRepoBranch = "main";
} else {
console.error('Unknown env to deploy to');
}

// hacky way to do operations on our adp-devsite-stage env
if ((siteEnv.includes('stage') && operation.includes('preview')) || (siteEnv.includes('stage') && operation.includes('cache'))) {
args = `--header "x-content-source-authorization: ${branch}"`;
} else {
args = '';
}

changes.forEach((file) => {
// have to pop src/pages from the file path
file = file.replace('src/pages/', '');

const theFilePath = `${pathPrefix}/${file}`;
const url = `https://admin.hlx.page/${operation}/adobedocs/${edsSiteEnv}/${codeRepoBranch}${theFilePath}`;
const cmd = `curl -X${httpMethod} -vi ${args} ${url}`;

exec(cmd, (error, execOut, execErr) => {
if (error) {
console.error(`::group:: Error ${theFilePath} \n${execErr} \n::endgroup::`)
return;
}

console.log(`::group:: Running ${operation} on ${theFilePath} \nThe command: ${cmd} \n${execOut} \n::endgroup::`);
});
});

deletions.forEach((file) => {
// have to pop src/pages from the file path
file = file.replace('src/pages/', '');

const theFilePath = `${pathPrefix}/${file}`;
const deleteUrl = `https://admin.hlx.page/live/adobedocs/${edsSiteEnv}/${codeRepoBranch}${theFilePath}`;
const deleteCmd = `curl -XDELETE -vi ${args} ${deleteUrl}`;


exec(deleteCmd, (deleteError, deleteExecOut, deleteExecErr) => {
if (deleteError) {
console.error(`::group:: Deleting error ${theFilePath} \n${deleteExecErr} \n::endgroup::`)
return;
}

console.log(`::group:: Deleting ${theFilePath} \n${deleteExecOut} \n::endgroup::`);
});
});
}
142 changes: 110 additions & 32 deletions .github/scripts/get-path-prefix.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,127 @@
// This script retrieves the pathPrefix from the gatsby-config.js file.
// This script retrieves the pathPrefix from the config.md file and validates it against the pathPrefix from devsite-paths.json.
// It serves as an example for how to set up external javascript functions
// outside workflow .yml files when they get too big or complex to keep them inline.

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

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

if (!pathPrefix) {
core.setFailed(
`The pathPrefix in the site's gatsby-config.js file is missing.
module.exports = async ({ core, isStage, isProd }) => {
const fs = await require('fs');
if (!fs.existsSync(CONFIG_PATH)) {
core.setFailed(
`The site's config.md file is missing.

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.`
);
return;
}

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

module.exports = {
pathPrefix: "/commerce/frontend-core/",
...
}`
);
} else if (pathPrefix === '/') {
core.setFailed(
`The pathPrefix in the site's gatsby-config.js file is set to "/". This is not allowed.
// find the pathPrefix key
const keyIndex = lines.findIndex(line => line.includes("pathPrefix:"));

To fix this, change the pathPrefix to include a name that starts and ends with "/":
if (keyIndex < 0) {
core.setFailed(
`The pathPrefix in the site's config.md file is missing.

pathPrefix: "/commerce/frontend - core/"
To fix this, open your config.md file, and add it to the config object:

- pathPrefix:
...`
);
return;
}

This name identifies the site within the developer.adobe.com domain:
https://developer.adobe.com/document-services/<PATH_TO_FILES>.
`
);
} else {
if (!pathPrefix.startsWith('/') || !pathPrefix.endsWith('/')) {
// find the pathPrefix value
const line = lines.slice(keyIndex + 1)?.find(line => line.trimStart().startsWith("-")) ?? "";

// remove whitespace at start, remove dash (i.e. first non-whitespace character), and remove whitespace at start and end
const pathPrefix = line.trimStart().substring(1).trim();

if (!pathPrefix) {
core.setFailed(
`The pathPrefix in the site's gatsby-config.js file does not start or end with "/".
`The pathPrefix in the site's config.md file is missing.

To fix this, change the pathPrefix to include a name that starts and ends with "/".
For example: "/document-services/" or "/commerce/cloud-tools/".
To fix this, open your config.md file, and add it to the config object:

This is required by convention because of the way we construct site URLs.
For example: https://developer.adobe.com + /document-services/ + path/to/files/.
`
- pathPrefix:
- /commerce/frontend-core/
...`
);
} else if (pathPrefix === '/') {
core.setFailed(
`The pathPrefix in the site's config.md file is set to "/". This is not allowed.

To fix this, change the pathPrefix to include a name that starts and ends with "/".

For example: "/commerce/frontend - core/"

This name identifies the site within the developer.adobe.com domain:
https://developer.adobe.com/document-services/<PATH_TO_FILES>.
`
);
} else if (!pathPrefix.startsWith('/') || !pathPrefix.endsWith('/')) {
core.setFailed(
`The pathPrefix in the site's config.md file does not start or end with "/".

pathPrefix: "${pathPrefix}"

To fix this, change the pathPrefix to include a name that starts and ends with "/".
For example: "/document-services/" or "/commerce/cloud-tools/".

This is required by convention because of the way we construct site URLs.
For example: https://developer.adobe.com + /document-services/ + path/to/files/.
`
);
}

// TODO: devsitepaths pathPrefix currently do not have a trailing slash
// will need to refactor all path prefix listings to include them
// but for now checked with a popped trailing slash

const poppedPathPrefix = pathPrefix.substring(0, pathPrefix.length-1);
// must convert values to boolean from string
if(isStage.toLowerCase() === 'true') {
const stageEntries = await (await fetch(`${DEVSITE_STAGE_HOST}${DEVSITE_PATHNAME}`)).json();
const stageEntry = stageEntries?.data?.find(entry => entry.pathPrefix === poppedPathPrefix);

if(!stageEntry) {
core.setFailed(
`The pathPrefix in the site's config.md file was not found in the STAGE gdrive's devsitepaths.json.

pathPrefix from config.md: "${pathPrefix}"
devsitepath.json location: "${DEVSITE_STAGE_HOST}${DEVSITE_PATHNAME}"

To fix this, make sure the pathPrefix listed in the config.md is in the devsitepath.json location.
`
);
}
}
}
core.setOutput('path_prefix', pathPrefix);
};

// must convert values to boolean from string
if(isProd.toLowerCase() === 'true') {
const prodEntries = await (await fetch(`${DEVSITE_PROD_HOST}${DEVSITE_PATHNAME}`)).json();
const prodEntry = prodEntries?.data?.find(entry => entry.pathPrefix === poppedPathPrefix);

if(!prodEntry) {
core.setFailed(
`The pathPrefix in the site's config.md file was not found in the PROD gdrive's devsitepaths.json.

pathPrefix from config.md: "${pathPrefix}"
devsitepath.json location: "${DEVSITE_PROD_HOST}${DEVSITE_PATHNAME}"

To fix this, make sure the pathPrefix listed in the config.md is in the devsitepath.json location.
`
);
}
}

core.setOutput('path_prefix', poppedPathPrefix);
}
Loading