From 7bf3cbc17397a0a4e61427755c73a15df37824c3 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:15:46 -0500 Subject: [PATCH] Reactive the viewcode extension for docs (#1312) We got source links working in API docs on docs.quantum.ibm.com! See https://github.com/Qiskit/documentation/pull/620. To do this, we need to active `sphinx.ext.viewcode`. Note that we still plan to improve this implementation in the future to have more precise links by using `sphinx.ext.linkcode`, tracked by https://github.com/Qiskit/documentation/issues/517. This PR is to unblock the first iteration of this source links mechanism. --- docs/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 963ae80be..a5dd838d0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,6 +33,8 @@ 'sphinx.ext.napoleon', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', + # This is used by qiskit/documentation to generate links to github.com. + "sphinx.ext.viewcode", 'sphinx.ext.mathjax', 'jupyter_sphinx', 'sphinx_autodoc_typehints',