Splits comment and highlight parts
This commit is contained in:
parent
0ae1bd79fa
commit
96d52eb14a
3 changed files with 11 additions and 10 deletions
|
@ -7,5 +7,6 @@
|
|||
{{- end -}}
|
||||
|
||||
{{ define "footer" -}}
|
||||
{{ partial "highlight.html" . }}
|
||||
{{ partial "commenting.html" . }}
|
||||
{{- end -}}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
10
layouts/partials/highlight.html
Normal file
10
layouts/partials/highlight.html
Normal 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 }}
|
Loading…
Reference in a new issue