Skip to content

Commit

Permalink
Allow a shorter 'nickname' for the initial home greeting (hugo-toha#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyetisoftware-jason authored Jul 1, 2020
1 parent 45e36f3 commit 436746b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions exampleSite/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 8 additions & 1 deletion layouts/partials/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
<img src="{{ if .Site.Params.author.image }}{{ .Site.Params.author.image }}{{ else }}/assets/images/default-avatar.png{{ end }}"
class="rounded-circle mx-auto d-block img-fluid"
/>
<h1 class="greeting">Hi, I am {{ if .Site.Params.author.name }}{{ .Site.Params.author.name }}{{ else }}Jane Doe{{ end }}
<h1 class="greeting">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 }}
</h1>
<div class="typing-carousel">
<span id="ityped" class="ityped"></span>
Expand Down

0 comments on commit 436746b

Please sign in to comment.