Closed melechlapson closed 8 months ago
This addresses https://github.com/Qiskit/documentation/issues/517 by switching out the sphinx.ext.viewcode for the sphinx.ext.linkcode extension which allows our GitHub links in the documentation to be linked to the specific lines of code, not just the file. This was tested successfully in https://github.com/Qiskit/qiskit_sphinx_theme/pull/589 and in the qiskit repo in https://github.com/Qiskit/qiskit/pull/11851 as well as the runtime repo in https://github.com/Qiskit/qiskit-ibm-runtime/pull/1431 and now we want to implement it in the provider repo.
The API generation script at Qiskit/documentation already knows how to handle sphinx.ext.linkcode.
Example links from this PR:
Summary
This addresses https://github.com/Qiskit/documentation/issues/517 by switching out the sphinx.ext.viewcode for the sphinx.ext.linkcode extension which allows our GitHub links in the documentation to be linked to the specific lines of code, not just the file. This was tested successfully in https://github.com/Qiskit/qiskit_sphinx_theme/pull/589 and in the qiskit repo in https://github.com/Qiskit/qiskit/pull/11851 as well as the runtime repo in https://github.com/Qiskit/qiskit-ibm-runtime/pull/1431 and now we want to implement it in the provider repo.
The API generation script at Qiskit/documentation already knows how to handle sphinx.ext.linkcode.
Example links from this PR: