Fixed highlight flag, included css in flag
This commit is contained in:
parent
a2dd872c92
commit
14b08ffd18
2 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
||||||
{{ if .Site.Params.highlightjs }}
|
{{ if .Site.Params.highlightjs }}
|
||||||
|
{{ 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/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ if .Site.Params.PygmentsUseClasses }}
|
{{ if .Site.Params.PygmentsUseClasses }}
|
||||||
<!-- Pygments Syntax -->
|
<!-- Pygments Syntax -->
|
||||||
+<link rel="stylesheet" href="{{ "css/syntax.min.css" | relURL }}">
|
+<link rel="stylesheet" href="{{ "css/syntax.min.css" | relURL }}">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ if .Site.Params.highlightjs }}
|
{{ if .Site.Params.highlightjs }}
|
||||||
{{ if or (not (isset .Params "highlight")) (not .Params.highlight) }}
|
{{ if or (not (isset .Params "highlight")) (.Params.highlight) }}
|
||||||
{{ $hl := newScratch }}
|
{{ $hl := newScratch }}
|
||||||
{{ $hl.Set "languages" (union (.Site.Params.highlightjslanguages) (.Params.highlightjslanguages)) }}
|
{{ $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>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||||
|
|
Loading…
Reference in a new issue