fix: copy code block logic for non code pages

This commit is contained in:
Jacky Zhao 2022-07-03 11:50:13 -07:00
parent a47218d28c
commit 1d5530e22f

View File

@ -56,10 +56,8 @@
{{ if $.Site.Data.config.enableCodeBlockCopy }}
{{ $clipboard := resources.Get "js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }}
{{ if (findRE "<pre" .Content 1) }}
<script src="{{$clipboard.Permalink}}"></script>
{{ end }}
{{ end }}
<!-- Preload page vars -->
{{$linkIndex := resources.Get "indices/linkIndex.json" | resources.Fingerprint