mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 11:25:26 +01:00 
			
		
		
		
	Refactor, move HLJS code from footer to head;
already defered.
This commit is contained in:
		| @@ -72,6 +72,20 @@ | ||||
| {{- end }} | ||||
| {{- end -}} | ||||
|  | ||||
| {{- /* Highlight.js */}} | ||||
| {{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} | ||||
| {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} | ||||
| {{- if not .Site.Params.assets.disableFingerprinting }} | ||||
| {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | | ||||
| fingerprint }} | ||||
| <script defer src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}" | ||||
|     onload="hljs.initHighlightingOnLoad();"></script> | ||||
| {{- else }} | ||||
| {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} | ||||
| <script defer src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script> | ||||
| {{- end }} | ||||
| {{- end }} | ||||
|  | ||||
| {{- /* Favicons */}} | ||||
| <link rel="icon" href="{{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}"> | ||||
| <link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL }}"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange