Splits comment and highlight parts

This commit is contained in:
Huy Tran 2018-05-31 09:29:05 +10:00
parent 0ae1bd79fa
commit 96d52eb14a
3 changed files with 11 additions and 10 deletions

View file

@ -7,5 +7,6 @@
{{- end -}}
{{ define "footer" -}}
{{ partial "highlight.html" . }}
{{ partial "commenting.html" . }}
{{- end -}}

View file

@ -1,13 +1,3 @@
{{ if .Site.Params.highlightjs -}}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
{{ range .Site.Params.highlightjslanguages }}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
{{ end }}
<script type="text/javascript">
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
</script>
{{- end }}
<!-- Disqus-->
{{ if .Site.DisqusShortname -}}
{{ if ne .Params.showcomments false }}

View file

@ -0,0 +1,10 @@
{{ if .Site.Params.highlightjs -}}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
{{ range .Site.Params.highlightjslanguages }}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
{{ end }}
<script type="text/javascript">
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
</script>
{{- end }}