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

Split badges in README to have render better on GitHub #60

Closed
matthewfeickert opened this issue May 9, 2024 · 1 comment · Fixed by #61
Closed

Split badges in README to have render better on GitHub #60

matthewfeickert opened this issue May 9, 2024 · 1 comment · Fixed by #61

Comments

@matthewfeickert
Copy link
Member

GitHub has changed some of the ways that they render files in the last months, and one of those changes means that if badges are displayed in a .rst file like they are in the README now

.. image:: https://github.com/HEPData/hepdata-validator/actions/workflows/ci.yml/badge.svg?branch=main
:target: https://github.com/HEPData/hepdata-validator/actions?query=branch%3Amain
:alt: GitHub Actions Build Status
.. image:: https://coveralls.io/repos/github/HEPData/hepdata-validator/badge.svg?branch=main
:target: https://coveralls.io/github/HEPData/hepdata-validator?branch=main
:alt: Coveralls Status
.. image:: https://img.shields.io/github/license/HEPData/hepdata-validator.svg
:target: https://github.com/HEPData/hepdata-validator/blob/main/LICENSE.txt
:alt: License
.. image:: https://img.shields.io/github/release/hepdata/hepdata-validator.svg?maxAge=2592000
:target: https://github.com/HEPData/hepdata-validator/releases
:alt: GitHub Releases
.. image:: https://img.shields.io/pypi/v/hepdata-validator
:target: https://pypi.org/project/hepdata-validator/
:alt: PyPI Version
.. image:: https://img.shields.io/github/issues/hepdata/hepdata-validator.svg?maxAge=2592000
:target: https://github.com/HEPData/hepdata-validator/issues
:alt: GitHub Issues
.. image:: https://readthedocs.org/projects/hepdata-validator/badge/?version=latest
:target: https://hepdata-validator.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

they will be too much for a single line and GitHub will instead decide to display each one on its own line, which isn't great.

To get around this, myself and others (c.f. TDAmeritrade/stumpy@86d7015) have noticed that if a

|PyPI Version| 

.. |PyPI Version| image:: https://img.shields.io/pypi/v/hepdata-validator 
   :target: https://pypi.org/project/hepdata-validator/ 
   :alt: PyPI Version 

format is used then things render as intended.

@GraemeWatt
Copy link
Member

@matthewfeickert : thanks for the tip! I had noticed the change in the display of the badges, but I hadn't investigated how to fix it. Now addressed by PR #61.

GraemeWatt added a commit to HEPData/hepdata that referenced this issue May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants