From 621607f9ef9abcc32583f0db620a3035811eed2e Mon Sep 17 00:00:00 2001 From: Vladislav Matus <37222775+matusvla@users.noreply.github.com> Date: Fri, 25 Jun 2021 20:31:32 +0200 Subject: [PATCH] Multiline info - enhancement (#578) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Multiline info * Vladislav Matus added as a contributor Co-authored-by: Vladislav Matus Co-authored-by: Luiz F. A. de Prá --- CONTRIBUTORS.md | 1 + exampleSite/config.toml | 2 +- layouts/partials/home.html | 4 + ...s_fd4b5b3f9a48bc0c7f005d2f7a4cc30f.content | 204 +++++++++++++++++- 4 files changed, 201 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1eadbc0..fc0418b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -98,4 +98,5 @@ - [cuso4-5h2o](https://www.cuso4.me) - [freeformz](https://icanhazdowntime.org) - [Roberto Gongora](https://yourfavourite.blog) +- [Vladislav Matus](https://github.com/matusvla) - [Kirill Feoktistov](https://feoktistoff.org) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 5f1956f..dc8eb44 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -15,7 +15,7 @@ enableEmoji = true author = "John Doe" description = "John Doe's personal website" keywords = "blog,developer,personal" -info = "Full Stack DevOps and Magician" +info = ["Full Stack DevOps", "Magician"] avatarURL = "images/avatar.jpg" #gravatar = "john.doe@example.com" footerContent = "Enter a text here." diff --git a/layouts/partials/home.html b/layouts/partials/home.html index 188f26e..ff640dd 100644 --- a/layouts/partials/home.html +++ b/layouts/partials/home.html @@ -9,7 +9,11 @@
gravatar
{{ end }}

{{ .Site.Params.author }}

+ {{ if reflect.IsSlice .Site.Params.info }} +

{{ range .Site.Params.info }}{{.}}
{{ end}}

+ {{ else }}

{{ .Site.Params.info }}

+ {{ end }} {{ with .Site.Params.social }}