tpl/tmplimpl: Add MIME type to embedded JS

So they get minified correctly.

See #5042
This commit is contained in:
Bjørn Erik Pedersen
2018-08-06 23:11:12 +02:00
parent fb3cb05cc3
commit 755d1ffe7a
5 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
{{- $pc := .Page.Site.Config.Privacy.Disqus -}}
{{- if not $pc.Disable -}}
{{ if .Site.DisqusShortname }}<div id="disqus_thread"></div>
<script>
<script type="application/javascript">
var disqus_config = function () {
{{with .GetParam "disqus_identifier" }}this.page.identifier = '{{ . }}';{{end}}
{{with .GetParam "disqus_title" }}this.page.title = '{{ . }}';{{end}}

View File

@@ -1,7 +1,7 @@
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
{{- if not $pc.Disable -}}
{{ with .Site.GoogleAnalytics }}
<script>
<script type="application/javascript">
{{ template "__ga_js_set_doNotTrack" $ }}
if (!doNotTrack) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

View File

@@ -1,7 +1,7 @@
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
{{- if not $pc.Disable -}}
{{ with .Site.GoogleAnalytics }}
<script>
<script type="application/javascript">
{{ template "__ga_js_set_doNotTrack" $ }}
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;

View File

@@ -1 +1 @@
<script src="//gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{if len .Params | eq 3 }}?file={{ index .Params 2 }}{{end}}"></script>
<script type="application/javascript" src="//gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{if len .Params | eq 3 }}?file={{ index .Params 2 }}{{end}}"></script>