From 4c3f5c2b8c890be8798d1bf25205d8249fe8faec Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 1 May 2022 11:56:29 +0200 Subject: Use site function instead of .Site or $.Site --- layouts/_default/baseof.html | 6 +++--- layouts/index.html | 2 +- layouts/partials/head.html | 6 +++--- layouts/partials/sidebar.html | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 9ba6cf0..98a05bf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,14 +1,14 @@ {{- partial "head.html" . -}} - + {{ if .Params.toc }}{{ partial "sidebar-toc.html" . }}{{ else }}{{ partial "sidebar.html" . }}{{ end }}

- {{ .Site.Title }} -
{{ .Site.Params.tagline }} + {{ site.Title }} +
{{ site.Params.tagline }}

diff --git a/layouts/index.html b/layouts/index.html index 16d16c7..e051c4d 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@

Latest Publications

    - {{ range first 10 (where .Site.RegularPages "Section" "!=" "" ) }} + {{ range first 10 (where site.RegularPages "Section" "!=" "" ) }}
  • {{ .Title }}
  • diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5c76d9f..f4303e1 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -2,7 +2,7 @@ {{- $description := print .Params.Description -}} {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} - {{ $description = .Site.Params.Description }} + {{ $description = site.Params.Description }} {{- end -}} @@ -11,7 +11,7 @@ - {{ block "title" . }}{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }}{{ end }} + {{ block "title" . }}{{ if .IsHome }}{{ site.Title }}{{ else }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ site.Title }}{{ end }}{{ end }} {{ hugo.Generator }} @@ -23,7 +23,7 @@ {{- if .Params.editor }}{{ end }} {{- if .Params.date }}{{ end }} {{- if .Params.rights }}{{ end }} - + {{- /* Misc */}} {{template "partials/templates/opengraph.html" . }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 8178537..70f0b81 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -4,15 +4,15 @@