CARVIEW |
Adding project links to PyPI
I spotted a neat looking project links section on https://pypi.org/project/ExifReader/
Turns out that's added using a project_urls
key in setup.py, e.g. here: https://gitlab.com/Cyb3r-Jak3/exifreader/-/blob/publish/setup.py
project_urls={
"Issues": "https://gitlab.com/Cyb3r-Jak3/ExifReader/issues",
"Source Code": "https://gitlab.com/Cyb3r-Jak3/ExifReader/-/tree/publish",
"CI": "https://gitlab.com/Cyb3r-Jak3/ExifReader/pipelines",
"Releases": "https://github.com/Cyb3r-Jak3/ExifReader"
},
The documentation says that the keys can be any string you like. So where do those icons come from?
I looked at the HTML source code and searched the PyPI website source code for one of the CSS classes I found there: https://github.com/pypa/warehouse/search?q=fa-bug&unscoped_q=fa-bug
This lead me to the macro that defines the custom icons, which shows what custom keys or URLs are supported: https://github.com/pypa/warehouse/blob/2f00f4a9f208546ff0ebb6a6e61439021ca60a43/warehouse/templates/packaging/detail.html#L16-L60
I added these to the sqlite-utils PyPI page in this commit.
Related
- python Defining setup.py dependencies using a URL - 2022-08-13
- sphinx Using sphinx.ext.extlinks for issue links - 2021-02-17
- pixelmator Pixel editing a favicon with Pixelmator - 2022-01-20
- sphinx Adding Sphinx autodoc to a project, and configuring Read The Docs to build it - 2021-08-10
- readthedocs Promoting the stable version of the documentation using rel=canonical - 2022-01-20
- gpt3 Guessing Amazon image URLs using GitHub Copilot - 2022-10-15
- markdown Useful Markdown extensions in Python - 2021-04-03
- python Python packages with pyproject.toml and nothing else - 2023-07-07
- github Setting up a custom subdomain for a GitHub Pages site - 2022-05-04
- shot-scraper Social media cards generated with shot-scraper - 2023-04-29
Created 2020-05-11T09:33:05-07:00, updated 2020-09-01T16:54:36-07:00 · History · Edit