-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Adding linkback functionality Author avatar & Name #1386
Conversation
_includes/author-profile.html
Outdated
{% else %} | ||
<img src="{{ author.avatar | absolute_url }}" class="author__avatar" alt="{{ author.name }}" itemprop="image"> | ||
{% assign author_src = author.avatar | absolute_url %} | ||
{% assign author_class = "author__avatar" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can safely remove the author_class
stuff. Looking back at my original code class="author__avatar"
on the <img>
element was left in mistakenly. It's applied on the wrapper div
and not needed anymore.
This looks pretty clean to me so I'm good with merging in with some minor adjustments. Left a note above about the The only thing giving me pause is the naming of And yes, feel free to add this to the Configuration docs and a line in |
Thanks for the feedback! I didn't realize that about As far as the name of what variable to use there, I'm also open to suggestions on what might be the most clear. Instead of |
|
…s#1386) * adding linkback funct to author avatar & nm * rm author_class; change linkback var to home; updating config docs
…s#1386) * adding linkback funct to author avatar & nm * rm author_class; change linkback var to home; updating config docs
…s#1386) * adding linkback funct to author avatar & nm * rm author_class; change linkback var to home; updating config docs
…s#1386) * adding linkback funct to author avatar & nm * rm author_class; change linkback var to home; updating config docs
This pull request is an attempt at addressing #1331. This is the simplest/cleanest way that I can think to add this functionality. If this is too messy, I completely understand and we can close this and I can simply do it locally, but again, I always like to keep customization as minimal as possible to more easily take advantage of future updates.
At any rate, I think this solution does solve the concern noted in #1331 around easily turning it on/off and allowing it for one, some, or many authors depending on the site's structure.
Basically, the code will check for an
author.linkback
yml key and if it is set, then it will add the link around a given author's avatar and name. If it is not set, then the link will not be generated.If this is something you'd consider adding in, I can certainly update the docs where applicable, but wanted to see if you'd even consider this before doing that?