Skip to content

Commit

Permalink
Make publication badges always visible (alshedivat#2565)
Browse files Browse the repository at this point in the history
## The issue
Currently Altmetric and Dimension publication badge elements have
non-obvious attributes that hide badges when some conditions are not met
,e.g.:
```
data-hide-no-mentions="true"
data-hide-less-than="15"
```
resulting in seemingly strange behavior where badges are enabled in
`config.yml` but don't show up consistently, as reported in alshedivat#2443 :
Altmetric badges don't display for some pubs.

## This PR
- removes these hidden nondisplay conditions in favor of more
predictable website behavior;
- adds documentation links to point users interested in customizing
badge behavior to the right resources.
  • Loading branch information
scottleechua authored and Suraj-Bhor committed Aug 13, 2024
1 parent e35c76c commit 10c835d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,10 @@ scholar:
group_order: descending

# Display different badges withs stats for your publications
# Customize badge behavior in _layouts/bib.liquid
enable_publication_badges:
altmetric: true # Altmetric badge (https://www.altmetric.com/products/altmetric-badges/)
dimensions: true # Dimensions badge (https://badge.dimensions.ai/)
altmetric: true # Altmetric badge (Customization options: https://badge-docs.altmetric.com/index.html)
dimensions: true # Dimensions badge (Customization options: https://badge.dimensions.ai/)
google_scholar: true # Google Scholar badge (https://scholar.google.com/intl/en/scholar/citations.html)

# Filter out certain bibtex entry keywords used internally from the bib output
Expand Down
3 changes: 0 additions & 3 deletions _layouts/bib.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@
{% if site.enable_publication_badges.altmetric and entry_has_altmetric_badge %}
<span
class="altmetric-embed"
data-hide-no-mentions="true"
data-hide-less-than="15"
data-badge-type="2"
data-badge-popover="right"
{% if entry.altmetric != blank and entry.altmetric != 'true' %}
Expand Down Expand Up @@ -297,7 +295,6 @@
{% else %}
data-pmid="{{ entry.pmid }}"
{% endif %}
data-hide-zero-citations="true"
data-style="small_rectangle"
data-legend="hover-right"
style="margin-bottom: 3px;"
Expand Down

0 comments on commit 10c835d

Please sign in to comment.