Documentation site deployed to EDS.
The production address is https://developer.adobe.com/<pathPrefix>/
For local development, you need to start three servers:
- Content server (your content repo):
npm run dev- Code server (adp-devsite):
git clone https://github.com/AdobeDocs/adp-devsite
cd adp-devsite
npm install
npm run dev- Runtime connector (devsite-runtime-connector):
git clone https://github.com/aemsites/devsite-runtime-connector
cd devsite-runtime-connector
npm install
npm run devOnce all three servers are running, navigate to http://localhost:3000/<pathPrefix>
Development
npm run dev- Start local server (requires other services above)
Content Management
-
npm run buildNavigation- Generate navigation structure (one-time Gatsby migration only). This will generate config.md which is a replacement of gatsby-config.js.⚠️ WARNING: This will overwrite any manual edits tosrc/pages/config.md. Only run during initial setup. -
npm run buildRedirections- Build URL redirections (one-time Gatsby migration only). This generates client-side redirects to support EDS behavior with URLs (trailing slashes).⚠️ WARNING: This will overwrite any manual edits tosrc/pages/redirects.json. Only run during initial setup.📝 Note: This creates client-side redirects only. For server-side redirects (Fastly), please reach out to the devsite team.
-
npm run normalizeLinks- Normalize internal/external links -
npm run renameFiles- Rename files to Adobe conventions. Make sure run normalizeLinks first to ensure the links get renamed.
Validation
npm run lint- Run linting checks (also runs automatically on PRs to main and during deploy)
Site Features
npm run buildSiteWideBanner- Generate site-wide banner
Automated: Runs on PRs and deploy when src/pages/** files change
Manual: npm run lint
Validates markdown syntax, links, content structure, and Adobe style guidelines.
Troubleshooting: If pages are not showing up as expected, check lint errors or warnings to identify potential issues.
To update navigation structure:
- Edit
src/pages/config.mddirectly
Note: npm run buildNavigation is only needed for initial Gatsby migration. The config.md is a replacement of gatsby-config.js.
src/pages/config.md. Only run during initial setup.
The fastlyRedirects.js script manages redirect rules in Fastly CDN by reading redirects from a redirects.json file and uploading them to a Fastly edge dictionary.
You need to set these environment variables (set in the .env file) and in the content repo's folder at the root:
# Required for all operations
FASTLY_API_TOKEN=your_fastly_api_token
# For stage environment
FASTLY_DEVELOPER_STAGE_ADOBE_COM_SERVICE_ID=your_stage_service_id
FASTLY_DEVELOPER_STAGE_ADOBE_COM_INT_TO_INT_TABLE_ID=your_stage_dictionary_id
# For prod environment
FASTLY_DEVELOPER_ADOBE_COM_SERVICE_ID=your_prod_service_id
FASTLY_DEVELOPER_ADOBE_COM_INT_TO_INT_TABLE_ID=your_prod_dictionary_idCreate a redirects.json file using the buildRedirections.js script. buildRedirections.js should be called after using normalizeLinks.js, then buildNavigation.js so the buildRedirections.js will output the most up to date redirects.json file. It will generate a file with this format:
{
"data": [
{
"Source": "/old-path",
"Destination": "/new-path"
},
{
"Source": "/another-old-path",
"Destination": "/another-new-path"
}
]
}node bin/fastlyRedirects.js [environment] [flags]From the content repo:
npx --yes github:AdobeDocs/adp-devsite-utils fastlyRedirects [environment] [flags]Environment (positional, optional):
stage- Updates stage environment (default if not specified)prod- Updates production environment
Flags (optional):
--dry-runor-d- Preview changes without making actual API calls--verboseor-v- Show detailed output including API requests/responses
-
Test in stage with dry run (recommended first step):
node bin/fastlyRedirects.js stage --dry-run --verbose
-
Update stage environment:
node bin/fastlyRedirects.js stage
-
Update production environment (use with caution):
node bin/fastlyRedirects.js prod
-
Preview production changes without applying:
node bin/fastlyRedirects.js prod --dry-run
-
Test in content repo with stage and with a dry run:
npx --yes github:AdobeDocs/adp-devsite-utils fastlyRedirects stage --dry-run --verbose
- Loads the
redirects.jsonfile from the current working directory - Validates the redirect structure
- For each redirect, makes a POST request to Fastly's API to add the redirect to the dictionary
- The redirects are stored as key-value pairs (Source → Destination) in the Fastly edge dictionary
- Always test with
--dry-runfirst to preview changes - Use
--verboseto troubleshoot issues - The script defaults to
stageenvironment for safety - Each redirect becomes a dictionary item in Fastly that can be used for URL rewriting at the edge
Staging:
- Actions > Deployment > Run workflow
- Can deploy from any branch to staging
- Uses incremental builds from last successful workflow deploy on the current branch by default. Will use the commit before HEAD if no successful workflow deploy found
- Use
deployAllfunction for full rebuild if needed - URL:
developer-stage.adobe.com/<pathPrefix>/
Production:
- Automatically deploys from
mainbranch - Uses incremental builds from last successful workflow deploy
- URL:
developer.adobe.com/<pathPrefix>/
This feature is in the testing stage please contact the DevSite team if you'd like to use it or need support
Initial Generation for all files: Processes all markdown files in the specified folder to generate comprehensive AI metadata. Creates a pull request with the generated metadata added to frontmatter of each file. The generated metadata can be edited/changed or deleted entirely in the branch the action created.
- Actions > Initial AI Generation > set inputs > Run workflow
- Use worfklow from: Set as
main - Target branch: will send ai generated metadata as changes in a PR to whatever branch you set - default is
main - Folder path: set to read ALL files in a folder path or only some - default is
src/pages/*
- Use worfklow from: Set as
Nightly Refresh for changed files: Identifies files that have changed since a specific commit and generates updated AI metadata only for those files. Useful for keeping metadata current without processing unchanged content. Creates a pull request with the generated metadata added to frontmatter of each file. The generated metadata can be edited/changed or deleted entirely in the branch the action created.
- Actions > Nightly AI Metadata Refresh > set inputs > Run workflow
- Use workflow from: Set as
main - Base SHA: Use base SHA commit to compare changes from (leave empty to use last commit before HEAD)
- Target branch: will send ai generated metadata as changes in a PR to whatever branch you set - default is
main - Folder path: set to read ALL files in a folder path or only some - default is
src/pages/* - Note: This workflow also runs automatically every night at 2 AM UTC to process recently changed files
- Use workflow from: Set as
Generation on Pull Requests for changed files: Automatically analyzes files changed in pull requests and generates AI metadata suggestions. Adds a comment to the PR with proposed metadata updates that can be reviewed and applied.
- Runs automatically when PRs are created/updated to merge to
mainwith changes to files insrc/pages/** - Generates AI metadata for files changed in the PR
- Note: Skips PRs with titles starting with "[AI PR] Metadata Update" or branch names starting with "ai-metadata" to avoid loops
Note: will only read valid files (skips images and binary files) and right now will skip files with JSX components but we are working on fixing that. These workflows are only for EDS repos.
Join #adobe-developer-website Slack channel for help.