docs: lowercase internal docs + migrate website docs to public-docs/ (#634)

* docs: rename to lowercase + drop leftover plans

Rename docs in docs/ to lowercase kebab-case for consistency and update
all references in CLAUDE.md, CONTRIBUTING.md, CHANGELOG.md,
packages/server/CLAUDE.md, and inter-doc links.

Drop two leftover design plan docs:
- docs/ATTACHMENT_BASED_REVIEW_CONTEXT_PLAN.md
- docs/plan-approval-normalization.md

* docs: drop stale uppercase entries from case-insensitive rename

* feat(website): power /docs from public-docs/ markdown tree

Move website docs out of TSX route components and into a root-level
public-docs/ directory of plain markdown files with frontmatter
(title, description, nav, order).

- Add packages/website/src/docs.ts loader using import.meta.glob with
  ?raw to compile the markdown into the bundle at build time.
- Replace the 9 hand-written docs/*.tsx routes with a single $.tsx
  catch-all that renders any slug via react-markdown.
- Drive the docs sidebar nav from frontmatter order/nav.
- Auto-discover docs routes in vite.config.ts so the sitemap stays in
  sync without manual edits.

* fix(website): bind dev server to 0.0.0.0 so port collisions trigger fallback

`host: "127.0.0.1"` (or unset) lets macOS coexist with another process
holding an IPv6 dual-stack `*:8082` socket, so Vite never sees
EADDRINUSE and silently binds alongside it. Forcing IPv4 wildcard
makes the conflict real, and Vite's default `strictPort: false`
falls through to the next free port.

* fix(website): restore docs page styling after markdown migration

Add a .docs-prose class that mirrors the styling the original
docs/*.tsx components hand-rolled (h1/h2/h3 sizes, paragraph/list
spacing, link colors, code blocks, callout-style blockquotes).

ReactMarkdown was emitting unstyled HTML because the previous
wrapper class only had inline-code rules — headings and code
blocks fell back to user-agent defaults.
This commit is contained in:
Mohamed Boudra
2026-04-30 17:27:15 +08:00
committed by GitHub
parent 5d9dc0c4d5
commit dec47d72d9
49 changed files with 1395 additions and 2572 deletions
+128
View File
@@ -84,6 +84,134 @@
color: rgba(250, 250, 250, 0.8);
}
/* Docs page prose styles — mirrors the original docs/*.tsx components */
.docs-prose {
color: rgba(255, 255, 255, 0.6);
line-height: 1.625;
}
.docs-prose > :first-child {
margin-top: 0;
}
.docs-prose h1 {
color: var(--color-foreground);
font-size: 1.875rem;
line-height: 1.25;
font-weight: 500;
margin-top: 0;
margin-bottom: 1rem;
}
.docs-prose h2 {
color: var(--color-foreground);
font-size: 1.25rem;
line-height: 1.4;
font-weight: 500;
margin-top: 2rem;
margin-bottom: 1rem;
}
.docs-prose h3 {
color: var(--color-foreground);
font-size: 1.125rem;
line-height: 1.4;
font-weight: 500;
margin-top: 1.5rem;
margin-bottom: 0.75rem;
}
.docs-prose p {
margin-top: 1rem;
margin-bottom: 1rem;
}
.docs-prose a {
color: var(--color-foreground);
text-decoration: underline;
text-underline-offset: 2px;
}
.docs-prose a:hover {
color: rgba(255, 255, 255, 0.8);
}
.docs-prose ul,
.docs-prose ol {
margin-top: 1rem;
margin-bottom: 1rem;
padding-left: 1.5rem;
}
.docs-prose ul {
list-style: disc;
}
.docs-prose ol {
list-style: decimal;
}
.docs-prose li {
margin-top: 0.25rem;
margin-bottom: 0.25rem;
}
.docs-prose strong {
color: rgba(255, 255, 255, 0.8);
font-weight: 600;
}
.docs-prose blockquote {
background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
border-radius: 0.5rem;
padding: 1rem;
margin-top: 1rem;
margin-bottom: 1rem;
color: rgba(255, 255, 255, 0.8);
}
.docs-prose blockquote > :first-child {
margin-top: 0;
}
.docs-prose blockquote > :last-child {
margin-bottom: 0;
}
.docs-prose pre {
background-color: var(--color-card);
border: 1px solid var(--color-border);
border-radius: 0.5rem;
padding: 1rem;
overflow-x: auto;
margin-top: 1rem;
margin-bottom: 1rem;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 0.875rem;
color: var(--color-foreground);
}
.docs-prose pre code {
background: transparent;
padding: 0;
border-radius: 0;
font-size: inherit;
}
.docs-prose :not(pre) > code {
background-color: var(--color-muted);
padding: 0.125rem 0.375rem;
border-radius: 0.25rem;
font-size: 0.875em;
}
.docs-prose hr {
border-color: var(--color-border);
margin-top: 2rem;
margin-bottom: 2rem;
}
/* Blog post prose styles — adapted from moboudra.com */
.blog-prose {
color: rgba(250, 250, 250, 0.82);