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/post_meta.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'layouts/partials/post_meta.html')
diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html
index f7134fb..15b8b1b 100644
--- a/layouts/partials/post_meta.html
+++ b/layouts/partials/post_meta.html
@@ -1,7 +1,7 @@
{{- $scratch := newScratch }}
{{- if not .Date.IsZero -}}
-{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" .Site.Params.DateFormat)))) }}
+{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
{{- end }}
{{- if (.Param "ShowReadingTime") -}}
--
cgit v1.2.3