💄 Support more of analytics engine such as baidu, google, busuanzi and so on, then add new web information widget. close #19

This commit is contained in:
凡梦星尘
2022-09-11 18:33:41 +08:00
parent c38a439171
commit 2a7fd9f8fb
21 changed files with 197 additions and 86 deletions

View File

@@ -2,19 +2,10 @@
{{- $cssRes := .Site.Data.resources.css }}
{{- $vendor := .Site.Params.vendors.plugins }}
{{- $router := .Scratch.Get "router" }}
{{ $cssFmt := "%s/%s@%s/%s" }}
{{- range $css := $cssRes }}
{{- $npm := $css.name }}
{{- $file := $css.file }}
{{- if eq $vendor "cdnjs" }}
{{- with $css.alias }}
{{- $npm = . }}
{{- end }}
{{- $file = replaceRE `(dist|lib|source\/js)\/` "" $css.file }}
{{- $cssFmt = "%s/%s/%s/%s" }}
{{- end }}
{{- $pluginCSS := printf $cssFmt $router $npm $css.version $file }}
<link type="text/css" rel="stylesheet" href="{{ $pluginCSS }}" />
{{ $pluginCss := partial "_funs/get_res.html" (dict "res" . "vendor" $vendor "router" $router) }}
<link type="text/css" rel="stylesheet" href="{{ $pluginCss }}" />
{{- end }}
<!-- Main Style file -->