Closed kenrose closed 3 years ago
I have already noticed this problem too. Hope your proposal can be accepted by the administrators.
This issue has been automatically marked as stale because it has not been commented on for at least two months.
The resources of the Jekyll team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.
Summary
Authors defined in
authors.yml
that do not have atwitter
handle have incorrect output fortwitter:creator
.Details
I run a Jekyll blog with several authors. Author information is kept in
_data/authors.yml
as described in the Advanced Guide. e.g.,:Some authors (like
john
) do not have Twitter accounts, so we do not specify atwitter
handle for them.Unfortunately, it appears that
jekyll-seo-tag
defaults to using theirname
as the value fortwitter:creator
in that case. e.g., forjohn
above, the following will be generated:That's clearly not right.
We want
name
to be set properly so that we can have theauthor
meta tag set. e.g., the following is correct:Investigation
The issue seems to be in
author_drop.rb
:Historically, it looks like this is a holdover from some time when author support was less robust and it was assumed that an author's name was their Twitter handle.
Ideas for a fix
I'm not sure what the best fix is here. Here are some ideas:
Treat
twitter: null
in the author's YAML as an explicit signal that there is notwitter
handle. e.g.,If an
author_hash
is present, only look attwitter
for the handle and don't fall back toname
. This would be a breaking change though.