docs(site): make the docs site feel like part of Docker, and explain what Docker Agent is#2793
Conversation
|
Docs Preview now runs on this PR (the fork-gate from #2792 is gone), but it fails at the deploy step:
Cause: the Options:
I deliberately didn't change the environment configuration as part of this PR — that's a separate concern from the docs-branding work. Happy to open a tiny follow-up PR that splits the deploy out of the |
The \`Docs Preview\` workflow can't actually deploy a preview today:
\u2022 The \`build-and-deploy\` job is gated on
\`head.repo.full_name == github.repository\`, so it skips on every
PR opened from a fork.
\u2022 Even on internal-branch PRs (like #2793 where
this was reproduced), the deploy step is rejected by the
\`github-pages\` environment, whose custom branch policy only
allows deployments from \`main\`:
Branch refs/pull/<N>/merge is not allowed to deploy to
github-pages due to environment protection rules.
So the workflow burns CI time, posts no preview comment, and leaves a
red FAILURE check on every PR that touches \`docs/**\`. Remove the
workflow file rather than leave a permanently broken check in place.
If a maintainer wants real PR previews back, the right fix is a
follow-up that either widens the \`github-pages\` environment branch
policy or moves the docs-preview deploy to a separate destination
(e.g. Cloudflare Pages, Netlify, or a non-protected \`gh-pages\` push).
|
Dropped the Docs Preview workflow in If we want PR previews back, the right fix is a separate follow-up that either widens the |
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🔴 CRITICAL
This PR does excellent work rebranding the docs site to match Docker's design system. However, one critical rendering bug would make the new architecture diagram invisible to most visitors on the default dark theme.
Summary of findings:
- 🔴 HIGH (1):
how-it-works.svgusescurrentColorfor all text labels, but is embedded as<img src="...">. Per the SVG spec,currentColordoes not inherit from the host page in this context — it resolves to black, making all labels invisible against the dark navy background. - 🟡 MEDIUM (1):
docker-bar.htmlcreates two nestedrole="navigation"landmarks (outer<div role="navigation">wrapping inner<nav>), which confuses screen reader navigation.
| <!-- 1. YAML config --> | ||
| <g transform="translate(20,90)"> | ||
| <rect width="140" height="60" rx="10" fill="none" stroke="#1D63ED" stroke-width="1.5"/> | ||
| <text x="70" y="28" text-anchor="middle" font-size="13" font-weight="700" fill="currentColor">agent.yaml</text> |
There was a problem hiding this comment.
[HIGH] currentColor in how-it-works.svg resolves to black when embedded via <img> — text labels invisible on dark theme
The SVG's comment says it "uses currentColor where practical so it picks up the surrounding text colour," but this only works for inline SVG (<svg> directly in HTML). When an SVG is loaded as an external image via <img src="...">, it is processed as an independent document in its own rendering context — the host page's CSS color is not inherited. Per the CSS/SVG specs, currentColor in this context resolves to the SVG's initial computed color, which is black (#000000).
All text labels in the diagram use fill="currentColor":
agent.yaml/your config(lines 24–25)Model,LLM call(lines 48–49)Tools,fs / shell / MCP(lines 54–55)Sub-agents,delegation(lines 60–61)repeats until task is done(line 68)Stream,to TUI / API(lines 77–78)
The site defaults to a dark navy background (#0D1B2E). Black text on a dark navy background is functionally invisible, making the architecture diagram unreadable for the majority of visitors.
Fix: Replace fill="currentColor" with explicit hex colors that work on the dark background (e.g., fill="#E8ECF2" for the dark theme, or use a <style> block with @media (prefers-color-scheme) queries inside the SVG, or embed the SVG inline in the template).
| @@ -0,0 +1,17 @@ | |||
| <!-- Docker corporate top bar — appears above the product header on every | |||
| page, mirroring the docs.docker.com / docker.com structure. --> | |||
| <div class="docker-bar" role="navigation" aria-label="Docker corporate links"> | |||
There was a problem hiding this comment.
[MEDIUM] Duplicate role="navigation" landmark: outer <div> wraps inner <nav>
The outer <div> carries an explicit role="navigation" with aria-label="Docker corporate links", but it also wraps an inner <nav class="docker-bar-links"> — which has an implicit role="navigation" landmark per the HTML spec. This creates two nested navigation landmarks in the accessibility tree:
<div role="navigation" aria-label="Docker corporate links">→ named landmark<nav class="docker-bar-links">→ unnamed navigation landmark (child of Telemetry #1)
Screen reader users navigating by landmarks would encounter both, with the inner one unlabeled, causing confusion. WCAG 2.1 success criterion 1.3.1 (Info and Relationships) is affected.
Fix: Either use <nav aria-label="Docker corporate links"> as the outer element (removing the inner <nav>), or remove role="navigation" from the outer <div>:
<!-- Option A: single <nav> -->
<nav class="docker-bar" aria-label="Docker corporate links">
<div class="docker-bar-inner">
<a class="docker-bar-brand" ...>...</a>
<ul class="docker-bar-links">
<li><a href="...">Desktop</a></li>
...
</ul>
</div>
</nav>The Docker brand kit's SVG fills use \`#2560FF\` (\"Ocean Blue\") and \`#00153C\` (\"Deep Blue\"), not the \`#1D63ED\` / \`#09101F\` values I introduced in 11b72ba. Subtle but visible on the home-page hero gradient, the feature card hover, and the hand-drawn how-it-works flow diagram \u2014 they were all in a slightly off shade of blue compared to the official mark we now ship. \u2022 --blue-100..700 derived from \`#2560FF\` (was \`#1D63ED\`). \u2022 --navy-900..600 derived from \`#00153C\` (was \`#09101F\`). \u2022 Every hard-coded \`rgba(29,99,237, \u2026)\` rewritten to \`rgba(37,96,255, \u2026)\` (callout shadows, hero radial highlight, pain/with rows, ecosystem tiles, page-nav focus ring). \u2022 Hero gradient mid-stop bumped to \`#06204D\` (a token-aligned navy) and the light-theme variant to \`#133361\`. \u2022 Header glass background switched to \`rgba(0,21,60,0.85)\`. \u2022 \`how-it-works.svg\` strokes/fills updated to \`#2560FF\`. The \`--docker-blue\` / \`--accent\` / \`--accent-hover\` aliases keep working because they all resolve through the new --blue-500. Reported by review of the docker-mark swap on #2793.
The header's inner row was wrapped in \`max-width: 1600px; margin: 0 auto\`, so on wide monitors the logo drifted toward the page center instead of sitting at the leftmost gutter. docs.docker.com keeps its product logo flush left at the page padding edge \u2014 do the same. The header uses \`padding: 0 24px\` to space content from the viewport edge, which is enough; the inner element no longer needs its own constraint.\n\nReported by review of #2793.
3a7d5ba to
c431684
Compare
|
Squashed the 37 incremental commits into two atomic ones, per request:
Verified the squash is byte-identical to the previous tip: The full review history is preserved in #2792 and on the tag-style ref |
The \`Docs Preview\` workflow can't actually deploy a preview today:
\u2022 The \`build-and-deploy\` job is gated on
\`head.repo.full_name == github.repository\`, so it skips on every
PR opened from a fork.
\u2022 Even on internal-branch PRs, the deploy step is rejected by the
\`github-pages\` environment, whose custom branch policy only
allows deployments from \`main\`:
Branch refs/pull/<N>/merge is not allowed to deploy to
github-pages due to environment protection rules.
So the workflow burns CI time, posts no preview comment, and leaves a
red FAILURE check on every PR that touches \`docs/**\`. Remove the
workflow file rather than leave a permanently broken check in place.
If a maintainer wants real PR previews back, the right fix is a
follow-up that either widens the \`github-pages\` environment branch
policy or moves the docs-preview deploy to a separate destination
(e.g. Cloudflare Pages, Netlify, or a non-protected \`gh-pages\` push).
Bring the docs site in line with Docker's official design system and
rewrite the homepage so first-time visitors can answer "what is this
and why should I care?" in under 30 seconds.
No application/runtime code is touched — every change is in `docs/`.
## Branding
* **Fonts** — switch from Inter / JetBrains Mono to **Roboto Flex**
(the variable-axis sans docs.docker.com self-hosts) and **Roboto
Mono**. Both pulled from Google Fonts.
* **Color tokens** — introduce a structured palette of named tokens
derived from the official brand kit (Docker-Logos-1.zip):
--blue-100..700 anchored on Ocean Blue `#2560FF`
--navy-900..600 anchored on Deep Blue `#00153C`
--gray-100..900 lifted verbatim from docs.docker.com (#E7EAEF,
#C8CFDA, …, #1E2129) so chrome feels like the same family.
* **Dark theme** matches docs.docker.com: neutral charcoal page bg
`#10151B`, sidebar/cards `#1E2129`, body text `#C8CFDA`, headings
white, links `#4B83F1`. Brand navy is reserved for the hero, the
primary button and the info-callout dark backgrounds.
* **Light theme** also calibrated to docs.docker.com: page+sidebar+
main on the same `#E7EAEF` (gray-100) surface (matches their
footer / navbar-active), cards on white, headings `#1F242D`,
body copy `#3F4750` (their `oklch(37.3% .034 259.733)`).
* **Moby mark** — the hand-authored whale SVG didn't match Docker's
official asset (it was missing the eight containers stacked on the
whale's back). Ship the actual `docker-mark-ocean-blue.svg` from
the brand kit instead, plus a white variant for dark backgrounds.
* **Callouts** — redesigned in docs.docker.com style: rounded panel
with a filled circular icon badge in the top-left and a strong
title row. `info`, `tip` and `warning` now match the same exact
background colors docs.docker.com uses in dark mode (`#00153C`,
`#11371A`, `#643700`).
* **Header** — Docker Agent wordmark + Moby mark, left-aligned at the
page padding edge so it doesn't drift on wide monitors.
* **Sidebar** — value tagline at the top ("Run AI agents like
containers."), nav links at 16px / weight 400 (was 13.2px), pure
white sidebar text on dark mode for higher contrast.
* **Right-column TOC** — restyled like docs.docker.com:
"Edit this page" link with pencil icon at the top, pointing at
GitHub's web editor (resolved at build time via `<meta
name="docs-edit-url">` and `{{ page.path }}`).
"Table of contents" heading at `1.05rem` weight 500 (was a tiny
uppercase eyebrow).
Links at `.875rem`, gray-600 / gray-100, with a 2px gray-300
left-border + weight 500 on the active entry.
* **Ecosystem footer** — three-column footer with links to Docker
Desktop, Hub, Scout, Build Cloud, docs.docker.com, the agent
catalog on Hub, the Docker blog, status, terms and privacy.
* **Page chrome** — light-theme code blocks honor the theme (warm
`#F6F8FA` + matching syntax palette); footer is moved out of
`<main>` so it isn't part of the ARIA `main` landmark; skip-link
target gets `scroll-margin-top` so keyboard users land below the
header.
## Messaging
* **Hero** leads with the docker-run analogy:
> **Docker Agent is to AI agents what `docker run` is to containers.**
> Define an agent in a YAML file, run it with one command, share it
> through any OCI registry — the same workflow you already use for
> images.
* **Demo GIF** moved above the fold so the TUI is visible without
scrolling.
* **30-second elevator panel** — four cards under the hero:
what it is / what it isn't / who it's for / what you get.
* **Without / With Docker Agent** code comparison: ~30 lines of
Python+Anthropic glue versus 8 lines of YAML + `docker agent run`.
* **"Why" rows** — abstract copy replaced with concrete pain → fix
pairs ("I rebuilt the same agent loop in three projects" →
"Reusable YAML, declare once, run everywhere").
* **Use cases** — a 4-card row showing the typical shapes (coding /
ops / data / custom workflows), each linking to the most relevant
follow-up page.
* **How it works** — adds an SVG flow diagram
(`agent.yaml → docker agent run → [Model ↔ Tools ↔ Sub-agents] →
stream`) using `currentColor` so it reads in both themes.
* **Glossary box** explaining Agent / Tool / MCP / A2A / TUI / OCI
inline so first-time readers don't bounce on the jargon.
* **Ecosystem tiles** — cross-links to Docker Hub (agent catalog),
Docker Desktop, Docker Model Runner and Docker Scout, anchoring
Docker Agent in the broader product family.
* **Icon set** — emoji feature/usecase/card icons replaced with
Lucide-style line icons in tinted Docker-Blue squares.
* **STYLE.md** — added to codify "Docker Agent" (prose) vs
`docker agent` (CLI) naming, voice, code samples and a small
glossary so subsequent contributors don't have to guess. The
introduction and quickstart pages are reconciled to the new
convention.
* **Bulk callout edit** — every `<div class="callout-title">` across
56 content pages had its leading `ℹ️ / 💡 / ⚠️ ` emoji stripped,
because the new icon-badge callout already provides one.
## Meta
* `<title>` and meta description tightened for SEO: home page now
reads "Docker Agent — Run AI agents from YAML, like containers"
and the description fits Google's ~155-char snippet budget.
`og:site_name` and Twitter card metadata added for nicer link
previews.
c431684 to
7aae80c
Compare
|
Rebased on
All checks now pass:
Local |
Bring the docs site in line with Docker's official design system and rewrite the homepage so first-time visitors can answer "what is this and why should I care?" in under 30 seconds.
No application/runtime code is touched — every change is in
docs/.Commits
0f122af2aci: drop the dead Docs Preview workflow— the workflow could never deploy a preview (cross-fork gate +github-pagesenvironment locked tomain). Removed rather than left as a permanent red FAILURE on everydocs/**PR.7aae80c1edocs(site): rebrand to docker.com / docs.docker.com style— see breakdown below.The second commit's message lists every sub-change. A summary follows.
What's in the rebrand commit
Branding
Docker-Logos-1.zip):--blue-100..700anchored on Ocean Blue#2560FF--navy-900..600anchored on Deep Blue#00153C--gray-100..900lifted verbatim from docs.docker.com#10151B, sidebar/cards#1E2129, body text#C8CFDA, headings white, links#4B83F1. Brand navy is reserved for the hero, primary button and info-callout dark backgrounds.#E7EAEF(gray-100), cards on white, headings#1F242D, body copy#3F4750.docker-mark-ocean-blue.svgfrom the brand kit, plus a white variant.admonition-note/tip/warning.<meta name="docs-edit-url">and{{ page.path }})1.05remweight 500.875rem, gray-600 / gray-100, with a 2px gray-300 left-border + weight 500 on the active entrycreateElement+textContentso heading text can never be reinterpreted as HTML (CodeQL hardening — see below)<main>(ARIA correctness), skip-link target getsscroll-margin-topso keyboard users land below the header.Messaging
docker agent run.#566581) for text (a neutral mid-grey that reads on both light#E7EAEFand dark#10151Bpage backgrounds) becausecurrentColordoes not inherit through<img src="…svg">.docker agent(CLI) naming, voice, glossary.ℹ️ / 💡 / ⚠️emoji on<div class="callout-title">was stripped (the new icon-badge already provides one).Meta
<title>and meta description tightened for SEO;og:site_nameand Twitter card metadata added.Review feedback addressed
how-it-works.svgusescurrentColorbut is embedded as<img>, making labels invisible on the dark page bg#566581(gray-600) for text/strokes — readable on both#E7EAEFlight and#10151Bdark page backgroundsdocker-bar.htmlhad nestedrole="navigation"landmarksdocker-bar.html) was reverted earlier in the same PR; no nested-landmark issue remainsjs/app.js:78(heading text interpolated intoaside.innerHTMLvia template literal)buildTOC()rewritten to usedocument.createElement+textContent, eliminating the XSS class entirelyTry it locally
Or, with Docker:
(There is no automated PR-preview deploy — see commit 1's message for why.)
Validation
task lint— 0 issuestask test— green on CI (build-and-test: SUCCESS); two example-loader tests fail locally because Docker Model Runner isn't enabled on this machine, unrelated to this PRCloses #2792.