Skip to content

Commit

Permalink
comment site_author_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Aug 22, 2017
1 parent f789998 commit a59b596
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/jekyll-seo-tag/drop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ def author_hash(author_string)
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]
Expand Down

0 comments on commit a59b596

Please sign in to comment.