|
| 1 | +# DVC.org |
| 2 | + |
| 3 | +Documentation site for DVC (Data Version Control), built with Gatsby. |
| 4 | + |
| 5 | +## Stack |
| 6 | + |
| 7 | +React 19, Gatsby, CSS Modules, Tailwind, Webpack. Theme in |
| 8 | +`packages/gatsby-theme/`, docs content in `content/docs/`, components and |
| 9 | +plugins in `src/` and `plugins/`. `server/` is an Express production server that |
| 10 | +adds redirects, Plausible analytics proxy, Helmet security headers, and |
| 11 | +cache-control rules on top of the Gatsby static build. |
| 12 | + |
| 13 | +Docs served at https://dvc.org/doc (Heroku + CloudFront CDN). |
| 14 | + |
| 15 | +- `packages/gatsby-theme/src/components/Link/index.tsx` has a static DVC |
| 16 | + `VERSION` that needs periodic updates. |
| 17 | +- `redirects-list.json` — URL redirect rules, used by the Express server. |
| 18 | +- `content/docs/sidebar.json` — left sidebar navigation structure. |
| 19 | +- `content/linked-terms.js` — defines which backtick terms auto-link (e.g. |
| 20 | + `dvc.yaml` → project structure page, `dvc push` → command reference). |
| 21 | +- `content/docs/user-guide/basic-concepts/` — glossary source files for `<abbr>` |
| 22 | + tooltip content (DVC project, workspace, etc.). |
| 23 | + |
| 24 | +## Commands |
| 25 | + |
| 26 | +**!!Important: Use `yarn` not `npm`**. |
| 27 | + |
| 28 | +- `yarn` — install dependencies |
| 29 | +- `yarn develop` — dev server with hot reload (localhost:8000) |
| 30 | +- `yarn clean` — clean Gatsby cache and build artifacts (used before starting |
| 31 | + server if Gatsby plugins were updated before using `yarn develop`) |
| 32 | +- `yarn build` — production build to `public/` |
| 33 | +- `yarn start` — production server over `public/` |
| 34 | +- `yarn test` — run tests using vitest |
| 35 | +- `yarn format <FILE>` — format with Prettier |
| 36 | +- `yarn format-all` / `yarn format-staged` / `yarn format-check-all` |
| 37 | +- `yarn lint` / `yarn lint-fix` / `yarn lint-ts` / `yarn lint-css` |
| 38 | +- `yarn fix-all` — run all fixers at once |
| 39 | + |
| 40 | +## Writing docs |
| 41 | + |
| 42 | +See `content/docs/contributing/docs.md` for the full style guide. |
| 43 | + |
| 44 | +### Voice and tone |
| 45 | + |
| 46 | +- Clear, human, approachable — not authoritative or overly formal. |
| 47 | +- Familiar language over jargon ("commit" not "revision", "version" not |
| 48 | + "reference") when accurate enough. |
| 49 | +- Tutorials/getting-started: direct address, contractions, light encouragement. |
| 50 | +- Command/API reference: systematic, scan-oriented, but still explanatory when |
| 51 | + examples need it. |
| 52 | +- Lead with the essence, then layer in clarifications and edge cases. |
| 53 | +- Details/admonitions are a standard editorial pattern, not an exceptional |
| 54 | + device. |
| 55 | +- Bullet lists max 5-7 items. Bullet text max ~3 sentences. Full-sentence |
| 56 | + bullets start capitalized and end with a period; fragments can be lowercase |
| 57 | + with no ending punctuation. |
| 58 | +- Emojis sparse and purposeful. |
| 59 | + |
| 60 | +### Markup conventions |
| 61 | + |
| 62 | +- One `.md` file per page in `content/docs/`. |
| 63 | +- Images in `static/img/`. Navigation in `content/docs/sidebar.json`. |
| 64 | +- `dvc <command>` and `dvc.api.<method>()` in backticks auto-link. |
| 65 | +- `dvc.yaml`, `.dvc`, `dvc.lock` in backticks also auto-link. |
| 66 | +- `<abbr>` tags for glossary terms — powers tooltip popups. |
| 67 | +- `<admon type="info">` clarifications, `type="tip"` best practices, |
| 68 | + `type="warn"` data safety (sparingly). |
| 69 | +- `<details>` for setup steps, deep dives, optional complexity. |
| 70 | +- Code fences: `usage` for `dvc --help` output, `dvc` for terminal examples, |
| 71 | + `yaml` for DVC/YAML files, `dvctable` for colored table cells, `diff` for git |
| 72 | + diff output. |
| 73 | +- **Bold** for emphasis, _italics_ for special terms. |
| 74 | +- Emojis: 📖 related docs, ⚠️ warnings, 💡 tips. |
| 75 | +- 80-char line width. Prettier enforced via pre-commit hook. |
| 76 | + |
| 77 | +## Design |
| 78 | + |
| 79 | +Audience: ML engineers, data engineers, and developers who need fast lookup and |
| 80 | +comfortable long-session reading. |
| 81 | + |
| 82 | +- Pragmatic, precise, trustworthy. Not marketing, not dashboard. |
| 83 | +- Documentation-first editorial UI. Light mode is the baseline; dark mode is a |
| 84 | + calm extension, not a re-skin. |
| 85 | +- Surfaces separate clearly without looking glossy, heavy, or over-cardified. |
| 86 | +- Accent color (cyan) concentrated in links and active states, not spread as |
| 87 | + decoration. |
| 88 | + |
| 89 | +### Typography |
| 90 | + |
| 91 | +- Reading comfort over stylistic expression. |
| 92 | +- Hierarchy through spacing, weight, and contrast — not size jumps. |
| 93 | +- On reference pages, typography does the heavy lifting: monospace rhythm, |
| 94 | + weight, indentation, and alignment establish structure before borders or |
| 95 | + fills. |
| 96 | + |
| 97 | +### Reference pages |
| 98 | + |
| 99 | +- Command and API docs are dense lookup tools. Optimize for scan speed and |
| 100 | + stable structure. |
| 101 | +- Quieter than tutorials — no decorative surfaces or oversized gestures. |
| 102 | +- Emphasis from typography and grouping first; box treatments only when they |
| 103 | + materially improve comprehension. |
| 104 | +- Tutorials may allow more surface treatment and guidance cues; reference pages |
| 105 | + stay tighter, flatter, and more systematic. |
| 106 | + |
| 107 | +### Principles |
| 108 | + |
| 109 | +1. **Content first.** Reading flow and scanability outrank decoration. |
| 110 | +2. **Quiet hierarchy.** Spacing, contrast, and weight before stronger effects. |
| 111 | +3. **Accent with restraint.** Cyan guides interaction, doesn't dominate. |
| 112 | +4. **Supportive chrome.** Sidebars and cards frame content, don't compete. |
| 113 | +5. **Calm dark mode.** Durable for long reading sessions. |
| 114 | +6. **Accessible by default.** Clear contrast, visible focus, restrained motion, |
| 115 | + differentiation that doesn't rely on color alone. |
| 116 | +7. **Minimal interactive states.** Prefer underline, color shift, or icon |
| 117 | + emphasis before background fills or shadows that create extra visual layers. |
| 118 | + |
| 119 | +### Heuristics |
| 120 | + |
| 121 | +- Prefer incremental refinement over redesign. Match the existing docs system |
| 122 | + unless there is a clear product or usability reason to diverge. |
| 123 | +- No glossy panels, heavy shadows, hover lifts, or decorative gradients. |
| 124 | +- Keep interaction language consistent. Links read as links through color and |
| 125 | + underline, not component-specific hover inventions. |
| 126 | +- Keep complexity progressive. Core guidance in the main flow; use |
| 127 | + details/collapsible sections for deeper notes when that preserves scanability. |
| 128 | +- Tutorials allow more guidance and surface treatment; reference pages stay |
| 129 | + denser, flatter, and more typographic. |
| 130 | +- Verify UI changes in both light and dark mode, on at least one tutorial-style |
| 131 | + and one reference-style page. |
0 commit comments