Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(news): listing thumbnails + cover-image convention + schema docs
nirholas5d4b0bac6cd4
diff --git a/data/rss/SCHEMA.md b/data/rss/SCHEMA.mdnew file mode 100644index 000000000..7b89b39f5--- /dev/null+++ b/data/rss/SCHEMA.md@@ -0,0 +1,93 @@+# `data/rss/items.json` — schema++Every entry in `items[]` controls one item in the RSS feed+(`https://three.ws/rss/announcements.xml`) AND one permalink page+(`https://three.ws/news/<slug>`).++## Required fields++| Field | Type | Notes |+|-------------|--------|-------|+| `id` | string | Stable unique identifier. Used internally and to derive a slug if `slug` is not set. |+| `title` | string | Headline. Shows as `<h1>` on the permalink, `<title>` on RSS, OG/Twitter title. |+| `date` | string | ISO 8601 timestamp (e.g. `2026-05-17T12:00:00.000Z`). Drives sort order, `pubDate`, `article:published_time`. |+| `body_html` | string | Full article HTML. Will be inserted into `<article>` on the page and `<content:encoded>` in RSS. |++## Recommended fields++| Field | Type | Notes |+|-------------------|----------|-------|+| `slug` | string | URL slug. Auto-derived from `id` if omitted (e.g. `t-12345` → `12345`). Editor SHOULD set this for human-readable URLs like `live-on-alibaba-cloud-marketplace`. |+| `summary` | string | Plain-text excerpt (≤280 chars). Auto-derived from `body_html` if omitted. Used in `<description>`, OG/Twitter description, JSON-LD `description`. |+| `author` | string | Display name. Defaults to `three.ws`. |+| `tags` | string[] | Lowercase, hyphenated (e.g. `["launch","x402","solana"]`). Surfaced as `<category>` in RSS, `article:tag` meta, JSON-LD `keywords`, and pill badges on the page. |+| `image` | string | Cover image URL or relative path (e.g. `/news-images/foo.jpg`). See [Cover images](#cover-images). |+| `image_alt` | string | Alt text for the cover image. **Required if `image` is set.** |++## Optional fields++| Field | Type | Notes |+|-------------------|----------|-------|+| `external_link` | string | Original source URL (e.g. the X post). Surfaces as `<source>` in RSS and as an "Originally shared on X" footer. If omitted but `link` is non-three.ws, `link` is used instead. |+| `image_width` | number | Pixel width — enables `og:image:width` and `<media:content width="...">`. Recommended ≥1200 for social cards. |+| `image_height` | number | Pixel height — enables `og:image:height`. Recommended ≥630 for social cards. |+| `og_title` | string | Override OG/Twitter title (defaults to `title`). |+| `og_description` | string | Override OG/Twitter description (defaults to `summary`). |+| `published` | boolean | If `false`, the item is excluded from the feed, sitemap, and permalink generation. Default `true`. Use to draft entries. |+| `link` | string | Legacy — original use was the canonical link. Now superseded by the auto-generated `permalink` (`https://three.ws/news/<slug>`). If set to a non-three.ws URL it's treated as `external_link`. |++## Cover images++Put image files in `public/news-images/<filename>` and reference them in+items.json as `/news-images/<filename>`. Vite copies `public/` to `dist/`+at build time, so the image is served at the same path on three.ws.++Best practices:++- **Dimensions:** 1200×630 minimum for social cards (Twitter / OG). Aspect ratio ≥ 1.91:1.+- **Format:** WebP first (smaller), JPEG fallback if compatibility matters.+- **Always set `image_alt`.** Required for accessibility AND for `og:image:alt`.+- **Always set `image_width` + `image_height`.** Prevents cumulative layout shift and unlocks `og:image:width/height`.++Absolute URLs work too (e.g. an R2 / Vercel Blob URL): set `image` to the+full `https://...` and the same fields apply.++## Slugs++The permalink is `https://three.ws/news/<slug>`. Slugs are lowercase+`[a-z0-9-]` with leading/trailing hyphens trimmed, capped at 80 chars.++If `slug` is unset:+- Tweet-derived entries (`id: t-<tweet-id>`) drop the `t-` prefix.+- Other entries lowercase + sanitize the `id`.++If you change a slug after publishing, the old URL 404s — set a+[Vercel redirect](https://vercel.com/docs/edge-network/redirects) for+seamless migration.++## Build pipeline++`scripts/build-news.mjs` is run automatically before `vite build`+(see `prebuild` in `package.json`). It reads this file and writes:++- `public/news/<slug>.html` — one per published item+- `public/news/index.html` — chronological listing page+- `data/_generated/news-routes.json` — consumed by+ `scripts/build-page-index.mjs` to add news entries to `public/sitemap.xml`,+ `public/llms.txt`, and `public/sitemap/index.html`++Both `public/news/` and `data/_generated/` are gitignored — they are+deterministic build artifacts.++To regenerate without a full build:++```bash+npm run build:news+```++## Runtime++The RSS feed (`/api/rss/announcements`) reads items.json on every+request and emits RSS 2.0 with `<content>`, `<dc>`, `<atom>`, and+`<media>` namespaces. The CDN cache is 10 minutes+(`s-maxage=600, stale-while-revalidate=86400`).diff --git a/public/news-images/.gitkeep b/public/news-images/.gitkeepnew file mode 100644index 000000000..e69de29bbdiff --git a/scripts/build-news.mjs b/scripts/build-news.mjsindex a847d9273..fac781b0f 100644--- a/scripts/build-news.mjs+++ b/scripts/build-news.mjs@@ -157,9 +157,16 @@ article em { color: var(--fg-dim); }.post-list { list-style: none; padding: 0; margin: 0; }.post-list li { padding: 24px 0; border-bottom: 1px solid var(--border); }.post-list li:last-child { border-bottom: none; }-.post-list a.post-link { display: block; color: var(--fg); }+.post-list a.post-link { display: flex; gap: 20px; color: var(--fg); align-items: flex-start; }.post-list a.post-link:hover { text-decoration: none; }.post-list a.post-link:hover .post-title { color: var(--accent); }+.post-list .post-thumb { flex-shrink: 0; width: 140px; height: 88px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border); }+.post-list .post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }+.post-list .post-body { flex: 1; min-width: 0; }+@media (max-width: 600px) {+\t.post-list a.post-link { flex-direction: column; gap: 14px; }+\t.post-list .post-thumb { width: 100%; height: 180px; }+}.post-date { color: var(--fg-faint); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }.post-title { font-size: 24px; margin: 6px 0 8px; letter-spacing: -0.01em; font-weight: 600; transition: color .15s; }.post-summary { color: var(--fg-dim); margin: 0 0 8px; font-size: 16px; }@@ -284,14 +291,22 @@ ${siteFooterHtml()}function renderIndexPage(items) {const postsHtml = items- .map((item) => `\t\t<li>+ .map((item) => {+ const thumb = item.image+ ? `\t\t\t\t<div class="post-thumb"><img src="${escapeAttr(item.image)}" alt="${escapeAttr(item.imageAlt || item.title)}" loading="lazy"/></div>`+ : '';+ return `\t\t<li class="${item.image ? 'has-thumb' : ''}">\t\t\t<a class="post-link" href="${escapeAttr(NEWS_PATH_PREFIX)}/${escapeAttr(item.slug)}">-\t\t\t\t<div class="post-date"><time datetime="${item.timestamp.toISOString()}">${escapeHtml(formatDate(item.timestamp))}</time></div>-\t\t\t\t<h2 class="post-title">${escapeHtml(item.title)}</h2>-\t\t\t\t<p class="post-summary">${escapeHtml(item.summary)}</p>-${item.tags?.length ? `\t\t\t\t<div class="tag-list">${item.tags.map((t) => `<span class="tag">${escapeHtml(t)}</span>`).join('')}</div>` : ''}+${thumb}+\t\t\t\t<div class="post-body">+\t\t\t\t\t<div class="post-date"><time datetime="${item.timestamp.toISOString()}">${escapeHtml(formatDate(item.timestamp))}</time></div>+\t\t\t\t\t<h2 class="post-title">${escapeHtml(item.title)}</h2>+\t\t\t\t\t<p class="post-summary">${escapeHtml(item.summary)}</p>+${item.tags?.length ? `\t\t\t\t\t<div class="tag-list">${item.tags.map((t) => `<span class="tag">${escapeHtml(t)}</span>`).join('')}</div>` : ''}+\t\t\t\t</div>\t\t\t</a>-\t\t</li>`)+\t\t</li>`;+ }).join('\n');return `<!DOCTYPE html><html lang="en">