New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 更新当前的浏览量逻辑 #826
Labels
enhancement
New feature or request
Comments
cc @qwqcode need review |
Any update on this one? |
qwqcode
added a commit
that referenced
this issue
May 22, 2024
BREAKING CHANGE: Modified statistics UI component. Default selectors for `pvEl` and `countEl` have changed from `#ArtalkPV` and `#ArtalkCount` to `.artalk-pv-count` and `.artalk-comment-count` (See #826).
qwqcode
added a commit
that referenced
this issue
May 22, 2024
BREAKING CHANGE: Modified statistics UI component. Default selectors for `pvEl` and `countEl` have changed from `#ArtalkPV` and `#ArtalkCount` to `.artalk-pv-count` and `.artalk-comment-count` (See #826).
qwqcode
added a commit
that referenced
this issue
May 23, 2024
#880) The statistics UI component has been updated. The default selectors for `pvEl` and `countEl` have changed from `#ArtalkPV` and `#ArtalkCount` to `.artalk-pv-count` and `.artalk-comment-count` (see #826 for more details). However, it remains backward compatible with the `#ArtalkPV` and `#ArtalkCount` elements for older versions, no HTML client updates are necessary. In this PR, we also introduced a configuration option called `statPageKeyAttr` (value `"data-page-key"` by default) for customizing the attribute name that the statistics component uses to fetch the page key.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
原则上,ID 应该是全局唯一的,因此 Artalk 不应该使用 ID 选择器作为默认的浏览量选择器,因为博客的文章列表显然会出现多个浏览量元素。
建议选择一个类名,如
.artalk-pageview-count
。另外,建议增加能够定制 dataset 名称的选项,当前的
data-page-key
大概率没有其他评论服务使用,其他服务名称使用data-path
或data-url
更加自然。为提供更好兼容性,建议允许配置 artalk 自由读取给定的属性作为页面 Key。The text was updated successfully, but these errors were encountered: