mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-03 21:58:32 +00:00
## Summary
Move the five customer stories on `/customers` out of the old
`customerStories.ts` array and the shared i18n file into an Astro
content collection (MDX, English and Chinese). The pages look and read
exactly the same; this just changes where the content lives so it is
easier to edit, and it sets the pattern we will reuse to migrate the
rest of the marketing content.
Linear: FE-1158
## Changes
- **What**:
- Added a `customers` content collection (`src/content.config.ts` +
`src/content/customers.schema.ts`), with one MDX file per story per
locale under `src/content/customers/{en,zh-CN}/`.
- Rebuilt the article rendering as small static components (`Section`,
`Figure`, `Quote`, `Contributors`, `Steps`, plus styled
paragraph/heading/list). The article body is now static HTML; only the
scroll-spy sidebar (`ArticleNav.vue`) ships JavaScript.
- Repointed the `/customers` listing and detail pages (both locales) to
read from the collection.
- Removed the old `customerStories.ts` array and the customer-story keys
from `translations.ts` (about 1,300 lines).
- Dropped the two "Read more" links that just redirected back to the
same page; kept the two that point to the real Substack articles.
- Switched the "Read more" button to the design-system `Button`, which
also fixes its vertical alignment.
- Added a short pattern doc at `apps/website/src/content/README.md` for
reuse.
- **Dependencies**: `@astrojs/mdx` (renders the MDX content).
## Review Focus
This is meant to be a no-visual-change migration. I checked content and
layout against the live site for all five stories in both languages, on
desktop and mobile. The only intended differences are the two removed
self-referential "Read more" links and the read-more button now using
the shared `Button`.
A few small setup changes explain part of the diff:
- `src/env.d.ts` now references `.astro/types.d.ts` so the collection
types resolve (this is the repo's first content collection).
- `astro.config.ts` sets `markdown.smartypants: false` so quotes stay
straight (MDX would otherwise curl them). This option is deprecated in
Astro 7 and moves onto the markdown processor; that belongs with the
eventual Astro 7 upgrade, not here.
- ESLint ignores the `astro:` virtual modules for `apps/website` files
(they are real at build time, but the resolver cannot see them).
- Content MDX is excluded from `oxfmt` in `.oxfmtrc.json`: the formatter
rewraps component slots and changes the rendered output (it broke the
blockquotes), so content files are kept out of it like generated files
and fixtures.
- `components/common/ContentSection.vue` and `config/contentSections.ts`
are untouched; they still power the legal and privacy pages.
The diff is large, but most of it is MDX content, the lockfile, and the
removed i18n keys. The logic to review is small: the collection config
and schema, the components, and the page wiring.
## Screenshots
No visual change is intended, so before and after of the article pages
are identical (verified across both locales and on desktop and mobile).
The one deliberate tweak is the "Read more" button, which now uses the
design-system `Button` for better vertical alignment. Before/after
captures are available if needed.
56 lines
1.8 KiB
JSON
56 lines
1.8 KiB
JSON
{
|
|
"name": "@comfyorg/website",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "astro dev",
|
|
"dev:no-toolbar": "cross-env NO_TOOLBAR=1 astro dev",
|
|
"build": "astro build",
|
|
"preview": "astro preview",
|
|
"typecheck": "astro check",
|
|
"test:unit": "vitest run",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:local": "cross-env PLAYWRIGHT_LOCAL=1 playwright test",
|
|
"test:visual": "playwright test --project visual",
|
|
"test:visual:update": "playwright test --project visual --update-snapshots",
|
|
"ashby:refresh-snapshot": "tsx ./scripts/refresh-ashby-snapshot.ts",
|
|
"cloud-nodes:refresh-snapshot": "tsx ./scripts/refresh-cloud-nodes-snapshot.ts",
|
|
"generate:models": "tsx ./scripts/generate-models.ts"
|
|
},
|
|
"dependencies": {
|
|
"@astrojs/sitemap": "catalog:",
|
|
"@comfyorg/design-system": "workspace:*",
|
|
"@comfyorg/object-info-parser": "workspace:*",
|
|
"@comfyorg/shared-frontend-utils": "workspace:*",
|
|
"@comfyorg/tailwind-utils": "workspace:*",
|
|
"@lucide/vue": "catalog:",
|
|
"@vercel/analytics": "catalog:",
|
|
"@vueuse/core": "catalog:",
|
|
"class-variance-authority": "catalog:",
|
|
"cva": "catalog:",
|
|
"gsap": "catalog:",
|
|
"lenis": "catalog:",
|
|
"posthog-js": "catalog:",
|
|
"reka-ui": "catalog:",
|
|
"three": "catalog:",
|
|
"vue": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@astrojs/check": "catalog:",
|
|
"@astrojs/mdx": "catalog:",
|
|
"@astrojs/vue": "catalog:",
|
|
"@playwright/test": "catalog:",
|
|
"@tailwindcss/vite": "catalog:",
|
|
"astro": "catalog:",
|
|
"tailwindcss": "catalog:",
|
|
"tsx": "catalog:",
|
|
"tw-animate-css": "catalog:",
|
|
"typescript": "catalog:",
|
|
"vitest": "catalog:",
|
|
"vue-component-type-helpers": "catalog:"
|
|
}
|
|
}
|