Skip to content

Commit

Permalink
feat(comment): 允许在waline关闭的情况下启用浏览量统计
Browse files Browse the repository at this point in the history
  • Loading branch information
zkz098 committed Feb 24, 2023
1 parent 32e8cf5 commit 8f9359e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions layout/_partials/post/footer.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ div(class="meta")
!= __('post.edited')
time(title=__('post.modified') + __('symbol.colon') + full_date(post.updated) itemprop="dateModified" datetime=moment(post.updated).format())
!= date(post.updated)
if theme.waline.pageview && !theme.waline.enable
script(type = "module" data-pjax).
import { pageviewCount } from 'https://unpkg.com/@waline/client/dist/pageview.mjs';

const path = document.getElementById("twikoo_visitors").getAttribute("data-path");
pageviewCount({
serverURL: '#{theme.waline.serverURL}',
path: path,
});

!= shokax_inject('postMeta')
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-shokax",
"version": "0.1.8",
"version": "0.1.9",
"description": "a hexo theme based on shoka",
"main": "index.js",
"repository": "https://github.com/zkz098/hexo-theme-shokaX",
Expand Down

1 comment on commit 8f9359e

@vercel
Copy link

@vercel vercel bot commented on 8f9359e Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.