-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use permalink instead of copy&paste the source code in documents #2444
Comments
question came up on #2441 (review) |
I agree that it could simplify maintenance a lot! There are already a couple of examples that do use the source code directly in the rst files like:
Look for Unfortunately, those examples require to host code snippets locally. I am not sure if it is possible to directly fetch code samples from other repositories. So I don't think it is a feasible solution. Does anyone have better ideas? |
Would depending on something like sphinxext-remoteliteralinclude be acceptable for this (Github repository: wpilibsuite/sphinxext-remoteliteralinclude)? It seems to address the exact issue reported here: be able to retrieve code from a remote location, instead of duplicating it next to the |
Put something together using See #2828. |
I will go ahead to close this issue, it is gonna be tough to keep the consumable and stable documentation instead of permlink. feel free to reopen this, if someone gets interested. |
It would be really nice and good for maintenance if we can link the source code as permalink instead of doing
copy&paste
the related source code in this repository.example: https://github.com/ros2/ros2_documentation/blob/rolling/source/Tutorials/Intra-Process-Communication.rst
code-block
The text was updated successfully, but these errors were encountered: