Show Code Copy scripts only on Kind = page

This commit is contained in:
Aditya Telange 2021-04-10 11:53:23 +05:30
parent 17c4da86b5
commit 6c64ad0695
No known key found for this signature in database
GPG key ID: 82E844EF3DA99E77
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@
</script>
{{- end }}
{{- if (not .Site.Params.disableCodeCopy) }}
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not .Site.Params.disableCodeCopy)) }}
<script>
document.querySelectorAll('pre > code').forEach((codeblock) => {
const container = codeblock.parentNode.parentNode;