feat(page): add custom page library support (css and js) (#357)

This commit is contained in:
Dillon
2020-05-13 22:12:51 +08:00
committed by GitHub
parent 861350be32
commit 486d859cc8
8 changed files with 93 additions and 0 deletions

View File

@@ -176,6 +176,14 @@
{{- $config = $cookieconsentConfig | dict "cookieconsent" | merge $config -}}
{{- end -}}
{{- range $params.library.css -}}
{{- dict "source" . "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
{{- range $params.library.js -}}
{{- dict "source" . "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* Theme script */ -}}
{{- dict "source" "js/theme.min.js" "fingerprint" $fingerprint | dict "scratch" .Scratch "data" | partial "scratch/script.html" -}}
{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}}