Merge pull request #28 from gamingrobot/fix-highlightjs

Fixed highlight flag
This commit is contained in:
Huy Tran 2018-08-15 10:52:46 +07:00 committed by GitHub
commit 600b75fb4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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 }}">

View file

@ -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>