mirror of https://github.com/halo-dev/halo
![]() #### What type of PR is this? /kind bug /area core /milestone 2.9.x #### What this PR does / why we need it: 修复评论启用状态的主题模板变量名作用域不正确的问题 评论组件标签处理器只会在处理到 `<halo:comment/>` 自定义标签时被执行,而 haloCommentEnabled 状态是评论标签之前使用的那么此时值还没有被评论标签处理器填充所以取不到正确的值,目前的做法是在模板开始解析时填充 haloCommentEnabled 变量到 context,但这样存在的问题时无法判断页面是否使用了评论自定义标签即每个页面都会有这个变量,不过目前没有更好的办法去解决这样的问题。 how to test it? 在模板页面的任意位置使用 `${haloCommentEnabled}` 都能取到正确的值。 #### Which issue(s) this PR fixes: Fixes #4378 #### Does this PR introduce a user-facing change? ```release-note 修复评论启用状态的主题模板变量名作用域不正确的问题 ``` |
||
---|---|---|
.. | ||
src | ||
build.gradle |