Make publication badges always visible (#2565)

## 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 #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.
This commit is contained in:
Scott Lee Chua 2024-07-12 00:46:37 +08:00 committed by GitHub
parent d904c52149
commit c4f20b889e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -337,9 +337,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

View File

@ -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' %}
@ -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;"