Qiskit / documentation

The documentation content home for https://docs.quantum.ibm.com.
https://docs.quantum.ibm.com
Apache License 2.0
39 stars 81 forks source link

[proof of concept] Fix anchor links for inlined classes #2215

Closed Eric-Arellano closed 3 weeks ago

Eric-Arellano commented 3 weeks ago

Closes https://github.com/Qiskit/documentation/issues/2210. Before, we would convert anchor links like runtime-job#qiskit_ibm_runtime.RuntimeJob.submit to be runtime-job#submit. This is because the header is set to submit, so that is the autogenerated anchor for the header.

We could instead link to the original full ID like #qiskit_ibm_runtime.RuntimeJob.submit because we set this on the component itself, like the <Function component. However, until we solve https://github.com/Qiskit/documentation/issues/1395, that means the anchor will take you below the header to the colored bar. That is especially problematic for attributes which don't have a code signature, like the second image.

Screenshot 2024-10-31 at 9 01 05 AM Screenshot 2024-10-31 at 9 01 14 AM

So, this PR is the best solution long-term, but blocked by https://github.com/Qiskit/documentation/issues/1395.