diff --git a/README.md b/README.md index 24b665e..0113569 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ params: name: "Jane Doe" nickname: "Jane" image: "images/avatar.png" + # greeting message before your name. it will default to "Hi! I am" if not provided + greeting: "Hi, I am" # give your some contact information. they will be used in the footer contactInfo: email: "janedoe@example.com" diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 47a59cb..a268aed 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -66,6 +66,8 @@ params: name: "Jane Doe" nickname: "Jane" image: "images/avatar.png" + # greeting message before your name. it will default to "Hi! I am" if not provided + greeting: "Hi, I am" # give your some contact information. they will be used in the footer contactInfo: email: "janedoe@example.com" diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index 2f825a7..549079d 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -1,3 +1,13 @@ +{{ $greeting:="Hi! I am" }} +{{ if .Site.Params.author.greeting }} + {{ $greeting = .Site.Params.author.greeting }} +{{ end }} +{{ $name:="Jane Doe" }} +{{ if .Site.Params.author.nickname }} + {{ $name = .Site.Params.author.nickname }} +{{ else if .Site.Params.author.name }} + {{ $name = .Site.Params.author.name }} +{{ end }}