From 7ea01a0ab23ec303c28907740a19c672fc261c4b Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 2 Sep 2021 20:22:08 +0530 Subject: [PATCH] Allow hiding `ShowCodeCopyButtons` per page closes: #548 --- layouts/_default/baseof.html | 2 +- layouts/partials/footer.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 37c595bd..6dfe7415 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -17,7 +17,7 @@
{{- block "main" . }}{{ end }}
- {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") -}} + {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3cebf489..4f7182b5 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -84,7 +84,7 @@ {{- end }} -{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Site.Params.ShowCodeCopyButtons)) }} +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }}