mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⚡ Perf(ignore): remove busuanzi.core and add busuanzi.source (#472)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */ -}}
|
||||
|
||||
Reference in New Issue
Block a user