diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-12 23:59:08 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-12 23:59:08 +0800 |
commit | 5fb5a658e8ec8f26c4cb67bc306d1827b781962c (patch) | |
tree | 3169aaebffb47ab817966a2b07da890855d268fc /layouts/partials/scripts.html | |
parent | 8e36a302cec6df297c00be4555ea0a6d8bd20114 (diff) |
feat: config public cdn
deprecated bootcdn param
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r-- | layouts/partials/scripts.html | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 72bc938..5e1c637 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,10 +1,14 @@ <!-- js --> <script src="{{ "lib/highlight/highlight.pack.js" | relURL }}"></script> {{ if .Site.Params.bootcdn -}} - <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> - <script type="text/javascript" src="https://cdn.bootcss.com/slideout/1.0.1/slideout.min.js"></script> - {{ if .Site.Params.fancybox }}<script type="text/javascript" src="https://cdn.bootcss.com/fancybox/3.1.20/jquery.fancybox.min.js"></script>{{ end }} -{{ else -}} + <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js" crossorigin="anonymous"></script> + <script type="text/javascript" src="https://cdn.bootcss.com/slideout/1.0.1/slideout.min.js" crossorigin="anonymous"></script> + {{ if .Site.Params.fancybox }}<script type="text/javascript" src="https://cdn.bootcss.com/fancybox/3.1.20/jquery.fancybox.min.js" crossorigin="anonymous"></script>{{ end }} +{{- else if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.jquery | safeHTML }} + {{ .Site.Params.publicCDN.slideout | safeHTML }} + {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJs | safeHTML }}{{ end }} +{{- else -}} <script type="text/javascript" src="{{ "lib/jquery/jquery-3.2.1.min.js" | relURL }}"></script> <script type="text/javascript" src="{{ "lib/slideout/slideout-1.0.1.min.js" | relURL }}"></script> {{ if .Site.Params.fancybox }}<script type="text/javascript" src="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.js" | relURL }}"></script>{{ end }} |