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/baseof.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layouts/_default/baseof.html') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6dfe741..3d13f07 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . }} @@ -9,7 +9,7 @@ {{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) -}} {{- print "list" -}} {{- end -}} -{{- if eq $.Site.Params.defaultTheme `dark` -}} +{{- if eq site.Params.defaultTheme `dark` -}} {{- print " dark" }} {{- end -}} " id="top"> -- cgit v1.2.3