diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd5ebc13ebd..68cdd71426a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -441,10 +441,34 @@ The API reference is manually assembled in `doc/api/index.rst`. The *autodoc* sphinx extension will automatically create pages for each function/class/module listed there. -You can reference classes, functions, and modules from anywhere (including docstrings) -using :func:\`package.module.function\`, -:class:\`package.module.class\`, or -:mod:\`package.module\`. +You can reference functions, classes, methods, and modules from anywhere +(including docstrings) using: + +- :func:\`package.module.function\` +- :class:\`package.module.class\` +- :meth:\`package.module.method\` +- :mod:\`package.module\` + +An example would be to use +:meth:\`pygmt.Figure.grdview\` to link +to https://www.pygmt.org/latest/api/generated/pygmt.Figure.grdview.html. +PyGMT documentation that is not a class, method, +or module can be linked with :doc:\`Any Link Text \`. +For example, :doc:\`Install instructions \\` links +to https://www.pygmt.org/latest/install.html. + +Linking to the GMT documentation and GMT configuration parameters can be done using: + +- :gmt-docs:\`page_name.html\` +- :gmt-term:\`GMT_PARAMETER\` + +An example would be using +:gmt-docs:\`makecpt.html\` to link to +https://docs.generic-mapping-tools.org/latest/makecpt.html. +For GMT configuration parameters, an example is +:gmt-term:\`COLOR_FOREGROUND\` to link to +https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-COLOR_FOREGROUND. + Sphinx will create a link to the automatically generated page for that function/class/module.