The-Swarm-Corporation/swarms-website · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md
Swarms Website
The open-source code behind swarms.ai: the marketing site, bilingual blog (English and 中文), and newsletter for the Swarms multi-agent platform.
Quick Start
This project uses pnpm only (pinned in package.json). Do not use npm or yarn.
pnpm install
pnpm dev # dev server at http://localhost:3000
Environment Variables
Create a .env file in the repo root. All variables are optional for local development: the site builds and runs without them, but newsletter signup will fail.
| Variable | Used for |
|---|---|
RESEND_API_KEY | Sending newsletter signup emails via Resend |
RESEND_AUDIENCE_ID | Adding subscribers to the Resend audience (contact list) |
# .env
RESEND_API_KEY=re_...
RESEND_AUDIENCE_ID=...
Build
pnpm build # production build (also the main verification step; there is no test suite)
pnpm start # serve the production build
pnpm lint # next lint
Deployed on Vercel; every push to main goes live.
Project Structure
app/(en)/ English pages (no URL prefix)
app/zh/ Chinese mirrors of a subset (blog, framework, installation, pricing)
content/blog/ Blog posts as .mdx with frontmatter
content/blog/zh/ Chinese translations, same filename/slug as the English post
components/ React components (blog/ holds the blog UI)
lib/ Blog loading, email, utilities
public/ Static assets, including blog cover art
docs/ Contributor docs, e.g. blog image guidelines
Writing a Blog Post
- Add
content/blog/<slug>.mdxwith frontmatter (title,description,date,author,categories,featured,readTime, and optionalimage). - Add the Chinese translation at
content/blog/zh/<slug>.mdxwith the same slug, which powers the 中文/EN toggle. - Cover art goes in
public/at 1920×1080; seedocs/BLOG_IMAGE_GUIDELINES.mdfor sizing and safe zones.