feat(simple): add site traffic stats to header and footer - #4469
Merged
tangly1024 merged 2 commits intoAug 29, 2026
Conversation
|
@ZZHow1024 is attempting to deploy a commit to the tangly1024's projects Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for notionnext-netlify ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
tangly1024
approved these changes
Aug 29, 2026
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.
Resolves #2958
已知问题
Simple 主题目前缺少站点访问统计展示
ANALYTICS_BUSUANZI_ENABLE后,Simple 主题 Header 和 Footer 未展示站点访问量、访客数解决方案
在 Simple 主题 Header 中增加站点访问统计
ANALYTICS_BUSUANZI_ENABLE配置控制是否展示site_pv和site_uv数据访问量 xxx · 访客数 xxx在 Simple 主题 Footer 中增加站点访问统计
AnalyticsBusuanziANALYTICS_BUSUANZI_ENABLE配置控制是否展示保持改动范围最小
components/AnalyticsBusuanzi.js改动收益
完善 Simple 主题的站点统计展示
AnalyticsBusuanzi的位置保持一致复用现有配置和组件
ANALYTICS_BUSUANZI_ENABLE控制 Busuanzi 的启用状态保持统计口径一致
site_pv/site_uvpage_pv与站点总访问量混用具体改动
themes/simple/components/Header.jsANALYTICS_BUSUANZI_ENABLE配置busuanzi_value_site_pv和busuanzi_value_site_uv访问量 xxx · 访客数 xxxthemes/simple/components/Footer.jsAnalyticsBusuanzi公共组件ANALYTICS_BUSUANZI_ENABLE配置docs/user-guide/themes/simple.mdANALYTICS_BUSUANZI_ENABLE后的展示效果site_pv和site_uv数据效果截图
ANALYTICS_BUSUANZI_ENABLE = trueHeader
Footer
ANALYTICS_BUSUANZI_ENABLE = falseHeader
Footer
测试确认
ANALYTICS_BUSUANZI_ENABLE = true时 Header 正常显示访问量和访客数ANALYTICS_BUSUANZI_ENABLE = true时 Footer 正常显示访问量和访客数ANALYTICS_BUSUANZI_ENABLE = false时 Header 不显示访问统计ANALYTICS_BUSUANZI_ENABLE = false时 Footer 不显示访问统计site_pv/site_uv数据保持一致用户文档(
docs/user-guide//docs/developer/)如果本 PR 新增或修改了站长会使用的功能、主题配置、环境变量、Notion Config 键、插件开关、部署步骤、默认行为或可见 UI 交互,请同步更新
docs/user-guide/或docs/developer/中对应说明,并在下方勾选已完成项。只有纯内部重构、测试、CI、依赖维护、拼写修正等不改变站长使用方式的改动,才可以勾选「不适用」。
docs/user-guide/目录约定conf/*.config.js一致(若文档涉及配置).env、私有 ID文档说明(可选):本次改动复用已有
ANALYTICS_BUSUANZI_ENABLE配置,不新增环境变量、主题配置或 Notion Config 键。