Skip to content
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

Add altmetric badges to paper #950

Merged
merged 4 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _bibliography/papers.bib
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ @article{PhysRev.47.777
url={http://link.aps.org/doi/10.1103/PhysRev.47.777},
html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777},
pdf={example_pdf.pdf},
altmetric={248277},
selected={true}
}

Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ scholar:
query: "@*"

# Filter out certain bibtex entry keywords used internally from the bib output
filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, selected, supp, blog, code, poster, slides, website, preview]
filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, selected, supp, blog, code, poster, slides, website, preview, altmetric]

# Maximum number of authors to be shown for each publication (more authors are visible on click)
max_author_limit: 3 # leave blank to always show all authors
Expand Down
3 changes: 3 additions & 0 deletions _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,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="1" style="display:inline"></div>
dominikstrb marked this conversation as resolved.
Show resolved Hide resolved
{%- endif %}
</div>

{% if entry.abstract -%}
Expand Down