Skip to content

Commit 7b09a93

Browse files
committed
docs: add :user: extlinks convenience
1 parent ed5fda7 commit 7b09a93

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

docs/src/common_links.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
.. _iris-esmf-regrid: https://github.com/SciTools-incubator/iris-esmf-regrid
4848
.. _netCDF4: https://github.com/Unidata/netcdf4-python
4949
.. _SciTools Contributor's License Agreement (CLA): https://cla-assistant.io/SciTools/
50+
.. _extlinks: https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
5051

5152

5253
.. comment

docs/src/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ def _dotv(version):
288288
"https://github.com/SciTools/iris/discussions/%s",
289289
"Discussion #%s",
290290
),
291+
"user": ("https://github.com/%s", "@%s"),
291292
}
292293

293294
# -- Doctest ("make doctest")--------------------------------------------------

docs/src/developers_guide/documenting/whats_new_contributions.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ The required content, in order, is as follows:
8282

8383
.. _@tkknight: https://github.com/tkknight
8484

85+
.. hint::
86+
87+
Alternatively adopt the ``:user:`` `extlinks`_ convenience instead.
88+
89+
For example to reference the ``github`` user ``tkknight`` simply use
90+
:literal:`:user:\`tkknight\``.
91+
92+
This will be rendered as :user:`tkknight`.
93+
94+
In addition, there is now no need to add a full reference to the user within
95+
the documentation.
96+
8597
* A succinct summary of the new/changed behaviour.
8698

8799
* Context to the change. Possible examples include: what this fixes, why
@@ -143,3 +155,4 @@ users. To achieve this several categories may be used.
143155
**💼 Internal**
144156
Changes to any internal or development related topics, such as testing,
145157
environment dependencies etc.
158+

docs/src/whatsnew/latest.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ This document explains the changes made to Iris for this release
8686

8787
#. `@tkknight`_ added a gallery carousel to the documentation homepage. (:pull:`6884`)
8888

89+
#. :user:`bjlittle` added the ``:user:`` `extlinks`_ ``github`` user convenience.
90+
(:pull:`6931`)
91+
8992

9093
💼 Internal
9194
===========

0 commit comments

Comments
 (0)