Skip to content

Commit 16bc129

Browse files
committed
feat(website): launch professional marketing site
1 parent 0f17acd commit 16bc129

9 files changed

Lines changed: 504 additions & 426 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ npm run build
1717
- `src/index.html` — single-page marketing site.
1818
- `src/styles.css` — responsive visual system.
1919
- `src/assets/repo-social-preview.png` — Open Graph and Twitter preview image.
20+
- `src/assets/org-logo.svg` — brand mark used in the page header and hero.
2021
- `src/main.js` — progressive enhancements only.
2122
- `scripts/validate.mjs` — static checks for local links, copy placeholders, and required sections.
2223
- `scripts/build.mjs` — copies `src` into `dist` for GitHub Pages or any static host.
@@ -27,6 +28,6 @@ The included GitHub Pages workflow builds `dist` and publishes it as a static ar
2728

2829
## Design constraints
2930

30-
- One checked-in social preview image, shared with the GitHub organization profile assets.
31+
- Checked-in brand images shared with the GitHub organization profile assets.
3132
- No runtime dependencies.
3233
- Fast, readable, and easy to fork into a richer docs site later.

package-lock.json

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@
2727
"bugs": {
2828
"url": "https://github.com/agent-dispatch/website/issues"
2929
},
30-
"homepage": "https://agent-dispatch.github.io/website"
30+
"homepage": "https://agent-dispatch.github.io/website",
31+
"engines": {
32+
"node": ">=20.19"
33+
}
3134
}

scripts/validate.mjs

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
77
const srcDir = resolve(repoRoot, "src");
88
const indexPath = resolve(srcDir, "index.html");
99
const requiredSections = [
10-
"hero",
11-
"how-it-works",
12-
"packages",
13-
"agentcore",
14-
"quickstart",
15-
"roadmap"
10+
"top",
11+
"why",
12+
"install"
1613
];
1714

1815
const index = await readFile(indexPath, "utf8");
@@ -41,17 +38,41 @@ const socialPreviewPath = resolve(srcDir, "assets", "repo-social-preview.png");
4138
if (!existsSync(socialPreviewPath)) {
4239
throw new Error("Missing required social preview image: src/assets/repo-social-preview.png");
4340
}
41+
const socialPreviewDimensions = await readPngDimensions(socialPreviewPath);
42+
if (socialPreviewDimensions.width !== 1280 || socialPreviewDimensions.height !== 640) {
43+
throw new Error(
44+
`Social preview image must be 1280x640; got ${socialPreviewDimensions.width}x${socialPreviewDimensions.height}.`
45+
);
46+
}
47+
48+
const orgLogoPath = resolve(srcDir, "assets", "org-logo.svg");
49+
if (!existsSync(orgLogoPath)) {
50+
throw new Error("Missing required organization logo: src/assets/org-logo.svg");
51+
}
4452

4553
for (const placeholder of ["TODO", "lorem", "ipsum", "undefined"]) {
4654
if (index.toLowerCase().includes(placeholder.toLowerCase())) {
4755
throw new Error(`Found placeholder text: ${placeholder}`);
4856
}
4957
}
5058

59+
for (const expected of [
60+
"docs",
61+
"live-aws-verification.md",
62+
"spawn_cloud_agent",
63+
"@agent-dispatch/mcp-server",
64+
"Live AWS dispatch remains opt-in"
65+
]) {
66+
if (!index.includes(expected)) {
67+
throw new Error(`Missing required website copy: ${expected}`);
68+
}
69+
}
70+
5171
for (const match of index.matchAll(/(?:href|src)="([^"]+)"/g)) {
5272
const target = match[1];
5373
if (target.startsWith("http") || target.startsWith("#") || target.startsWith("mailto:")) continue;
54-
const localPath = resolve(dirname(indexPath), target);
74+
const localTarget = target.split(/[?#]/, 1)[0];
75+
const localPath = resolve(dirname(indexPath), localTarget);
5576
if (!existsSync(localPath)) {
5677
throw new Error(`Broken local asset reference: ${target}`);
5778
}
@@ -61,6 +82,12 @@ const css = await readFile(resolve(srcDir, "styles.css"), "utf8");
6182
if (!css.includes("@media") || !css.includes(":root")) {
6283
throw new Error("CSS must include responsive rules and root design tokens.");
6384
}
85+
if (/letter-spacing:\s*-[0-9.]/.test(css)) {
86+
throw new Error("CSS must not use negative letter spacing.");
87+
}
88+
if (/font-size:\s*[^;]*vw/.test(css)) {
89+
throw new Error("CSS must not scale font size directly with viewport width.");
90+
}
6491

6592
const files = [];
6693
async function walk(dir) {
@@ -74,3 +101,16 @@ async function walk(dir) {
74101
await walk(srcDir);
75102

76103
console.log(`Validated AgentDispatch website (${files.length} source files).`);
104+
105+
async function readPngDimensions(path) {
106+
const bytes = await readFile(path);
107+
const signature = bytes.subarray(0, 8).toString("hex");
108+
if (signature !== "89504e470d0a1a0a") {
109+
throw new Error(`${path} is not a PNG file`);
110+
}
111+
112+
return {
113+
width: bytes.readUInt32BE(16),
114+
height: bytes.readUInt32BE(20)
115+
};
116+
}

src/assets/org-logo.svg

Lines changed: 38 additions & 0 deletions
Loading

src/assets/repo-social-preview.png

-381 KB
Loading

0 commit comments

Comments
 (0)