Skip to content

Commit b24d423

Browse files
committed
guide: make URL guidance more guide-y
Signed-off-by: William Woodruff <[email protected]>
1 parent 0321536 commit b24d423

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

source/guides/writing-pyproject-toml.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,31 @@ Note that if the label contains spaces, it needs to be quoted, e.g.,
427427
``Website = "https://example.com"`` but
428428
``"Official Website" = "https://example.com"``.
429429

430+
Users are advised to use :ref:`well-known-labels` for their project URLs
431+
where appropriate, since consumers of metadata (like package indices) can
432+
specialize their presentation.
433+
434+
For example in the following metadata, neither ``MyHomepage`` nor
435+
``"Download Link"`` is a well-known label, so they will be rendered verbatim:
436+
437+
.. code-block:: toml
438+
439+
[project.urls]
440+
MyHomepage = "https://example.com"
441+
"Download Link" = "https://example.com/abc.tar.gz"
442+
443+
444+
Whereas in this metadata ``HomePage`` and ``DOWNLOAD`` both have
445+
well-known equivalents (``homepage`` and ``download``), and can be presented
446+
with those semantics in mind (the project's home page and its external
447+
download location, respectively).
448+
449+
.. code-block:: toml
450+
451+
[project.urls]
452+
HomePage = "https://example.com"
453+
DOWNLOAD = "https://example.com/abc.tar.gz"
454+
430455
Advanced plugins
431456
================
432457

0 commit comments

Comments
 (0)