mirror of
https://github.com/PrivSec-dev/privsec.dev.git
synced 2025-04-19 23:16:05 -04:00
load highlightingjs without inline
This commit is contained in:
parent
c672ce9026
commit
a889886d18
@ -105,4 +105,8 @@ function showCodeCopyButtons() {
|
||||
initializeMenu();
|
||||
if (params.scrollToTop) scrollToTop();
|
||||
if (params.themeToggle) themeToggle();
|
||||
if (params.showCodeCopyButtons) showCodeCopyButtons();
|
||||
if (params.showCodeCopyButtons) showCodeCopyButtons();
|
||||
|
||||
if ('hljs' in window) {
|
||||
hljs.initHighlightingOnLoad();
|
||||
}
|
@ -18,11 +18,10 @@
|
||||
{{- 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" | fingerprint }}
|
||||
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
||||
onload="hljs.initHighlightingOnLoad();"></script>
|
||||
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"></script>
|
||||
{{- else }}
|
||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" }}
|
||||
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script>
|
||||
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user