diff --git a/Makefile b/Makefile index 8c3680a..b0b004f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: install web gui all server stop status build-web test desktop +.PHONY: install web gui all server stop status build-web test desktop homepage install: npm install @@ -24,6 +24,9 @@ status: desktop: ./run.sh desktop +homepage: + scripts/build-homepage.sh + build-web: npm run build diff --git a/README.md b/README.md index 05236ff..dc6cee3 100644 --- a/README.md +++ b/README.md @@ -62,24 +62,18 @@ make install 打开 http://127.0.0.1:8787/ 看落地页;操作请用 `./run.sh gui`。`:5173` 只是桌面 WebView 源。 -## 用户文档站(/docs) +## 官网 / 文档 / 定价(homepage/,纯静态) -Gin 内置产品文档,Markdown 嵌入二进制、SSR 渲染,随服务一键部署: +官网(落地页 + `/docs` + `/pricing`)已拆分为独立静态站:源在 `homepage/`,与后端/GUI 解耦;后端仅在本地静态托管产物 `homepage/dist`(nginx 直接托管同一目录)。构建入口 `scripts/build-homepage.sh`(= `make homepage`),工具在独立 Go module `tools/homepage-build/`。 -- 地址:`http://127.0.0.1:8787/docs`(开发态 `http://127.0.0.1:5173/docs`,Vite 已反代;工作台顶栏「📖 文档」直达) -- 布局:顶栏搜索 + 左侧分组导航(16 篇:开始使用 / 请求调试 / 数据管理 / 参考)+ 右侧本页目录 -- 能力:全文搜索、代码块复制 + 高亮、提示块、上一页/下一页、反馈组件、打印导出 PDF、移动端响应式、404 页 -- 内容在 `server/internal/docs/content/*.md`(本地预览优先托管 `homepage/dist`) - -## 产品官网(/home) - -Gin 内置营销单页,与 /docs 同为 SSR 嵌入交付(`internal/site`): - -- 地址:`/` 与 `/home` 双入口(开发态 `http://127.0.0.1:5173/home`);文档站顶栏「官网」互链 -- 区块:Hero(纯 CSS 产品界面 mock)/ 卖点 / 功能 / 六协议 / 导入导出生态 / 与 Apifox·Apipost 对比表 / 定价 / 让利计划 / 购买 FAQ / 联系 CTA / Footer -- 定价三档(标价/成交价分离):个人版 ¥99/年、团队版 ¥99/人/年(入门锚点);企业私有化版标价 **¥8,000/年 · ¥30,000 买断**,经早鸟/教育/多年预付/案例合作落在成交区间 ¥5,000–8,000/年、¥15,000–30,000 -- 让利机制四项:早鸟创始价(前 20 席 5–7 折永久)、教育/开源 6–8 折、多年预付 8–9 折、案例换授权;销售原则:不直接降价,用「永久授权 + 1 年升级 + 5 人团队 1–2 年回本」回应预算顾虑 -- 交付前替换:联系邮箱 `hello@opsxapi.dev`(template.html 内两处)与对比表脚注中的价格核对 +- 源结构: + - `homepage/index.html` 落地页;`homepage/pricing.html` 定价页;`homepage/terms.html` 服务条款 + - `homepage/docs.html` 文档模板;`homepage/content/*.md` + `manifest.json`(20 篇,6 分组) + - `homepage/assets/`(官网资源,产物落 `dist/site/assets/`);`homepage/docs-assets/`(文档资源,产物落 `dist/docs/assets/`) +- 产物 `homepage/dist/`(结构固定):`index.html`、`docs/index.html`、`docs//index.html`、`docs/search-data.json`、`pricing.html` + `pricing/index.html`、`site/assets/*` +- 本地预览:`./run.sh web` → 落地页 `http://127.0.0.1:8787/`、文档 `http://127.0.0.1:8787/docs`、定价 `http://127.0.0.1:8787/pricing` +- `.gitignore` 含 `dist/`,产物默认不入库;如需入库 `git add -f homepage/dist` +- 交付前替换:联系邮箱 `hello@opsxapi.dev`(`homepage/index.html`) ## 服务端端点(server/) diff --git a/server/internal/site/assets/site.css b/homepage/assets/site.css similarity index 100% rename from server/internal/site/assets/site.css rename to homepage/assets/site.css diff --git a/server/internal/docs/content/01-intro.md b/homepage/content/01-intro.md similarity index 100% rename from server/internal/docs/content/01-intro.md rename to homepage/content/01-intro.md diff --git a/server/internal/docs/content/02-quickstart.md b/homepage/content/02-quickstart.md similarity index 100% rename from server/internal/docs/content/02-quickstart.md rename to homepage/content/02-quickstart.md diff --git a/server/internal/docs/content/03-interface.md b/homepage/content/03-interface.md similarity index 100% rename from server/internal/docs/content/03-interface.md rename to homepage/content/03-interface.md diff --git a/server/internal/docs/content/04-http.md b/homepage/content/04-http.md similarity index 100% rename from server/internal/docs/content/04-http.md rename to homepage/content/04-http.md diff --git a/server/internal/docs/content/05-auth.md b/homepage/content/05-auth.md similarity index 100% rename from server/internal/docs/content/05-auth.md rename to homepage/content/05-auth.md diff --git a/server/internal/docs/content/06-env.md b/homepage/content/06-env.md similarity index 100% rename from server/internal/docs/content/06-env.md rename to homepage/content/06-env.md diff --git a/server/internal/docs/content/07-graphql.md b/homepage/content/07-graphql.md similarity index 100% rename from server/internal/docs/content/07-graphql.md rename to homepage/content/07-graphql.md diff --git a/server/internal/docs/content/08-websocket.md b/homepage/content/08-websocket.md similarity index 100% rename from server/internal/docs/content/08-websocket.md rename to homepage/content/08-websocket.md diff --git a/server/internal/docs/content/09-sse.md b/homepage/content/09-sse.md similarity index 100% rename from server/internal/docs/content/09-sse.md rename to homepage/content/09-sse.md diff --git a/server/internal/docs/content/10-socketio.md b/homepage/content/10-socketio.md similarity index 100% rename from server/internal/docs/content/10-socketio.md rename to homepage/content/10-socketio.md diff --git a/server/internal/docs/content/11-mqtt.md b/homepage/content/11-mqtt.md similarity index 100% rename from server/internal/docs/content/11-mqtt.md rename to homepage/content/11-mqtt.md diff --git a/server/internal/docs/content/12-import.md b/homepage/content/12-import.md similarity index 100% rename from server/internal/docs/content/12-import.md rename to homepage/content/12-import.md diff --git a/server/internal/docs/content/13-export.md b/homepage/content/13-export.md similarity index 100% rename from server/internal/docs/content/13-export.md rename to homepage/content/13-export.md diff --git a/server/internal/docs/content/14-mock.md b/homepage/content/14-mock.md similarity index 100% rename from server/internal/docs/content/14-mock.md rename to homepage/content/14-mock.md diff --git a/server/internal/docs/content/15-manage.md b/homepage/content/15-manage.md similarity index 100% rename from server/internal/docs/content/15-manage.md rename to homepage/content/15-manage.md diff --git a/server/internal/docs/content/16-testing.md b/homepage/content/16-testing.md similarity index 100% rename from server/internal/docs/content/16-testing.md rename to homepage/content/16-testing.md diff --git a/server/internal/docs/content/17-ai.md b/homepage/content/17-ai.md similarity index 100% rename from server/internal/docs/content/17-ai.md rename to homepage/content/17-ai.md diff --git a/server/internal/docs/content/18-server-api.md b/homepage/content/18-server-api.md similarity index 100% rename from server/internal/docs/content/18-server-api.md rename to homepage/content/18-server-api.md diff --git a/server/internal/docs/content/19-faq.md b/homepage/content/19-faq.md similarity index 100% rename from server/internal/docs/content/19-faq.md rename to homepage/content/19-faq.md diff --git a/server/internal/docs/content/20-account.md b/homepage/content/20-account.md similarity index 100% rename from server/internal/docs/content/20-account.md rename to homepage/content/20-account.md diff --git a/server/internal/docs/content/manifest.json b/homepage/content/manifest.json similarity index 100% rename from server/internal/docs/content/manifest.json rename to homepage/content/manifest.json diff --git a/homepage/dist/docs/account/index.html b/homepage/dist/docs/account/index.html index 168f8a0..65aee58 100644 --- a/homepage/dist/docs/account/index.html +++ b/homepage/dist/docs/account/index.html @@ -139,7 +139,7 @@
更新于 2026-09-17

账号与团队

-

登录后可使用云端空间:个人空间「我的空间」与团队共享空间,数据保存在本机服务的 SQLite 数据库(apps/server/data/opsxapi.db),不上传任何第三方。

+

登录后可使用云端空间:个人空间「我的空间」与团队共享空间,数据保存在本机服务的 SQLite 数据库(server/data/opsxapi.db),不上传任何第三方。

注册 / 登录

最左活动栏底部 登录 按钮打开弹窗: