From 24dd1f92bfb79481f30c37a52251e2bbb5840368 Mon Sep 17 00:00:00 2001 From: Todd Meinershagen Date: Sun, 25 Feb 2018 22:35:41 -0600 Subject: [PATCH] Refactoring the reference to description in the Params to a variable in the site-header.html. --- layouts/partials/site-header.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/partials/site-header.html b/layouts/partials/site-header.html index df6be3d..c92abeb 100755 --- a/layouts/partials/site-header.html +++ b/layouts/partials/site-header.html @@ -1,4 +1,5 @@ {{ $featured_image := .Param.featured_image | default "images/gohugo-default-sample-hero-image.jpg" }} +{{ $description := .Param.description | default "" }} {{ if $featured_image }} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} {{ $featured_image := (trim $featured_image "/") | absURL }} @@ -9,7 +10,7 @@

{{ .Title | default .Site.Title }}

- {{ with .Param.description }} + {{ with $description }}

{{ . }}

@@ -25,7 +26,7 @@

{{ .Title | default .Site.Title }}

- {{ with .Param.description }} + {{ with $description }}

{{ . }}