comment site_author_hash

This commit is contained in:
Ben Balter 2017-08-22 11:41:02 -04:00
parent f78999819f
commit a59b596a2b
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 4 additions and 0 deletions

View File

@ -246,6 +246,10 @@ module Jekyll
site_author_hash(author_string) || { "name" => author_string }
end
# Given a string representing the current document's author, attempt
# to retrieve additional metadata from site.data.authors, if present
#
# Returns the author hash
def site_author_hash(author_string)
return unless site.data["authors"] && site.data["authors"].is_a?(Hash)
author_hash = site.data["authors"][author_string]