Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
env: ${{ inputs.env }}
baseSha: ${{ inputs.baseSha }}
deployAll: ${{ inputs.deployAll }}
lint:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint
run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v
run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v
32 changes: 16 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Lint
on:
pull_request:
branches: [main]
paths:
- 'src/pages/**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint
run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v
name: Lint
on:
pull_request:
branches: [main]
paths:
- 'src/pages/**'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Lint
run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v
97 changes: 85 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,91 @@
## Git config
git config core.ignorecase false
# Adobe Dev Template Documentation

## How to set navigation
Create a directory hierarchy in `src/pages/config.md`
Adobe Dev Template documentation site deployed to EDS.
The production address is https://developer.adobe.com/<path-prefix>

## Local development
This is not possible at the moment (we're still working on it)
## Quick Start

## Launching a deploy
Go to Actions > Deployment > Run workflow
For local development, you need to start three servers:

## URL
developer-stage.adobe.com/{path-prefix}/{relative-path-to-file}
1. **Main dev server** (this repo):
```bash
npm run dev
```

## Where to ask for help
2. **ADP Devsite** ([adp-devsite](https://github.com/AdobeDocs/adp-devsite)):
```bash
git clone https://github.com/AdobeDocs/adp-devsite
cd adp-devsite
npm install
npm run dev
```

The slack channel #adobe-developer-website is our main point of contact for help. Feel free to join the channel and ask any questions.
3. **Runtime connector** ([devsite-runtime-connector](https://github.com/aemsites/devsite-runtime-connector)):
```bash
git clone https://github.com/aemsites/devsite-runtime-connector
cd devsite-runtime-connector
npm install
npm run dev
```

Once all three servers are running, navigate to http://localhost:3000/<pathPrefix>

## Commands

**Development**
- `npm run dev` - Start local server (requires other services above)

**Content Management**
- `npm run buildNavigation` - Generate navigation structure (one-time Gatsby migration only)
- `npm run buildRedirections` - Build URL redirections (one-time Gatsby migration only)
- `npm run renameFiles` - Rename files to Adobe conventions
- `npm run normalizeLinks` - Normalize internal/external links

**Validation**
- `npm run lint` - Run linting checks

**Site Features**
- `npm run buildSiteWideBanner` - Generate site-wide banner

*All commands use `@AdobeDocs/adp-devsite-utils` for standardized tooling.*

## Linting

**Automated**: Runs on PRs 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 warnings to identify potential issues.

## Navigation

To update navigation structure:
1. Edit `src/pages/config.md` directly

*Note: `npm run buildNavigation` is only needed for initial Gatsby migration.*

## Redirects

To manage URL redirections:
1. Edit `src/pages/redirects.json` directly

*Note: `npm run buildRedirections` is only needed for initial Gatsby migration.*

## Deployment

**Staging**:
- Actions > Deployment > Run workflow
- Can deploy from any branch to staging
- Uses incremental builds from last commit by default
- Use `deployAll` function for full rebuild if needed
- **URL**: `developer-stage.adobe.com/<path-prefix>/`

**Production**:
- Automatically deploys from `main` branch
- Uses incremental builds from last commit
- **URL**: `developer.adobe.com/<path-prefix>/`

## Support

Join `#adobe-developer-website` Slack channel for help.
28 changes: 28 additions & 0 deletions dev.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// content/docs
// serve static on 3001

import express from 'express';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const PORT = process.env.DEV_PORT || 3003;

// TODO: ensure `DOCS_DIRECTORY` starts with `/`
const DOCS_DIRECTORY = process.env.DIRECTORY || './src/pages';

const app = express();
console.log(path.resolve(__dirname, `./${DOCS_DIRECTORY}`));
app.use(
express.static(path.resolve(__dirname, `./${DOCS_DIRECTORY}`), {
setHeaders: (res) => {
res.setHeader('last-modified', new Date().toGMTString());
},
}),
);

app.listen(PORT, () => {
console.debug(`Docs dev server is running on port ${PORT}`);
});
Loading