Skip to content

Commit c10bb51

Browse files
committed
fix(site): simplify homepage and update release examples
Remove redundant labels, duplicate hero links and quick-start fine print in both locales. Update deployment examples to 1.0.3. Validation: npm run typecheck, npm run build, and browser checks of bilingual home/docs pages.
1 parent bc2b7cd commit c10bb51

9 files changed

Lines changed: 15 additions & 93 deletions

File tree

‎App.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import GettingStarted from './components/GettingStarted';
55
import Footer from './components/Footer';
66
import SiteMeta from './components/SiteMeta';
77
import { contentByLang } from './content';
8-
import { docsPath } from './config/routes';
98
import type { Lang } from './content/types';
109

1110
interface AppProps {
@@ -15,17 +14,16 @@ interface AppProps {
1514

1615
const App = ({ lang, pathname }: AppProps) => {
1716
const content = contentByLang[lang];
18-
const docsHref = docsPath(lang);
1917

2018
return (
2119
<div className="min-h-screen bg-background text-text">
2220
<SiteMeta content={content} pathname={pathname} />
2321
<Navbar lang={lang} pathname={pathname} />
2422
<main className="px-4 pb-10 pt-4 sm:px-6 lg:px-8">
2523
<div className="mx-auto flex w-full max-w-6xl flex-col gap-4">
26-
<Hero content={content} docsHref={docsHref} />
24+
<Hero content={content} />
2725
<Projects content={content} />
28-
<GettingStarted content={content} docsHref={docsHref} />
26+
<GettingStarted content={content} />
2927
</div>
3028
</main>
3129
<Footer content={content} />

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
两个应用镜像已在 GHCR 公开,用户可匿名拉取,无需 GitHub 账户或 `docker login`:
2626

2727
```sh
28-
docker pull ghcr.io/webmonitor/webmonitor-agent:1.0.2
29-
docker pull ghcr.io/webmonitor/webmonitor:1.0.2
28+
docker pull ghcr.io/webmonitor/webmonitor-agent:1.0.3
29+
docker pull ghcr.io/webmonitor/webmonitor:1.0.3
3030
```
3131

3232
官网安装入口统一为独立部署目录:直接下载所需 `compose.yaml` 与配套文件,按文档内模板自行创建 `.env`,不要求克隆仓库或下载源码。两个产品均以 `docker compose up -d --wait` 启动,默认拉取 `latest`;可在 `.env` 中设置完整 `WEBMONITOR_IMAGE` 固定版本。应用镜像只随版本标签发布,`latest` 跟随稳定版。
@@ -51,7 +51,9 @@ docker pull ghcr.io/webmonitor/webmonitor:1.0.2
5151
| `content/index.ts` | 按语言选择内容 |
5252
| `config/routes.ts` | 路由、语言与切换链接 |
5353
| `config/site.ts` | 组织、演示和 Logo 等共享 URL |
54+
| `components/Navbar.tsx`、`components/Hero.tsx` | 顶部导航与首页文字入口;首页保留在线体验、源码操作,文档通过导航进入 |
5455
| `components/DocsPage.tsx` | 按内容数据渲染文档、表格、代码和目录 |
56+
| `components/Projects.tsx`、`components/GettingStarted.tsx` | 产品、资源与安装区块;快速开始保留两组命令,操作与存储说明在完整文档中 |
5557
| `components/Rich.tsx` | 行内代码与强调文本 |
5658
| 四个路由的 `index.html` | 静态标题、描述、canonical、hreflang、Open Graph 与 JSON-LD |
5759
| `entry-server.tsx`、`scripts/prerender.mjs` | 构建时生成页面正文 |

‎components/DocsPage.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ const DocsPage = ({ content }: { content: SiteContent }) => {
103103
<main className="px-4 pb-12 pt-4 sm:px-6 lg:px-8">
104104
<div className="mx-auto w-full max-w-6xl">
105105
<div className="space-y-3 border-b border-line pb-6 pt-4">
106-
<p className="text-xs font-medium uppercase tracking-[0.3em] text-muted">{docs.eyebrow}</p>
107106
<h1 className="text-4xl font-semibold tracking-tight text-text sm:text-5xl">{docs.heading}</h1>
108107
<p className="max-w-2xl text-sm leading-7 text-muted sm:text-base">
109108
<Rich text={docs.intro} />

‎components/GettingStarted.tsx‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,24 @@ import CodeBlock from './CodeBlock';
44

55
interface GettingStartedProps {
66
content: SiteContent;
7-
docsHref: string;
87
}
98

10-
const GettingStarted = ({ content, docsHref }: GettingStartedProps) => {
9+
const GettingStarted = ({ content }: GettingStartedProps) => {
1110
const { sections, quickStart } = content;
1211

1312
return (
1413
<section className="space-y-5 py-2">
1514
<div className="space-y-2">
16-
<p className="text-xs font-medium uppercase tracking-[0.28em] text-muted">{sections.startEyebrow}</p>
1715
<h2 className="text-2xl font-semibold tracking-tight text-text">{sections.startTitle}</h2>
1816
<p className="text-sm leading-7 text-muted">{sections.startDescription}</p>
1917
</div>
2018

2119
<Separator className="h-px w-full bg-line" />
2220

2321
<div className="grid gap-8 lg:grid-cols-2 lg:gap-12">
24-
<CodeBlock title="WebMonitor-Agent" code={quickStart.agent.join('\n')} hint={quickStart.agentHint} />
25-
<CodeBlock title="WebMonitor" code={quickStart.legacy.join('\n')} hint={quickStart.legacyHint} />
22+
<CodeBlock title="WebMonitor-Agent" code={quickStart.agent.join('\n')} />
23+
<CodeBlock title="WebMonitor" code={quickStart.legacy.join('\n')} />
2624
</div>
27-
28-
<p className="max-w-3xl text-xs leading-6 text-muted">
29-
{quickStart.note}{' '}
30-
<a href={docsHref} className="underline decoration-line underline-offset-4 transition hover:text-text">
31-
{quickStart.docsLink}
32-
</a>
33-
</p>
3425
</section>
3526
);
3627
};

‎components/Hero.tsx‎

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
import { Fragment } from 'react';
2-
import { Tooltip } from '@base-ui/react';
3-
import { ArrowUpRight, BookOpen, Github, Globe } from 'lucide-react';
1+
import { ArrowUpRight } from 'lucide-react';
42
import { shared } from '../config/site';
53
import type { SiteContent } from '../content/types';
64

75
interface HeroProps {
86
content: SiteContent;
9-
docsHref: string;
107
}
118

12-
const Hero = ({ content, docsHref }: HeroProps) => {
13-
const iconLinks = [
14-
{ label: content.hero.icons.github, href: shared.githubUrl, icon: Github, external: true },
15-
{ label: content.hero.icons.demo, href: shared.demoUrl, icon: Globe, external: true },
16-
{ label: content.hero.icons.docs, href: docsHref, icon: BookOpen, external: false },
17-
];
18-
9+
const Hero = ({ content }: HeroProps) => {
1910
return (
2011
<section className="border-b border-line pb-5">
2112
<div className="py-4">
@@ -47,34 +38,6 @@ const Hero = ({ content, docsHref }: HeroProps) => {
4738
</a>
4839
</div>
4940

50-
<div className="flex flex-wrap items-center gap-2">
51-
{iconLinks.map(({ label, href, icon: Icon, external }) => (
52-
<Fragment key={label}>
53-
<Tooltip.Root>
54-
<Tooltip.Trigger
55-
render={
56-
<a
57-
href={href}
58-
target={external ? '_blank' : undefined}
59-
rel={external ? 'noreferrer' : undefined}
60-
aria-label={label}
61-
className="inline-flex h-10 w-10 items-center justify-center rounded-full border border-line bg-background text-muted transition hover:text-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text/15"
62-
/>
63-
}
64-
>
65-
<Icon className="h-4 w-4" />
66-
</Tooltip.Trigger>
67-
<Tooltip.Portal>
68-
<Tooltip.Positioner sideOffset={8}>
69-
<Tooltip.Popup className="rounded-full bg-text px-3 py-1 text-xs font-medium text-surface shadow-lg">
70-
{label}
71-
</Tooltip.Popup>
72-
</Tooltip.Positioner>
73-
</Tooltip.Portal>
74-
</Tooltip.Root>
75-
</Fragment>
76-
))}
77-
</div>
7841
</div>
7942
</div>
8043
</section>

‎components/Projects.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const Projects = ({ content }: { content: SiteContent }) => {
99
<section className="grid gap-10 py-2 lg:grid-cols-2 lg:gap-12">
1010
<div className="space-y-5">
1111
<div className="space-y-2">
12-
<p className="text-xs font-medium uppercase tracking-[0.28em] text-muted">{sections.projectsEyebrow}</p>
1312
<h2 className="text-2xl font-semibold tracking-tight text-text">{sections.projectsTitle}</h2>
1413
<p className="text-sm leading-7 text-muted">{sections.projectsDescription}</p>
1514
</div>
@@ -47,7 +46,6 @@ const Projects = ({ content }: { content: SiteContent }) => {
4746

4847
<div className="space-y-5">
4948
<div className="space-y-2">
50-
<p className="text-xs font-medium uppercase tracking-[0.28em] text-muted">{sections.resourcesEyebrow}</p>
5149
<h2 className="text-2xl font-semibold tracking-tight text-text">{sections.resourcesTitle}</h2>
5250
<p className="text-sm leading-7 text-muted">{sections.resourcesDescription}</p>
5351
</div>

‎content/en.ts‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ export const en: SiteContent = {
2929
'Watch prices, stock, announcements and deadlines. Fill in each check in a visual dashboard, or describe what you want in one sentence; when the page changes, you get an email.',
3030
primary: 'Live demo',
3131
secondary: 'GitHub',
32-
icons: { github: 'GitHub', demo: 'Live demo', docs: 'Documentation' },
3332
},
3433
sections: {
35-
projectsEyebrow: 'Projects',
3634
projectsTitle: 'Two ways to start',
3735
projectsDescription:
3836
'The same job — watching a page for you — with two entry points: a dashboard you fill in, and an assistant you describe it to.',
39-
resourcesEyebrow: 'Resources',
4037
resourcesTitle: 'Where to go next',
4138
resourcesDescription: 'The demo, the setup guide and the source.',
42-
startEyebrow: 'Get Started',
4339
startTitle: 'Three steps',
4440
startDescription:
4541
'Prepare Docker, download the deployment files, create .env from the template, then run the same startup command. A normal install needs no repository clone and no registry login.',
@@ -105,19 +101,13 @@ export const en: SiteContent = {
105101
'# Create .env from the template at /en/docs/#webmonitor',
106102
'docker compose up -d --wait',
107103
],
108-
agentHint:
109-
'Open http://localhost:8080 and sign in with the admin email and password from .env; if no admin exists yet, create one as described in the docs. The first start also builds two helper images locally, which takes a few minutes.',
110-
legacyHint: 'Open http://localhost:8000 and sign in with the username and password from .env; configure email in the app.',
111-
note: 'Both projects start with the same command in their own deployment directory and pull the public latest image. Agent keeps its database and page archives in temporary storage, so stopping or recreating the data containers loses data; set up persistent storage and backups before long-term use.',
112-
docsLink: 'Full setup, first-monitor and data-retention guide',
113104
},
114105
footerTagline: 'WebMonitor · web change monitoring with email alerts',
115106
footerLink: 'github.com/webmonitor',
116107
docs: {
117108
title: 'WebMonitor Docs | Install, create your first monitor, get email alerts',
118109
description:
119110
'From picking a project to your first change email: prepare Docker, download the deployment files, create .env, start the service, then create a monitor, configure email, manage tasks, troubleshoot and understand data retention.',
120-
eyebrow: 'Documentation',
121111
heading: 'Setup and usage',
122112
intro:
123113
'Pick a project, prepare Docker and whatever external service it needs, then install it in three steps: download the files, create .env, and run docker compose up -d --wait. Once it is running, follow the walkthrough for your first monitor; email, day-to-day management and troubleshooting come next.',
@@ -195,7 +185,7 @@ export const en: SiteContent = {
195185
type: 'table',
196186
head: ['Set in .env', 'What it means'],
197187
rows: [
198-
['`WEBMONITOR_IMAGE`', 'Defaults to latest; to pin a release, use `ghcr.io/webmonitor/webmonitor:1.0.2`.'],
188+
['`WEBMONITOR_IMAGE`', 'Defaults to latest; to pin a release, use `ghcr.io/webmonitor/webmonitor:1.0.3`.'],
199189
['`SECRET_KEY`', 'A random string of at least 32 characters used to sign sign-in tokens.'],
200190
['`ADMIN_USERNAME`, `ADMIN_PASSWORD`', 'The initial admin account; sign in with this username, not the email.'],
201191
['`ADMIN_EMAIL`', 'The administrator email stored on the account.'],
@@ -246,7 +236,7 @@ export const en: SiteContent = {
246236
type: 'table',
247237
head: ['Set in .env', 'What it means'],
248238
rows: [
249-
['`WEBMONITOR_IMAGE`', 'Defaults to latest; to pin a release, use `ghcr.io/webmonitor/webmonitor-agent:1.0.2`.'],
239+
['`WEBMONITOR_IMAGE`', 'Defaults to latest; to pin a release, use `ghcr.io/webmonitor/webmonitor-agent:1.0.3`.'],
250240
['`POSTGRES_PASSWORD`, `SECRET_KEY`', 'The database password, and a random signing key of at least 32 characters.'],
251241
['`ADMIN_EMAIL`, `ADMIN_PASSWORD`', 'The initial admin account; the password is 12–128 characters and you sign in with the email.'],
252242
['`OPENAI_API_KEY`, `OPENAI_BASE_URL`, `OPENAI_MODEL`', 'The model service key, compatible API URL and an available model name.'],

‎content/types.ts‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,12 @@ export interface SiteContent {
5454
intro: string;
5555
primary: string;
5656
secondary: string;
57-
icons: { github: string; demo: string; docs: string };
5857
};
5958
sections: {
60-
projectsEyebrow: string;
6159
projectsTitle: string;
6260
projectsDescription: string;
63-
resourcesEyebrow: string;
6461
resourcesTitle: string;
6562
resourcesDescription: string;
66-
startEyebrow: string;
6763
startTitle: string;
6864
startDescription: string;
6965
};
@@ -72,17 +68,12 @@ export interface SiteContent {
7268
quickStart: {
7369
agent: string[];
7470
legacy: string[];
75-
agentHint: string;
76-
legacyHint: string;
77-
note: string;
78-
docsLink: string;
7971
};
8072
footerTagline: string;
8173
footerLink: string;
8274
docs: {
8375
title: string;
8476
description: string;
85-
eyebrow: string;
8677
heading: string;
8778
intro: string;
8879
contents: string;

‎content/zh.ts‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,12 @@ export const zh: SiteContent = {
2020
'盯住价格、库存、公告和截止日期。在可视化工作台里逐项填写,或用一句话说明需求;页面变化时,邮件提醒你。',
2121
primary: '在线体验',
2222
secondary: 'GitHub',
23-
icons: { github: 'GitHub', demo: '在线体验', docs: '使用文档' },
2423
},
2524
sections: {
26-
projectsEyebrow: 'Projects',
2725
projectsTitle: '两种用法,选一个开始',
2826
projectsDescription: '同一件事——替你看页面——两种上手方式:逐项填写的监控工作台,和一句话交代清楚的对话助手。',
29-
resourcesEyebrow: 'Resources',
3027
resourcesTitle: '相关入口',
3128
resourcesDescription: '演示站点、安装文档与源码入口。',
32-
startEyebrow: 'Get Started',
3329
startTitle: '三步开始',
3430
startDescription:
3531
'准备 Docker,下载部署文件,按模板创建 .env,然后执行同一条启动命令。普通安装不需要克隆仓库,也不需要登录镜像仓库。',
@@ -95,19 +91,13 @@ export const zh: SiteContent = {
9591
'# 按 /docs/#webmonitor 的模板自行创建 .env',
9692
'docker compose up -d --wait',
9793
],
98-
agentHint:
99-
'打开 http://localhost:8080,用 .env 里的管理员邮箱和密码登录;还没有管理员时按文档创建。首次启动会在本地构建两个辅助镜像,需要几分钟。',
100-
legacyHint: '打开 http://localhost:8000,用 .env 里的用户名和密码登录;邮件在应用内配置。',
101-
note: '两个项目都在各自的部署目录里用同一条命令启动,拉取公开的 latest 镜像。Agent 的数据库与页面存档使用临时存储,停止或重建数据容器会丢失数据;长期使用前先配置持久存储和备份。',
102-
docsLink: '查看完整安装、首次监控与数据保留说明',
10394
},
10495
footerTagline: 'WebMonitor · 网页变化监控与邮件提醒',
10596
footerLink: 'github.com/webmonitor',
10697
docs: {
10798
title: 'WebMonitor 文档 | 安装、首次监控与邮件通知',
10899
description:
109100
'从选择项目到第一封变化邮件:准备 Docker、下载部署文件、创建 .env、启动服务,再完成首次监控、邮件配置、任务管理、故障排查与数据保留。',
110-
eyebrow: 'Documentation',
111101
heading: '安装与使用',
112102
intro:
113103
'先选一个项目,准备 Docker 和它需要的外部服务,然后按三步完成安装:下载文件、创建 .env、执行 docker compose up -d --wait。安装完成后照着步骤创建第一个监控,邮件、日常管理和排错都写在后面。',
@@ -185,7 +175,7 @@ export const zh: SiteContent = {
185175
type: 'table',
186176
head: ['在 .env 中填写', '说明'],
187177
rows: [
188-
['`WEBMONITOR_IMAGE`', '默认 latest;想固定版本时改成 `ghcr.io/webmonitor/webmonitor:1.0.2`。'],
178+
['`WEBMONITOR_IMAGE`', '默认 latest;想固定版本时改成 `ghcr.io/webmonitor/webmonitor:1.0.3`。'],
189179
['`SECRET_KEY`', '至少 32 字符的随机串,用于登录令牌签名。'],
190180
['`ADMIN_USERNAME`、`ADMIN_PASSWORD`', '初始管理员用户名和密码,用于登录。'],
191181
['`ADMIN_EMAIL`', '管理员邮箱,用于账户信息。'],
@@ -236,7 +226,7 @@ export const zh: SiteContent = {
236226
type: 'table',
237227
head: ['在 .env 中填写', '说明'],
238228
rows: [
239-
['`WEBMONITOR_IMAGE`', '默认 latest;想固定版本时改成 `ghcr.io/webmonitor/webmonitor-agent:1.0.2`。'],
229+
['`WEBMONITOR_IMAGE`', '默认 latest;想固定版本时改成 `ghcr.io/webmonitor/webmonitor-agent:1.0.3`。'],
240230
['`POSTGRES_PASSWORD`、`SECRET_KEY`', '数据库密码,以及至少 32 字符的随机签名密钥。'],
241231
['`ADMIN_EMAIL`、`ADMIN_PASSWORD`', '初始管理员账号;密码为 12–128 字符,登录时用邮箱。'],
242232
['`OPENAI_API_KEY`、`OPENAI_BASE_URL`、`OPENAI_MODEL`', '模型服务的密钥、兼容接口地址和可用的模型名称。'],

0 commit comments

Comments
 (0)