From ac338d30b0e3f12f33544f66a38488ebeaf02b94 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Fri, 29 Jun 2018 12:37:16 +0200 Subject: [PATCH] Restructure head parameter determination --- layouts/partials/head.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 811a220..20c7164 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -13,18 +13,21 @@ {{- $title := printf "Overview of all pages with the %s #%s" .Data.Singular $.Title }} {{- $.Scratch.Set "Title" $title }} +{{- else }} + {{- $.Scratch.Set "Description" ( .Description | default .Params.subtitle | default .Summary ) }} + {{- $.Scratch.Set "Title" ( .Title | default .Site.Title ) }} {{- end }} -{{- with ($.Scratch.Get "Title") | default .Title | default .Site.Title }} - {{ . }} +{{- with ($.Scratch.Get "Title") }} + {{ . }} - {{ $.Site.Title }} {{- end }} -{{- with .Description | default .Params.subtitle | default .Summary | default ($.Scratch.Get "Description") }} +{{- with ($.Scratch.Get "Description") }}