From 436746b1701f5983c17f8c90ff2b4445c176678c Mon Sep 17 00:00:00 2001 From: Jason Tipton Date: Tue, 30 Jun 2020 19:39:47 -0800 Subject: [PATCH] Allow a shorter 'nickname' for the initial home greeting (#23) --- exampleSite/config.yaml | 1 + layouts/partials/home.html | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 8132b96..2cd6e1d 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -41,6 +41,7 @@ params: # some information about you author: name: "Jane Doe" + nickname: "Jane" image: "images/avatar.png" # give your some contact information. they will be used in the footer contactInfo: diff --git a/layouts/partials/home.html b/layouts/partials/home.html index d87a3fb..90e3dd7 100644 --- a/layouts/partials/home.html +++ b/layouts/partials/home.html @@ -7,7 +7,14 @@ -

Hi, I am {{ if .Site.Params.author.name }}{{ .Site.Params.author.name }}{{ else }}Jane Doe{{ end }} +

Hi, I am + {{ if .Site.Params.author.nickname }} + {{ .Site.Params.author.nickname }} + {{ else if .Site.Params.author.name }} + {{ .Site.Params.author.name }} + {{ else }} + Jane Doe + {{ end }}