Only load cse.js if google cse is configured

Previously if gcse wasn't configured, the footer would attempt and fail
to load cse.js with an invalid gcse ID
This commit is contained in:
Michael Romero 2017-03-27 20:27:18 -07:00
commit de52bb63ed

View file

@ -206,6 +206,7 @@
<script> hljs.initHighlightingOnLoad(); </script>
<script> renderMathInElement(document.body); </script>
<!-- Google Custom Search Engine -->
{{ if .Site.Params.gcse }}
<script>
(function() {
var cx = '{{ .Site.Params.gcse }}';
@ -217,5 +218,6 @@
s.parentNode.insertBefore(gcse, s);
})();
</script>
{{ end }}
{{ template "_internal/google_analytics.html" . }}