mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 11:46: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"
|
||||
GATracker = "XYZ"
|
||||
GitHub = "//github.com/you"
|
||||
HighlightJS = true
|
||||
Initials = "ad" # Displayed on single post page; DEPRECATED in v0.3.0.
|
||||
Lang = "en"
|
||||
LinkedIn = "//linkedin.com/in/you"
|
||||
|
@@ -11,3 +11,11 @@ try {
|
||||
} catch(err) {}
|
||||
</script>
|
||||
{{ 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 -->
|
||||
|
||||
{{ 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 }}
|
||||
|
||||
<link rel="stylesheet" href="/css/reset.css">
|
||||
|
Reference in New Issue
Block a user