From 663867b079bf8ddc76e632039c5af74b66b26a1a Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 26 Apr 2022 22:17:12 +0200 Subject: Reduce logic to determine title --- layouts/partials/head.html | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 866118e..71a2a8c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,7 +1,4 @@ - {{- $title := print .Title -}} - {{- if .IsHome }}{{ $title = .Site.Title }}{{ end -}} - {{- $description := print .Params.Description -}} {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} {{ $description = .Site.Params.Description }} @@ -18,12 +15,12 @@ - {{ $title }} + {{ block "title" . }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }} {{ hugo.Generator }} - + {{- if .Params.editor }}{{ end }} @@ -32,7 +29,7 @@ - + -- cgit v1.2.3