Skip to content

Commit

Permalink
Add altmetric badges to paper (alshedivat#950)
Browse files Browse the repository at this point in the history
[Altmetric](https://www.altmetric.com/) tracks social media and citation
activity for a paper. I added an option to add the altmeric id to a
paper's bib entry, which results in the altmeric badge for the paper
being displayed next to the other buttons. As an example, I added the
altmetric id for the Einstein, Podolsky & Rosen paper.
  • Loading branch information
dominikstrb authored and zkotti committed Dec 10, 2022
1 parent 0bb7b81 commit 17c8979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ There are several custom bibtex keywords that you can use to affect how the entr
- `poster`: Adds a "Poster" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory)
- `slides`: Adds a "Slides" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory)
- `website`: Adds a "Website" button redirecting to the specified link
- `altmetric`: Adds an [Altmetric](https://www.altmetric.com/) badge (Note: only add the altmetric identifier here - the link is generated automatically)

You can implement your own buttons by editing the bib.html file.

Expand Down
3 changes: 3 additions & 0 deletions _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@
{%- if entry.website %}
<a href="{{ entry.website }}" class="btn btn-sm z-depth-0" role="button">Website</a>
{%- endif %}
{%- if entry.altmetric %}
<script type="text/javascript" src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script><div data-altmetric-id="{{ entry.altmetric }}" class="altmetric-embed" data-hide-no-mentions="true" data-hide-less-than="15" data-badge-popover="right" data-badge-type="2" style="display:inline"></div>
{%- endif %}
</div>

{% if entry.abstract -%}
Expand Down

0 comments on commit 17c8979

Please sign in to comment.