🤖 Open-source, local-first alternative to Grok Bot, OpenAI dots and Claude Duet. Your own AI bots on any model: GPT, Claude, Gemini, Grok, DeepSeek, Kimi, GLM and 70+ more through one Modelflare key. Reach them in the app, WeChat or Feishu; they remember you, work in the background, run commands and use your computer. Pay per use.
Python ai-agentai-assistantchatbotclaudecomputer-usedeepseekdesktop-appdshelectronfeishugeminigptgrokllmlocal-firstmodelflaremulti-modelopenai-compatiblepersonal-ai-agentwechat
feat(site): 合作伙伴页的微信分享卡片改用方图和新文案
dyk98fa1d4f77c7b9
diff --git a/site/public/og/wechat-share.png b/site/public/og/wechat-share.pngnew file mode 100644index 0000000..c65fc59Binary files /dev/null and b/site/public/og/wechat-share.png differdiff --git a/site/src/i18n/locales/zh/partners/index.ts b/site/src/i18n/locales/zh/partners/index.tsindex 94a2ee6..26a5d6a 100644--- a/site/src/i18n/locales/zh/partners/index.ts+++ b/site/src/i18n/locales/zh/partners/index.ts@@ -1,6 +1,6 @@export default {- "pageTitle": "推广 AnyModelBot,获得持续佣金|合作伙伴计划",- "pageDescription": "加入 AnyModelBot 合作伙伴计划,把它分享给你的学员、读者和客户。你带来的用户付费,你就能获得持续佣金。",+ "pageTitle": "推广 AnyModelBot,拿持续佣金",+ "pageDescription": "电脑里的 AI 搭子,一个 Key 用上主流模型。推荐给朋友,持续拿佣金。","footer": "合作伙伴","eyebrow": "合作伙伴计划","h1": "推广 AnyModelBot,",diff --git a/site/src/layouts/Base.astro b/site/src/layouts/Base.astroindex 3f8d6b6..2d71884 100644--- a/site/src/layouts/Base.astro+++ b/site/src/layouts/Base.astro@@ -19,13 +19,17 @@ interface Props {description?: string;jsonLd?: object[];noindex?: boolean;+ /** 分享图,url 写完整地址。不传就用当前语言的默认图(1200×630) */+ ogImage?: { url: string; width: number; height: number };+ /** 方图要配 summary,默认的大图卡片会把它裁掉一截 */+ twitterCard?: "summary" | "summary_large_image";}-const { lang, path, title, description, jsonLd = [], noindex = false } = Astro.props;+const { lang, path, title, description, jsonLd = [], noindex = false, ogImage, twitterCard = "summary_large_image" } = Astro.props;const t = dict(lang);const pageTitle = title ?? t.meta.title;const desc = description ?? t.meta.description;const canonical = `${ORIGIN}${href(lang, path)}`;-const og = `${ORIGIN}${t.meta.ogImage}`;+const og = ogImage ?? { url: `${ORIGIN}${t.meta.ogImage}`, width: 1200, height: 630 };const dlData = {version: releases.version,publishedAt: releases.publishedAt,@@ -56,15 +60,15 @@ const dlData = {<meta property="og:title" content={pageTitle} /><meta property="og:description" content={desc} /><meta property="og:url" content={canonical} />- <meta property="og:image" content={og} />- <meta property="og:image:width" content="1200" />- <meta property="og:image:height" content="630" />+ <meta property="og:image" content={og.url} />+ <meta property="og:image:width" content={String(og.width)} />+ <meta property="og:image:height" content={String(og.height)} /><meta property="og:locale" content={LOCALES[lang].og} />{READY_LANGS.filter((l) => l !== lang).map((l) => <meta property="og:locale:alternate" content={LOCALES[l].og} />)}- <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:card" content={twitterCard} /><meta name="twitter:title" content={pageTitle} /><meta name="twitter:description" content={desc} />- <meta name="twitter:image" content={og} />+ <meta name="twitter:image" content={og.url} /><meta name="theme-color" content="#060706" data-theme-color /><link rel="icon" href="/favicon.svg" type="image/svg+xml" /><link rel="icon" href="/favicon-32.png" sizes="32x32" type="image/png" />diff --git a/site/src/views/PartnersView.astro b/site/src/views/PartnersView.astroindex d7aa6b5..5d91c72 100644--- a/site/src/views/PartnersView.astro+++ b/site/src/views/PartnersView.astro@@ -12,7 +12,7 @@ import VendorLogo from "../components/VendorLogo.astro";import VendorSprite from "../components/VendorSprite.astro";import { buildVars, dict, fmt, href, type Lang } from "../i18n";import { CHAR_KEYS } from "../lib/bots";-import { MF, PARTNERS_EMAIL, pricing } from "../lib/site";+import { MF, ORIGIN, PARTNERS_EMAIL, pricing } from "../lib/site";import { vendorLogo } from "../lib/vendors";import "../styles/pages.css";interface Props { lang: Lang }@@ -26,8 +26,10 @@ const whoIcons = ["monitor", "chat", "server"] as const;const count = (vd: string) => pricing.rows.filter((r) => r.vendor === vd).length;const vendors = pricing.vendors.filter((vd) => vendorLogo(vd)).map((vd, i) => ({ vd, n: count(vd), i })).sort((x, y) => y.n - x.n || x.i - y.i).map((x) => x.vd).slice(0, 9);const [dataItem, keyItem, botsItem] = p.why.items;+// 微信分享卡片用方图,只有中文页用;其他语言继续用各自语言的默认分享图+const share = lang === "zh" ? { ogImage: { url: `${ORIGIN}/og/wechat-share.png`, width: 600, height: 600 }, twitterCard: "summary" as const } : {};----<Base lang={lang} path="/partners" title={p.pageTitle} description={p.pageDescription}>+<Base lang={lang} path="/partners" title={p.pageTitle} description={p.pageDescription} {...share}><VendorSprite vendors={vendors} color /><div class="page pt-page"><div class="scene-top hero-scene">