Repository navigation
Conversation
- 每个页面按自己的 title 和 description 生成 og:title、og:description、og:url、og:locale 和 twitter:title、twitter:description - 中英文首页加入 SoftwareApplication JSON-LD,版本号读取 src/i18n/versions.ts; Voltip 版本变化时 sync-versions.yml 同时重新部署本站 - 新增 /llms.txt,列出产品说明和中英文主要页面 - 侧栏和页脚加入对比页 /guide/compare(页面内容来自 voltip) - Cloudflare Web Analytics 的 beacon 由仓库变量 VOLTIP_CF_BEACON_TOKEN 控制, 未设置时不加载任何脚本
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动(voltip.firlab.app)
config/shared.ts的transformHead按每个页面自己的标题和描述生成og:title、og:description、og:url、og:locale、twitter:title、twitter:description(此前线上只有站点级的 og:image)。SoftwareApplicationJSON-LD:名称、描述、operatingSystem: "Windows, macOS, Linux, Android"、applicationCategory: UtilitiesApplication、offers价格 0、license(AGPL-3.0-or-later)、downloadUrl(GitHub releases)、softwareVersion。版本号在构建时从src/i18n/versions.ts读取(按文本读取,避免 Vite 去解析根目录的 tsconfig);sync-versions.yml在 Voltip 版本变化时额外触发deploy-voltip.yml,deploy-voltip.yml的 paths 也加入了该文件。/llms.txt:产品说明和中英文主要页面的链接。/guide/compare(页面内容在 sunerpy/voltip 的配套 PR 里)。中英文站点默认描述加上 Android 和离线识别。VOLTIP_CF_BEACON_TOKEN时加入每个页面的 head;默认为空,不加载任何脚本;格式不对(不是 32 位十六进制)时构建失败。README 写明两种开启方式,只能选一种。需要仓库所有者操作
现有的 Cloudflare 令牌没有 Web Analytics 权限(
/accounts/<id>/rum/site_info/list返回 403),无法用 API 创建站点。二选一:voltip-docs→ Metrics → Web Analytics 下的 Enable。下一次部署起 Cloudflare 自动注入 beacon,不需要设置变量。voltip.firlab.app→ 选 JavaScript snippet,复制data-cf-beacon里的 token,然后:合并顺序
先合并 sunerpy/voltip#252(publish-site 会把对比页同步过来),再合并本 PR。
验证
pnpm build通过;生成的 HTML 中每页都有新标签,两个首页的 JSON-LD 能被json.loads解析(softwareVersion 0.3.1),dist/llms.txt已输出。