diff options
author | Aos <aosdab@gmail.com> | 2018-01-24 20:52:44 +0300 |
---|---|---|
committer | Aos <aosdab@gmail.com> | 2018-01-24 20:52:44 +0300 |
commit | ba648928a9c7e6c334d05f7e6df885194f1caa1f (patch) | |
tree | 879584f0b23c4c0b5c665011880fbdbeb671fbac | |
parent | 00c0e2813bbb5c427427c43fb72907af4733f53d (diff) |
* Fixed pulling in additional languages for syntax highlighting,
* Clarified instructions on how to pull additional languages in config
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | exampleSite/config.toml | 8 | ||||
-rwxr-xr-x | layouts/partials/footer.html | 2 |
3 files changed, 14 insertions, 6 deletions
@@ -55,9 +55,15 @@ copyright = "(c) 2008 - 2014" [params] # Enables syntax highlighting highlight = true + # Supports highlighting for languages not included in the original pack - # See https://highlightjs.org/download/ - hjslangs = [go, elixir] + # See https://highlightjs.org/download/ for what's included in original pack + # For reference to all languages, see: + # https://github.com/isagalaev/highlight.js/tree/master/src/languages + hjslangs = ["go", "vim"] + + # Enables the topmenu, which pulls from categories + topmenu = "categories" # Builds a list page for each category given [taxonomies] diff --git a/exampleSite/config.toml b/exampleSite/config.toml index faa0ad6..3c1535a 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -2,14 +2,16 @@ baseURL = "https://example.com/" title = "Temple" theme = "temple" # If not set, it will not appear. Otherwise it will show below your footer links -copyright = "(c) You -- 2017" +copyright = "(c) 2017 - 2018 Aos Dabbagh -- All rights reserved." [params] # Enables syntax highlighting highlight = true # Supports highlighting for languages not included in the original pack - # See https://highlightjs.org/download/ - hjslangs = ["go", "elixir"] + # See https://highlightjs.org/download/ for original pack + # For reference to all languages, see: + # https://github.com/isagalaev/highlight.js/tree/master/src/languages + hjslangs = ["go", "vim"] # Enables the topmenu, which pulls from categories topmenu = "categories" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 22404e9..f2978f0 100755 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -42,7 +42,7 @@ {{ if isset .Site.Params "highlight" }} <script src="{{ .Site.BaseURL }}highlight/highlight.min.js"></script> {{ range .Site.Params.hjslangs }} - <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{ . }}.min.js"></script> + <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script> {{ end }} <script>hljs.initHighlighting();</script> {{ end }} |