Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yoshiharuyamashita/blackburn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael T Lombardi <michael.t.lombardi@outlook.com>2017-07-08 17:51:45 +0300
committerMichael T Lombardi <michael.t.lombardi@outlook.com>2017-07-08 17:51:45 +0300
commit1d2493ec1e33a8c77925277c15da0af8eadbfecc (patch)
tree6db141c00f0746363f8ad61a21d42b6e17442358 /layouts
parentb6ad9ef8d81a915e1e511764adf7db2d610e44f8 (diff)
Add option for additional highlightjs languages
Existing implementation only pulls the highlightjs common languages. The additional option in the config allows users to specify an array of languages to add highlighting support for.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/head.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 426da77..04c34bb 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -40,6 +40,9 @@
{{ with .Site.Params.highlightjs }}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ . }}.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
+ {{ range $.Site.Params.highlightjs_extra_languages }}
+ <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{ . }}.min.js"></script>
+ {{ end }}
<script>hljs.initHighlightingOnLoad();</script>
{{ end }}