aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2018-07-10 00:49:20 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2018-07-10 00:49:20 +0800
commit77101032aa61cad251fbe02476aa6d1e0df24d74 (patch)
treefeb8cab7c855d92ddc5c9fd383a0608da97f739e /layouts
parent85290e5c12c5331bfa43481a73395c6f38b9d845 (diff)
feat(highlight): add support for chroma
BREAKING CHANGE: You need add params to enable `chroma` or `highlight.js` since they are disabled by default.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/scripts.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index fb6285b..a89ad89 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -1,5 +1,9 @@
-<!-- js -->
-<script src="{{ "lib/highlight/highlight.pack.js?v=20171001" | relURL }}"></script>
+<!-- highlight.js -->
+{{- if .Site.Params.highlightInClient -}}
+ <script src="{{ "lib/highlight/highlight.pack.js?v=20171001" | relURL }}"></script>
+{{- end -}}
+
+<!-- core -->
{{- if .Site.Params.publicCDN.enable }}
{{ .Site.Params.publicCDN.jquery | safeHTML }}
{{ .Site.Params.publicCDN.slideout | safeHTML }}