Don't enable CodeCopyButtons by default

Change in var name
disableCodeCopy -> ShowCodeCopyButtons
This commit is contained in:
Aditya Telange 2021-04-25 05:30:00 +05:30
parent 10745dd537
commit 3a8df7888e
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 1 additions and 1 deletions

View File

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