Upgrade highlightjs
This commit is contained in:
parent
14b387e666
commit
58d10c23ed
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
{{ if .Site.Params.highlightjs }}
|
{{ if .Site.Params.highlightjs }}
|
||||||
{{ if or (not (isset .Params "highlight")) (.Params.highlight) }}
|
{{ if or (not (isset .Params "highlight")) (.Params.highlight) }}
|
||||||
<!-- highlightjs -->
|
<!-- highlightjs -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Site.Params.PygmentsUseClasses }}
|
{{ if .Site.Params.PygmentsUseClasses }}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{{- if (.Site.Params.highlightjs) -}}
|
{{- if (.Site.Params.highlightjs) -}}
|
||||||
{{ if (or (not (isset .Params "highlight")) (and (isset .Params "highlight") .Params.highlight)) }}
|
{{ if (or (not (isset .Params "highlight")) (and (isset .Params "highlight") .Params.highlight)) }}
|
||||||
{{ $.Scratch.Set "hl_languages" (union (.Site.Params.highlightjslanguages) (.Params.highlightjslanguages)) }}
|
{{ $.Scratch.Set "hl_languages" (union (.Site.Params.highlightjslanguages) (.Params.highlightjslanguages)) }}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/highlight.min.js"></script>
|
||||||
{{ with $.Scratch.Get "hl_languages" }}
|
{{ with $.Scratch.Get "hl_languages" }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/{{.}}.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/languages/{{.}}.min.js"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
Loading…
Reference in a new issue