From 575cc0ca8c4e5904c7ae77e76db812c52e5f8ed1 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 27 Mar 2022 18:44:06 +0530 Subject: Use `site` function instead of `.Site` or `$.Site` - The site function provides global access to the same data as the .Site page method. - Current context (`.`) is never considered. --- layouts/partials/edit_post.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'layouts/partials/edit_post.html') diff --git a/layouts/partials/edit_post.html b/layouts/partials/edit_post.html index 1d90ebd..efa4c70 100644 --- a/layouts/partials/edit_post.html +++ b/layouts/partials/edit_post.html @@ -1,8 +1,8 @@ -{{- if or .Params.editPost.URL .Site.Params.editPost.URL -}} +{{- if or .Params.editPost.URL site.Params.editPost.URL -}} {{- $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")) -}} +{{- 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 }} -- cgit v1.2.3