Merge pull request #28 from gamingrobot/fix-highlightjs
Fixed highlight flag
This commit is contained in:
commit
600b75fb4a
2 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
|||
{{ if .Site.Params.highlightjs }}
|
||||
{{ if or (not (isset .Params "highlight")) (.Params.highlight) }}
|
||||
<!-- highlightjs -->
|
||||
<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 }}
|
||||
{{ if .Site.Params.PygmentsUseClasses }}
|
||||
<!-- Pygments Syntax -->
|
||||
+<link rel="stylesheet" href="{{ "css/syntax.min.css" | relURL }}">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ if .Site.Params.highlightjs }}
|
||||
{{ if or (not (isset .Params "highlight")) (not .Params.highlight) }}
|
||||
{{ 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>
|
||||
|
|
Loading…
Reference in a new issue