Fixing hightlight-js embedding error 'hljs is not defined' when highlightjs is not configured in hugo
This commit is contained in:
parent
3520ff123d
commit
5046967a61
1 changed files with 6 additions and 6 deletions
|
@ -7,12 +7,12 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/{{.}}.min.js"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<script type="text/javascript">
|
||||
{{ with $.Scratch.Get "hl_languages" }}
|
||||
hljs.configure({languages: [{{(delimit . ", ")}}]});
|
||||
{{ end }}
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
{{ end }}
|
||||
<script type="text/javascript">
|
||||
{{ with $.Scratch.Get "hl_languages" }}
|
||||
hljs.configure({languages: [{{(delimit . ", ")}}]});
|
||||
{{ end }}
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
{{ $.Scratch.Delete "hl_languages" }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue