diff options
author | Michael T Lombardi <michael.t.lombardi@outlook.com> | 2017-07-08 17:51:45 +0300 |
---|---|---|
committer | Michael T Lombardi <michael.t.lombardi@outlook.com> | 2017-07-08 17:51:45 +0300 |
commit | 1d2493ec1e33a8c77925277c15da0af8eadbfecc (patch) | |
tree | 6db141c00f0746363f8ad61a21d42b6e17442358 /layouts | |
parent | b6ad9ef8d81a915e1e511764adf7db2d610e44f8 (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.html | 3 |
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 }} |