mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 19:35:26 +01:00 
			
		
		
		
	footer: allow disabling HLJS #143
usage =>
in site config =>
    params:
        assets:
            disableHLJS: true
per-page in front-matter =>
   disableHLJS: true
			
			
This commit is contained in:
		| @@ -18,7 +18,7 @@ | ||||
|         {{- block "main" . }} | ||||
|         {{- end }} | ||||
|     </main> | ||||
|     {{- partialCached "footer.html" . .Type .Layout }} | ||||
|     {{- partialCached "footer.html" . .Type .Layout .Params }} | ||||
| </body> | ||||
|  | ||||
| </html> | ||||
|   | ||||
| @@ -18,7 +18,8 @@ | ||||
|     </button> | ||||
| </a> | ||||
| {{- partial "extend_footer.html" . -}} | ||||
| {{ if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`)) }} | ||||
| {{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} | ||||
| {{- if (and (in site.Params.mainSections .Type) (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.Permalink }}" integrity="{{ $highlight.Data.Integrity }}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange