Closed devangbhuva97 closed 7 years ago
Hi Devang, I'm glad you took the time to report this. Thanks!
It's a bug, I do cache requests to avoid GitHub API limitations and I naively assumed that only one profile will be displayed.
I'm gonna fix it and release version 2.0.2.
thank and all the best for fix bug
@devangbhuva97 I was wrong. It's not a bug actually ;)
Only one widget is rendered because in HTML id="github-profile"
is used twice.
On one page, id
attribute has to be unique (according to HTML specification).
Every next element with the same id
is ignored.
HTML (only changed IDs)
<div id="github-card-1"
data-max-repos="1"
data-username="JimishF">
</div>
<div id="github-card-2"
data-max-repos="1"
data-username="devangbhuva97">
</div>
JavaScript (you have to initialize widgets with custom template)
new GitHubCard({
template: '#github-card-1'
}).init();
new GitHubCard({
template: '#github-card-2'
}).init();
Let me know if that works for you.
Thank you so much for giving solution.
I want to try display multiple person profile but only one person profile displayed. Reason: Data only come in first profile. There is no data in second profile.