diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a60c6d9a3dfdc61d57b09b7d8a182a5ddf089a4..c30240dcea02413eb78df807942b2a8bc315d330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * The `figure` shortcode will now make images clickable to see the full size. * The tags page now renders categories as the the title instead of the slug name. +* Added additional argument to `example` shortcode to turn off the copy button. ## 2.1.0 diff --git a/layouts/shortcodes/example.html b/layouts/shortcodes/example.html index 6a542e476824fb27580e6c3670a44285f6d07cfc..1f34155ddfec98c2f14f99da72aee5bafc47c78b 100644 --- a/layouts/shortcodes/example.html +++ b/layouts/shortcodes/example.html @@ -3,7 +3,7 @@ <div class="scrollbar-container"> <div class="codeBlockWrapper_2QGZ"> {{ .Inner }} - <button type="button" aria-label="Copy code to clipboard" class="copyButton_1BYj">Copy</button> + {{ if .Get 1 }}<button type="button" aria-label="Copy code to clipboard" class="copyButton_1BYj">Copy</button>{{ end }} </div> </div> </div>