feat: publish website on GitHub Pages
The static product site did not have an automated public deployment. Changes under sites now validate and deploy from main to mesalogo.github.io/goodbuddy, and package metadata points to that address.
This commit is contained in:
@@ -2,6 +2,17 @@
|
||||
|
||||
`sites` 是无需构建步骤或额外依赖的静态官网源码,可直接托管整个目录。
|
||||
|
||||
正式站点地址:<https://mesalogo.github.io/goodbuddy/>
|
||||
|
||||
## 部署
|
||||
|
||||
`.github/workflows/pages.yml` 会在 `main` 分支中的官网文件发生变化后,
|
||||
校验并部署整个 `sites` 目录。工作流也支持在 GitHub Actions 中手动运行。
|
||||
|
||||
首次部署前,需要在 GitHub 仓库的 **Settings > Pages** 中将 **Source**
|
||||
设为 **GitHub Actions**。站点使用项目 Pages 地址,不需要 `CNAME` 文件
|
||||
或自定义域名 DNS 配置。
|
||||
|
||||
## 本地预览
|
||||
|
||||
在仓库根目录运行:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
name="description"
|
||||
content="GoodBuddy 是桌面 AI 助手,支持项目知识库、魔法笔记、远程消息通道和受控工具执行。"
|
||||
/>
|
||||
<link rel="canonical" href="https://mesalogo.github.io/goodbuddy/" />
|
||||
<meta name="theme-color" content="#f6f8fb" />
|
||||
<title>GoodBuddy|桌面 AI 助手</title>
|
||||
<link rel="icon" href="./assets/favicon.svg" type="image/svg+xml" />
|
||||
|
||||
@@ -56,6 +56,12 @@ for (const [relativePath, content] of [
|
||||
|
||||
report(/<html\s+lang="zh-CN">/.test(html), "页面语言必须是 zh-CN");
|
||||
report(/<meta\s+name="viewport"/.test(html), "缺少 viewport 元信息");
|
||||
report(
|
||||
/<link\s+rel="canonical"\s+href="https:\/\/mesalogo\.github\.io\/goodbuddy\/"\s*\/>/.test(
|
||||
html,
|
||||
),
|
||||
"canonical 地址必须指向 GitHub Pages 正式站点",
|
||||
);
|
||||
report((html.match(/<h1[\s>]/g) ?? []).length === 1, "页面必须且只能包含一个 h1");
|
||||
report(/class="skip-link"\s+href="#main-content"/.test(html), "缺少跳到主要内容链接");
|
||||
report(/<main\s+id="main-content">/.test(html), "缺少 main-content 主区域");
|
||||
|
||||
Reference in New Issue
Block a user