From 031e2ba57ea2b7b1de2e73c20bf2b5716f654fac Mon Sep 17 00:00:00 2001 From: Douglas Tofoli Date: Sat, 1 Apr 2023 16:04:56 -0300 Subject: [PATCH] Add condition to disable edit post on single pages (#1143) editPost: disabled: true --------- Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com> --- layouts/partials/edit_post.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/edit_post.html b/layouts/partials/edit_post.html index efa4c700..4f2c4de5 100644 --- a/layouts/partials/edit_post.html +++ b/layouts/partials/edit_post.html @@ -1,4 +1,4 @@ -{{- if or .Params.editPost.URL site.Params.editPost.URL -}} +{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}} {{- $fileUrlPath := path.Join .File.Path }} {{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}