Perf(ignore): remove busuanzi.core and add busuanzi.source (#472)

This commit is contained in:
Cell
2024-07-30 15:15:59 +08:00
parent ed2f5f6d10
commit 9109ef22e2
2 changed files with 4 additions and 10 deletions
+2 -2
View File
@@ -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
+2 -8
View File
@@ -211,14 +211,8 @@
{{- /* 不蒜子 */ -}}
{{- 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 -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $source := .Site.Params.busuanzi.source | default "https://vercount.one/js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Async" true "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* Site creation time */ -}}