Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ function rehypeScrollingTables() {
// https://astro.build/config
export default defineConfig({
site: 'https://thinkwat.ch',
// Pages that moved. GitHub Pages cannot answer with a redirect, so each old
// address is built as a page that sends the browser on (and is not indexed).
redirects: {
'/license': '/pricing',
'/zh-CN/license': '/zh-CN/pricing',
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh-CN'],
Expand All @@ -58,7 +64,7 @@ export default defineConfig({
// Product landing pages: ThinkWatch, ThinkWatch Lite, ThinkWatch Core.
const productPaths = ['/thinkwatch', '/lite', '/core'];
const isProduct = productPaths.some((p) => pathname === p || pathname === `/zh-CN${p}`);
const isLicense = pathname === '/license' || pathname === '/zh-CN/license';
const isPricing = pathname === '/pricing' || pathname === '/zh-CN/pricing';

if (isHome) {
item.priority = 1.0;
Expand All @@ -76,7 +82,7 @@ export default defineConfig({
} else if (isChangelog) {
item.priority = 0.7;
item.changefreq = ChangeFreqEnum.WEEKLY;
} else if (isLicense) {
} else if (isPricing) {
item.priority = 0.6;
item.changefreq = ChangeFreqEnum.MONTHLY;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SiteFooter.astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const year = new Date().getFullYear();
<ul class="space-y-1 sm:space-y-2 text-[var(--color-muted)]">
<li><a href={localePath(lang, "/docs")} class="inline-block py-1.5 hover:text-white">{s.nav.docs}</a></li>
<li><a href={localePath(lang, "/changelog")} class="inline-block py-1.5 hover:text-white">{s.nav.changelog}</a></li>
<li><a href={localePath(lang, "/license")} class="inline-block py-1.5 hover:text-white">{s.nav.license}</a></li>
<li><a href={localePath(lang, "/pricing")} class="inline-block py-1.5 hover:text-white">{s.nav.pricing}</a></li>
<li><a href="https://github.com/ThinkWatchProject" class="inline-block py-1.5 hover:text-white">GitHub</a></li>
<li><a href="/changelog.xml" class="inline-block py-1.5 hover:text-white">RSS</a></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SiteHeader.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const links = [
{ href: localePath(lang, "/core"), label: s.nav.core, match: "/core" },
{ href: localePath(lang, "/docs"), label: s.nav.docs, match: "/docs" },
{ href: localePath(lang, "/changelog"), label: s.nav.changelog, match: "/changelog" },
{ href: localePath(lang, "/license"), label: s.nav.license, match: "/license" },
{ href: localePath(lang, "/pricing"), label: s.nav.pricing, match: "/pricing" },
].map((l) => ({ ...l, active: currentPath === l.match || currentPath.startsWith(l.match + "/") }));

const cleanPath = Astro.url.pathname.replace(/^\/zh-CN/, "") || "/";
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/CompareEditions.astro
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ const rows = ["runsAs", "builtFor", "status", "license"] as const;
))}
</div>

<a href={localePath(lang, "/license")} class="nx-link mt-7">{c.link}</a>
<a href={localePath(lang, "/pricing")} class="nx-link mt-7">{c.link}</a>
</div>
</section>
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
---
// Shared /license page. Copy lives in src/i18n/pages/license.ts.
// Shared /pricing page: the licenses of the three products and the commercial
// terms of ThinkWatch Enterprise. Copy lives in src/i18n/pages/pricing.ts.
import Base from "~/layouts/Base.astro";
import SiteHeader from "~/components/SiteHeader.astro";
import SiteFooter from "~/components/SiteFooter.astro";
import NeonMotion from "~/components/NeonMotion.astro";
import { getLang } from "~/i18n";
import { licenseCopy } from "~/i18n/pages/license";
import { pricingCopy } from "~/i18n/pages/pricing";
import { breadcrumbs, webPage } from "~/lib/structured-data";

const lang = getLang(Astro);
const c = licenseCopy[lang];
const c = pricingCopy[lang];

const jsonLd = [
webPage(lang, "/license", c.meta.title, c.meta.description),
breadcrumbs(lang, "/license", c.meta.breadcrumbHome, c.meta.breadcrumbPage),
webPage(lang, "/pricing", c.meta.title, c.meta.description),
breadcrumbs(lang, "/pricing", c.meta.breadcrumbHome, c.meta.breadcrumbPage),
];
---

Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/ThinkWatchPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const delay = (i: number) => `animation-delay: ${i * 90}ms;`;
</p>
</div>
<a
href={localePath(lang, "/license")}
href={localePath(lang, "/pricing")}
class="inline-flex min-h-11 shrink-0 items-center text-[17px] font-medium text-[var(--color-brand-1)] transition-colors hover:text-[var(--color-brand-2)]"
>
{c.licenseTeaser.link}
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ ThinkWatch Enterprise is a self-hosted AI API and MCP gateway for organizations.
3. [Configuration](/docs/configuration): environment variables and system settings.
4. [Security](/docs/security): authentication, encryption, RBAC and the hardening checklist.

ThinkWatch Enterprise is source-available under the Business Source License 1.1: free for non-production use, and free in production up to monthly thresholds. See [License](/license).
ThinkWatch Enterprise is source-available under the Business Source License 1.1: free for non-production use, and free in production up to monthly thresholds. See [Pricing](/pricing).
2 changes: 1 addition & 1 deletion src/content/docs/zh-CN/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ ThinkWatch 企业版是面向组织自托管的 AI API 与 MCP 网关。组织
3. [配置说明](/zh-CN/docs/configuration):环境变量与系统设置。
4. [安全模型](/zh-CN/docs/security):认证、加密、RBAC 与加固清单。

ThinkWatch 企业版在 Business Source License 1.1 下源码开放:非生产环境免费,生产环境在月度阈值以内免费,详见[许可证](/zh-CN/license)。
ThinkWatch 企业版在 Business Source License 1.1 下源码开放:非生产环境免费,生产环境在月度阈值以内免费,详见[定价](/zh-CN/pricing)。
6 changes: 2 additions & 4 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ const dict = {
thinkwatch: "Enterprise",
lite: "Lite",
core: "Core",
license: "Pricing",
pricing: "Pricing",
how: "How it works",
features: "Features",
mcp: "MCP",
console: "Console",
pricing: "Pricing",
quickstart: "Quick start",
docs: "Docs",
changelog: "Changelog",
Expand Down Expand Up @@ -248,12 +247,11 @@ const dict = {
thinkwatch: "企业版",
lite: "Lite",
core: "Core",
license: "定价",
pricing: "定价",
how: "工作原理",
features: "功能特性",
mcp: "MCP",
console: "控制台",
pricing: "定价",
quickstart: "快速开始",
docs: "文档",
changelog: "更新日志",
Expand Down
6 changes: 3 additions & 3 deletions src/i18n/pages/license.ts → src/i18n/pages/pricing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copy for the /license page.
// Copy for the /pricing page.
// Every rule, tier, price and definition here mirrors LICENSING.md in the
// ThinkWatch repository. If that file changes, update this one to match,
// and keep the numbers identical across both languages.
Expand All @@ -19,7 +19,7 @@ const tierNumbers = [
{ name: "Enterprise", tokens: "1,000,000,001 – 10,000,000,000", calls: "1,000,001 – 10,000,000", free: false },
] as const;

export const licenseCopy = {
export const pricingCopy = {
en: {
meta: {
title: "Pricing · ThinkWatch",
Expand Down Expand Up @@ -252,4 +252,4 @@ export const licenseCopy = {
},
} as const;

export default licenseCopy;
export default pricingCopy;
4 changes: 2 additions & 2 deletions src/lib/lastmod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export function pageSources(pathname: string): string[] {
// The sections below the hero still read their copy from the shared dictionary.
"src/i18n/index.ts",
];
case "/license":
return ["src/components/pages/LicensePage.astro", "src/i18n/pages/license.ts"];
case "/pricing":
return ["src/components/pages/PricingPage.astro", "src/i18n/pages/pricing.ts"];
case "/changelog":
return ["src/components/pages/ChangelogPage.astro", "src/i18n/pages/changelog.ts", "src/content/changelog"];
case "/docs":
Expand Down
5 changes: 0 additions & 5 deletions src/pages/license.astro

This file was deleted.

5 changes: 5 additions & 0 deletions src/pages/pricing.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import PricingPage from "~/components/pages/PricingPage.astro";
---

<PricingPage />
5 changes: 0 additions & 5 deletions src/pages/zh-CN/license.astro

This file was deleted.

5 changes: 5 additions & 0 deletions src/pages/zh-CN/pricing.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import PricingPage from "~/components/pages/PricingPage.astro";
---

<PricingPage />
Loading