Skip to content

Commit

Permalink
Switching author metadata to use upcoming Hugo changes
Browse files Browse the repository at this point in the history
- there is a Hugo PR adding full support for author metadata:
- gohugoio/hugo#1850
- updating hasper to be in line with these new properties
  • Loading branch information
dencold committed Aug 23, 2016
1 parent 5eb33bd commit 367c598
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ params:
# authors config. use this section to provide full meta-data about the authors on your site
author:
dennis:
id: "dennis" # author's id/short name
firstName: "Dennis" # author's first name
lastName: "Coldwell" # author's last name
displayName: "dennis" # author's prefered display name
location: "Berkeley, CA" # author's whereabouts
bio: "trying to leave things better than I found them." # short bio, appears below author details on post
thumbnail: "/img/avatar.jpg" # author's avatar
mikasa:
id: "mikasa"
firstName: "Mikasa"
lastName: "Ackerman"
displayName: "mikasa"
location: "Shiganshina"
bio: "Better try something than to simply wait for death."
thumbnail: "/img/mikasa.jpg"
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/post_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<img class="author-thumb" src="{{.}}" alt="Author image" nopin="nopin" />
{{end}}

{{/* print the display name from the details */}}
{{$authorDetail.displayName}}
{{/* print the shortname (id) from the details */}}
{{$authorDetail.id}}
{{else}}
{{/* if no author details are set, just print whatever is set on the $author field */}}
{{$author}}
Expand Down

0 comments on commit 367c598

Please sign in to comment.