Go to file
Golden Supreme Salted Fish 79226998d3
refactor: exclude post preview page from data tracking (#7582)
What type of PR is this?  
/kind bug  
/area core  
/milestone 2.21.x

What this PR does / why we need it:  
Prevents published post view counts from being incorrectly increased when previewing posts in the admin panel.

Previously, the preview mode would load the tracking script, which resulted in inflated view counts. This PR adds a condition to detect preview mode and disables the tracking logic to avoid counting views for unpublished content.

Does this PR introduce user-facing changes?
```release-note
文章预览页面不再统计访问数据
```
2025-07-04 04:33:41 +00:00
.devcontainer Add devcontainer support (#6252) 2024-07-10 10:21:25 +00:00
.github chore: bump pnpm version to 10 (#7597) 2025-06-27 07:29:24 +00:00
api Reduce application size by removing unused JPA dependency (#7549) 2025-06-13 11:44:43 +00:00
api-docs/openapi/v3_0 Provide storage policy config APIs to make it easy to use (#7527) 2025-06-09 23:24:30 +08:00
application refactor: exclude post preview page from data tracking (#7582) 2025-07-04 04:33:41 +00:00
buildSrc Migrate maven publish with publishing by using the Portal Publisher API 2025-05-29 11:44:26 +08:00
config/checkstyle chore: add checkstyle rule (#2091) 2022-05-17 06:46:11 +00:00
docs Add before and after security web filters (#6297) 2024-07-09 14:05:24 +00:00
e2e Refine setup page 2024-10-09 12:20:54 +08:00
gradle Upgrade dependencies (#7596) 2025-06-27 15:45:42 +08:00
hack chore: add cherry_pick_pull.sh for cherry-picking pull request (#1554) 2021-12-03 10:21:24 +08:00
platform Refactor dependencies and plugins with version catelog 2025-05-19 16:05:56 +08:00
ui fix: prevent code input content from being obscured in fullscreen mode (#7599) 2025-07-04 04:31:41 +00:00
.dockerignore chore: rename console to ui in some files (#5347) 2024-02-07 14:40:08 +00:00
.editorconfig Support backup and restore (#4206) 2023-07-24 08:26:16 +00:00
.gitignore test: add e2e test cases of user, role, and plugin (#4920) 2023-11-28 21:52:44 +08:00
.gitpod.yml test: add e2e test cases of user, role, and plugin (#4920) 2023-11-28 21:52:44 +08:00
CODE_OF_CONDUCT.md docs: add CODE_OF_CONDUCT.md (#2150) 2022-06-12 08:10:12 +00:00
CONTRIBUTING.md docs: update the branch name from `master` to `main` in contribution.md (#5359) 2024-02-17 08:00:15 +00:00
Dockerfile Enable Virtual Thread when running on JVM 21 (#7261) 2025-03-05 02:32:57 +00:00
LICENSE Create LICENSE 2018-03-21 21:39:46 +08:00
OWNERS chore: add LIlGG as a approver (#6795) 2024-10-08 18:25:22 +08:00
README.md docs: add a suggestion for using 1Panel in README.md (#7226) 2025-02-12 14:48:19 +00:00
SECURITY.md Mark the security policy for version 1.x as unsupported (#5450) 2024-03-06 06:06:07 +00:00
gradle.properties Upgrade dependencies (#7596) 2025-06-27 15:45:42 +08:00
gradlew Upgrade to Gradle 8.14 (#7450) 2025-05-20 10:06:23 +08:00
gradlew.bat Upgrade to Gradle 8.14 (#7450) 2025-05-20 10:06:23 +08:00
settings.gradle Remove deprecation warnings from Gradle (#7468) 2025-05-23 16:08:38 +08:00

README.md

Halo logo

Halo [ˈheɪloʊ],强大易用的开源建站工具。

GitHub release Docker pulls GitHub last commit GitHub Workflow Status Codecov percentage Halo - Powerful and easy-to-use Open-Source website building tool | Product Hunt
官网 文档 社区 Gitee Telegram 频道

Watch the video


快速开始

如果你的设备有 Docker 环境,可以使用以下命令快速启动一个 Halo 的体验环境:

docker run -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 halohub/halo:2.20

或者点击下方按钮使用 Gitpod 启动一个体验环境:

Open in Gitpod

以上方式仅作为体验使用,推荐使用开源 Linux 服务器运维管理面板 1Panel 进行部署(查看文档轻松搞定反向代理、SSL 证书及升级备份任务。更多部署方式,请查看文档

在线体验

专业版

相比于社区版Halo 专业版为用户提供了大量增强功能及技术支持服务增强功能包括短信验证码注册登录、全站私有化、LDAP 登录、三方账号登录及自定义 LOGO 等。 点击查看专业版详细介绍

生态

可访问 官方应用市场awesome-halo 仓库 查看适用于 Halo 2.x 的主题和插件。

许可证

license

Halo 使用 GPL-v3.0 协议开源,请遵守开源协议。

赞助

如果 Halo 对你有帮助,欢迎赞助我们,感谢以下赞助者对 Halo 项目的支持:

sponsors

贡献

参考 CONTRIBUTING

状态

Repobeats analytics