From d88b401b39017bb9075d7f5d6887e3f6fa08770a Mon Sep 17 00:00:00 2001 From: douglastofoli Date: Mon, 23 Jan 2023 23:53:08 -0300 Subject: [PATCH] improve condition to an if inline --- layouts/partials/edit_post.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/layouts/partials/edit_post.html b/layouts/partials/edit_post.html index 5bcb40e..855376a 100644 --- a/layouts/partials/edit_post.html +++ b/layouts/partials/edit_post.html @@ -1,10 +1,8 @@ -{{- if not (or .Params.editPost.disable site.Params.editPost.disable) -}} -{{- if or .Params.editPost.URL site.Params.editPost.URL -}} +{{- if (and (or (.Params.editPost.URL) (site.Params.editPost.URL)) (and (not .Params.editPost.disable) (not site.Params.editPost.disable))) -}} {{- $fileUrlPath := path.Join .File.Path }} {{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}} {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}} -{{- end }} -{{- end }} +{{- end }} \ No newline at end of file