fix: fix script CORS error (#246)

This commit is contained in:
Dillon 2020-04-22 01:00:51 +08:00 committed by GitHub
parent a5d0b9a3eb
commit a0ab272f7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 33 deletions

View file

@ -12,7 +12,7 @@
{{- /* iconfont */ -}} {{- /* iconfont */ -}}
{{- if (.Scratch.Get "this").iconfont -}} {{- if (.Scratch.Get "this").iconfont -}}
{{- with $cdn.iconfontCSS -}} {{- with $cdn.iconfontCSS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/iconfont/iconfont.css" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/iconfont/iconfont.css" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}} {{- end -}}
@ -20,7 +20,7 @@
{{- /* Smooth Scroll */ -}} {{- /* Smooth Scroll */ -}}
{{- with $cdn.smoothScrollJS -}} {{- with $cdn.smoothScrollJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/smooth-scroll/smooth-scroll.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/smooth-scroll/smooth-scroll.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -28,7 +28,7 @@
{{- /* Search */ -}} {{- /* Search */ -}}
{{- if .Site.Params.search.enable -}} {{- if .Site.Params.search.enable -}}
{{- with $cdn.autocompleteJS -}} {{- with $cdn.autocompleteJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/autocomplete/autocomplete.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/autocomplete/autocomplete.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -38,7 +38,7 @@
{{- $searchConfig = dict "type" "lunr" "lunrIndexURL" .RelPermalink | merge $searchConfig -}} {{- $searchConfig = dict "type" "lunr" "lunrIndexURL" .RelPermalink | merge $searchConfig -}}
{{- end -}} {{- end -}}
{{- with $cdn.lunrJS -}} {{- with $cdn.lunrJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/lunr/lunr.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/lunr/lunr.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -52,7 +52,7 @@
{{- end -}} {{- end -}}
{{- else if eq .Site.Params.search.type "algolia" -}} {{- else if eq .Site.Params.search.type "algolia" -}}
{{- with $cdn.algoliasearchJS -}} {{- with $cdn.algoliasearchJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/algoliasearch/algoliasearch-lite.umd.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/algoliasearch/algoliasearch-lite.umd.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -63,7 +63,7 @@
{{- /* lazysizes */ -}} {{- /* lazysizes */ -}}
{{- with $cdn.lazysizesJS -}} {{- with $cdn.lazysizesJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/lazysizes/lazysizes.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/lazysizes/lazysizes.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -71,22 +71,22 @@
{{- /* lightgallery.js */ -}} {{- /* lightgallery.js */ -}}
{{- if $params.lightgallery -}} {{- if $params.lightgallery -}}
{{- with $cdn.lightgalleryCSS -}} {{- with $cdn.lightgalleryCSS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/lightgallery/lightgallery.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/lightgallery/lightgallery.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.lightgalleryJS -}} {{- with $cdn.lightgalleryJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/lightgallery/lightgallery.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/lightgallery/lightgallery.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.lightgalleryThumbnailJS -}} {{- with $cdn.lightgalleryThumbnailJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/lightgallery/lg-thumbnail.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/lightgallery/lg-thumbnail.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.lightgalleryZoomJS -}} {{- with $cdn.lightgalleryZoomJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/lightgallery/lg-zoom.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/lightgallery/lg-zoom.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -97,7 +97,7 @@
{{- /* clipboard.js */ -}} {{- /* clipboard.js */ -}}
{{- if ne $params.copycode false -}} {{- if ne $params.copycode false -}}
{{- with $cdn.clipboardJS -}} {{- with $cdn.clipboardJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/clipboard/clipboard.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/clipboard/clipboard.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -107,7 +107,7 @@
{{- /* Sharer.js */ -}} {{- /* Sharer.js */ -}}
{{- if $params.share.enable -}} {{- if $params.share.enable -}}
{{- with $cdn.sharerJS -}} {{- with $cdn.sharerJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/sharer/sharer.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/sharer/sharer.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -116,7 +116,7 @@
{{- /* TypeIt */ -}} {{- /* TypeIt */ -}}
{{- with (.Scratch.Get "this").typeitMap -}} {{- with (.Scratch.Get "this").typeitMap -}}
{{- with $cdn.typeitJS -}} {{- with $cdn.typeitJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/typeit/typeit.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/typeit/typeit.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -130,36 +130,36 @@
{{- /* KaTeX */ -}} {{- /* KaTeX */ -}}
{{- if $params.math.enable -}} {{- if $params.math.enable -}}
{{- with $cdn.katexCSS -}} {{- with $cdn.katexCSS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/katex/katex.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/katex/katex.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.katexJS -}} {{- with $cdn.katexJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/katex/katex.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/katex/katex.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.katexAutoRenderJS -}} {{- with $cdn.katexAutoRenderJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/katex/auto-render.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/katex/auto-render.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
{{- $math := $params.math -}} {{- $math := $params.math -}}
{{- if $math.copyTex -}} {{- if $math.copyTex -}}
{{- with $cdn.katexCopyTexCSS -}} {{- with $cdn.katexCopyTexCSS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/katex/copy-tex.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/katex/copy-tex.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.katexCopyTexJS -}} {{- with $cdn.katexCopyTexJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/katex/copy-tex.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/katex/copy-tex.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- if $math.mhchem -}} {{- if $math.mhchem -}}
{{- with $cdn.katexMhchemJS -}} {{- with $cdn.katexMhchemJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/katex/mhchem.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/katex/mhchem.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -180,7 +180,7 @@
{{- /* mermaid */ -}} {{- /* mermaid */ -}}
{{- if (.Scratch.Get "this").mermaid -}} {{- if (.Scratch.Get "this").mermaid -}}
{{- with $cdn.mermaidJS -}} {{- with $cdn.mermaidJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/mermaid/mermaid.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/mermaid/mermaid.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -191,12 +191,12 @@
{{- /* ECharts */ -}} {{- /* ECharts */ -}}
{{- if (.Scratch.Get "this").echarts -}} {{- if (.Scratch.Get "this").echarts -}}
{{- with $cdn.echartsJS -}} {{- with $cdn.echartsJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/echarts/echarts.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/echarts/echarts.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.echartsMacaronsJS -}} {{- with $cdn.echartsMacaronsJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/echarts/macarons.js" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/echarts/macarons.js" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -205,12 +205,12 @@
{{- /* Mapbox GL */ -}} {{- /* Mapbox GL */ -}}
{{- if (.Scratch.Get "this").mapbox -}} {{- if (.Scratch.Get "this").mapbox -}}
{{- with $cdn.mapboxGLCSS -}} {{- with $cdn.mapboxGLCSS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/mapbox-gl/mapbox-gl.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.mapboxGLJS -}} {{- with $cdn.mapboxGLJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/mapbox-gl/mapbox-gl.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -222,21 +222,21 @@
{{- if (.Scratch.Get "this").music -}} {{- if (.Scratch.Get "this").music -}}
{{- /* APlayer */ -}} {{- /* APlayer */ -}}
{{- with $cdn.aplayerCSS -}} {{- with $cdn.aplayerCSS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/aplayer/APlayer.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/aplayer/APlayer.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}} {{- end -}}
{{- $options := dict "targetPath" "lib/aplayer/dark.min.css" -}} {{- $options := dict "targetPath" "lib/aplayer/dark.min.css" -}}
{{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- with $cdn.aplayerJS -}} {{- with $cdn.aplayerJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/aplayer/APlayer.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/aplayer/APlayer.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
{{- /* MetingJS */ -}} {{- /* MetingJS */ -}}
{{- with $cdn.metingJS -}} {{- with $cdn.metingJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/meting/Meting.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/meting/Meting.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}

View file

@ -9,7 +9,7 @@
{{- if $comment.disqus.enable -}} {{- if $comment.disqus.enable -}}
<div id="disqus_thread" class="comment"></div> <div id="disqus_thread" class="comment"></div>
{{- $source := printf "https://%s.disqus.com/embed.js" $comment.disqus.shortname -}} {{- $source := printf "https://%s.disqus.com/embed.js" $comment.disqus.shortname -}}
{{- dict "source" $source "defer" true "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" $source "defer" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
<noscript> <noscript>
Please enable JavaScript to view the comments powered by <a href="https://disqus.com/?ref_noscript">Disqus</a>. Please enable JavaScript to view the comments powered by <a href="https://disqus.com/?ref_noscript">Disqus</a>.
</noscript> </noscript>
@ -19,12 +19,12 @@
{{- if $comment.gitalk.enable -}} {{- if $comment.gitalk.enable -}}
<div id="gitalk" class="comment"></div> <div id="gitalk" class="comment"></div>
{{- with $cdn.gitalkCSS -}} {{- with $cdn.gitalkCSS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/gitalk/gitalk.css" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/gitalk/gitalk.css" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}} {{- end -}}
{{- with $cdn.gitalkJS -}} {{- with $cdn.gitalkJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/gitalk/gitalk.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/gitalk/gitalk.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -40,7 +40,7 @@
{{- $options := dict "targetPath" "lib/valine/valine.min.css" -}} {{- $options := dict "targetPath" "lib/valine/valine.min.css" -}}
{{- dict "source" "lib/valine/valine.scss" "toCSS" $options | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}} {{- dict "source" "lib/valine/valine.scss" "toCSS" $options | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- with $cdn.valineJS -}} {{- with $cdn.valineJS -}}
{{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" . | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}} {{- else -}}
{{- dict "source" "lib/valine/Valine.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "lib/valine/Valine.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}} {{- end -}}
@ -69,7 +69,7 @@
data-numposts="{{ $comment.facebook.numPosts }}" data-numposts="{{ $comment.facebook.numPosts }}"
></div> ></div>
{{- $source := printf "https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" ($comment.facebook.languageCode | default (T "facebookLanguageCode")) $comment.facebook.appId -}} {{- $source := printf "https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" ($comment.facebook.languageCode | default (T "facebookLanguageCode")) $comment.facebook.appId -}}
{{- dict "source" $source "defer" true "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" $source "defer" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
<noscript> <noscript>
Please enable JavaScript to view the comments powered by <a href="https://developers.facebook.com/docs/plugins/comments/"></a>Facebook</a>. Please enable JavaScript to view the comments powered by <a href="https://developers.facebook.com/docs/plugins/comments/"></a>Facebook</a>.
</noscript> </noscript>
@ -95,7 +95,7 @@
{{- if $comment.telegram.outlined -}} {{- if $comment.telegram.outlined -}}
{{- $attr = printf `%s data-outlined="1"` $attr -}} {{- $attr = printf `%s data-outlined="1"` $attr -}}
{{- end -}} {{- end -}}
{{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "crossorigin" true "attr" $attr | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}} {{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "attr" $attr | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
<noscript> <noscript>
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>. Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
</noscript> </noscript>