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:
parent
21461b8257
commit
de52bb63ed
1 changed files with 2 additions and 0 deletions
|
|
@ -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" . }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue