Giter Club home page Giter Club logo

Comments (12)

ajitzero avatar ajitzero commented on June 1, 2024

I'm facing the same issue.
I'm using this with:

{% for post in paginator.posts %}
  {% include post_preview.html %}
{% endfor %}

In post_preview.html, I've got:

{% avatar {{ author.social.github }} %}

which doesn't work, but this works:

{% avatar benbalter %}

So apparently, it takes only the first name's photo when used within a loop, but any fixed username call within the loop works just fine.

from jekyll-avatar.

RDIL avatar RDIL commented on June 1, 2024

@benbalter please take a look at this when you can :)

from jekyll-avatar.

benbalter avatar benbalter commented on June 1, 2024

Have you tried the user= format as described in https://github.com/benbalter/jekyll-avatar#passing-the-username-as-variable?

GitHub
A Jekyll plugin for rendering GitHub avatars. Contribute to benbalter/jekyll-avatar development by creating an account on GitHub.

from jekyll-avatar.

RDIL avatar RDIL commented on June 1, 2024

I’ll give it a shot. Thanks.

from jekyll-avatar.

RDIL avatar RDIL commented on June 1, 2024

Sadly, it didn’t work :(

GitHub
A Jekyll plugin for rendering GitHub avatars. Contribute to benbalter/jekyll-avatar development by creating an account on GitHub.

from jekyll-avatar.

RDIL avatar RDIL commented on June 1, 2024

Interesting, not sure what I did but it looks to be fixed now.

from jekyll-avatar.

stale avatar stale commented on June 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from jekyll-avatar.

kusma avatar kusma commented on June 1, 2024

I'm seeing the same issue here. It seems to trigger when I use {% avatar {{ foo }} %} in a layout file, but not if I do it in an article. It's almost as if a variable gets cached from some previously rendered page or something like that.

from jekyll-avatar.

kusma avatar kusma commented on June 1, 2024

Here's a reproduction case: https://github.com/kusma/jekyll-avatar-issue-37-repro

Render the reproduction, and observe that bar.html renders correctly, but foo.html gets the avatar from bar.html instead of the right one. I think that supports the caching hypothesis.

from jekyll-avatar.

ashmaroli avatar ashmaroli commented on June 1, 2024

@kusma Were you able to reproduce this issue with Jekyll 3.9?

from jekyll-avatar.

kusma avatar kusma commented on June 1, 2024

Just tried, and no, it does not reproduce with Jekyll 3.9. So I guess there's some change in behavior in Jekyll 4.x that breaks this...

from jekyll-avatar.

kusma avatar kusma commented on June 1, 2024

Since this seems unrelated to what the other users have experienced (Jekyll 4.x wasn't our in 2019), I decided to create a new ticked. So please ignore this ;)

from jekyll-avatar.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.