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/_default/single.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layouts/_default/single.html') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1d983fd..d313500 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -21,7 +21,7 @@ {{- end }} - {{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden }} + {{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }} {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} {{- if (.Param "ShowToc") }} {{- partial "toc.html" . }} @@ -46,7 +46,7 @@ {{- if (.Param "ShowPostNavLinks") }} {{- partial "post_nav_links.html" . }} {{- end }} - {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }} + {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} {{- partial "share_icons.html" . -}} {{- end }} -- cgit v1.2.3