Skip to content

Commit 9cc56e7

Browse files
committed
enable intersphinx to fix crossrefs; also enable copy button
1 parent 277c23d commit 9cc56e7

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

cuda_bindings/docs/source/conf.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = "cuda.bindings"
21-
copyright = "2021-2024, NVIDIA"
21+
copyright = "2021-2025, NVIDIA"
2222
author = "NVIDIA"
2323

2424
# The full version, including alpha/beta/rc tags
@@ -30,7 +30,14 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "myst_nb", "enum_tools.autoenum"]
33+
extensions = [
34+
"sphinx.ext.autodoc",
35+
"sphinx.ext.napoleon",
36+
"sphinx.ext.intersphinx",
37+
"myst_nb",
38+
"enum_tools.autoenum",
39+
"sphinx_copybutton",
40+
]
3441

3542
nb_execution_mode = "off"
3643
numfig = True
@@ -85,6 +92,16 @@
8592
# so a file named "default.css" will overwrite the builtin "default.css".
8693
html_static_path = ["_static"]
8794

95+
# skip cmdline prompts
96+
copybutton_exclude = ".linenos, .gp"
97+
98+
intersphinx_mapping = {
99+
"python": ("https://docs.python.org/3/", None),
100+
"numpy": ("https://numpy.org/doc/stable/", None),
101+
"nvvm": ("https://docs.nvidia.com/cuda/libnvvm-api/", None),
102+
"nvjitlink": ("https://docs.nvidia.com/cuda/nvjitlink/", None),
103+
}
104+
88105
suppress_warnings = [
89106
# for warnings about multiple possible targets, see NVIDIA/cuda-python#152
90107
"ref.python",

0 commit comments

Comments
 (0)