mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-16 12:16:41 +02:00
Merge pull request #12 from andy4thehuynh/ALH-add-highlight-js
Add highlight js for syntax highlighting
This commit is contained in:
@@ -25,6 +25,7 @@ Email = "you@example.space"
|
|||||||
FaviconFile = "img/leaf.ico"
|
FaviconFile = "img/leaf.ico"
|
||||||
GATracker = "XYZ"
|
GATracker = "XYZ"
|
||||||
GitHub = "//github.com/you"
|
GitHub = "//github.com/you"
|
||||||
|
HighlightJS = true
|
||||||
Initials = "ad" # Displayed on single post page; DEPRECATED in v0.3.0.
|
Initials = "ad" # Displayed on single post page; DEPRECATED in v0.3.0.
|
||||||
Lang = "en"
|
Lang = "en"
|
||||||
LinkedIn = "//linkedin.com/in/you"
|
LinkedIn = "//linkedin.com/in/you"
|
||||||
|
@@ -11,3 +11,11 @@ try {
|
|||||||
} catch(err) {}
|
} catch(err) {}
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.HighlightJS }}
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
@@ -10,6 +10,11 @@
|
|||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
|
|
||||||
|
{{ if .Site.Params.HighlightJS }}
|
||||||
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/default.min.css">
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
{{ if eq true .Site.Params.CacheBuster }}
|
{{ if eq true .Site.Params.CacheBuster }}
|
||||||
|
|
||||||
<link rel="stylesheet" href="/css/reset.css">
|
<link rel="stylesheet" href="/css/reset.css">
|
||||||
|
Reference in New Issue
Block a user