1bd94c5f7a
This reverts commit 3510227568
.
revert changes
18 lines
804 B
HTML
18 lines
804 B
HTML
{{ if .Site.Params.highlightjs }}
|
|
{{ if or (not (isset .Params "highlight")) (.Params.highlight) }}
|
|
{{ $hl := newScratch }}
|
|
{{ $hl.Set "languages" (union (.Site.Params.highlightjslanguages) (.Params.highlightjslanguages)) }}
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
|
{{ with $hl.Get "languages" }}
|
|
{{ range . }}
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
<script type="text/javascript">
|
|
hljs.configure({languages: []});
|
|
hljs.initHighlightingOnLoad();
|
|
</script>
|
|
{{ $hl.Delete "languages" }}
|
|
{{ end }}
|
|
{{ end }}
|