mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 14:59:45 +00:00
Make hljsTheme configurable, use dark theme for themeStyle=dark
This commit is contained in:
parent
a4803d7bb5
commit
594c8c1cc0
2 changed files with 9 additions and 2 deletions
|
@ -24,6 +24,7 @@ canonifyurls = true # Turns relative urls into a
|
|||
description = "Website Description" # Max 160 characters show in search results
|
||||
faviconFile = "img/fav.ico"
|
||||
highlightjs = true # Syntax highlighting
|
||||
hljsTheme = true # Select highlight.js theme: https://highlightjs.org/static/demo/
|
||||
footerText = "" # Text to show in footer (overrides default text)
|
||||
fadeIn = true # Turn on/off the fade-in effect
|
||||
|
||||
|
@ -54,4 +55,4 @@ canonifyurls = true # Turns relative urls into a
|
|||
|
||||
[[params.social]]
|
||||
url = "https://linkedin.com/"
|
||||
icon = "linkedin"
|
||||
icon = "linkedin"
|
||||
|
|
|
@ -35,7 +35,13 @@
|
|||
|
||||
<!-- CSS -->
|
||||
{{ if .Site.Params.highlightjs }}
|
||||
{{ if .Site.Params.hljsTheme }}
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/{{ .Site.Params.hljsTheme }}.min.css">
|
||||
{{ else if eq .Site.Params.themeStyle "light" }}
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/default.min.css">
|
||||
{{ else }}
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/tomorrow-night.min.css">
|
||||
{{ end }}
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{{ end }}
|
||||
|
@ -84,4 +90,4 @@ crossorigin="anonymous"></script>
|
|||
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
</head>
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue