Skip to content

Commit

Permalink
⚡ Perf(ignore): remove busuanzi.core and add busuanzi.source (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Jul 30, 2024
1 parent ed2f5f6 commit bde541e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ enableEmoji = true
[params.busuanzi]
# whether to enable busuanzi count
enable = false
# busuanzi count core ["vercount", "busuanzi"], default: "vercount"
core = "vercount"
# busuanzi count core script source. Default is https://vercount.one/js
source = "https://vercount.one/js"
# whether to show the site views
siteViews = true
# whether to show the page views
Expand Down
8 changes: 1 addition & 7 deletions layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,7 @@

{{- /* 不蒜子 */ -}}
{{- if .Site.Params.busuanzi.enable | and hugo.IsProduction -}}
{{- $source := "https://vercount.one/js" -}}
{{- if eq .Lang "zh-cn" -}}
{{- $source = "https://cn.vercount.one/js" -}}
{{- end -}}
{{- if eq .Site.Params.busuanzi.core "busuanzi" -}}
{{- $source = "//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" -}}
{{- end -}}
{{- $source := .Site.Params.busuanzi.source | default "https://vercount.one/js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}

Expand Down

0 comments on commit bde541e

Please sign in to comment.