Skip to content
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

Link to the API in the examples #4985

Open
EmmanuelMess opened this issue Feb 2, 2025 · 3 comments
Open

Link to the API in the examples #4985

EmmanuelMess opened this issue Feb 2, 2025 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@EmmanuelMess
Copy link

EmmanuelMess commented Feb 2, 2025

I think APIs should be linked to in the examples in the docs.

For example in Writing a simple publisher and subscriber where it says:

The first lines of code after the comments import rclpy so its Node class can be used.

"Node" should be a link to https://docs.ros.org/en/jazzy/p/rclpy/api/node.html

create_publisher declares that the node publishes messages of type String

"String" should be a link to http://docs.ros.org/en/jazzy/p/std_msgs/interfaces/msg/String.html

And the links should be aligned with the ros version of the docs.

I believe this would help developers find and navigate the documentation and help with search engine optimization (as search engines "crawl" assigning values to linked-to sites).

@christophebedard christophebedard added the help wanted Extra attention is needed label Feb 2, 2025
@christophebedard
Copy link
Member

That indeed sounds like a good improvement! A pull request would be appreciated 😃

And the links should be aligned with the ros version of the docs.

This is how we deal with that: https://docs.ros.org/en/rolling/The-ROS2-Project/Contributing/Contributing-To-ROS-2-Documentation.html#macros

@kscottz
Copy link
Collaborator

kscottz commented Feb 3, 2025

I don't disagree with this issue in principle, but back-filling most referenced objects with the API documentation is a pretty heavy lift. The API docs could stand significant improvement before we spend time back-filling the docs.

@EmmanuelMess
Copy link
Author

I don't disagree with this issue in principle, but back-filling most referenced objects with the API documentation is a pretty heavy lift. The API docs could stand significant improvement before we spend time back-filling the docs.

If you sort by most common and only do examples, I think that the amount to fix is manageable. I would also add a rule that new docs have to be linked to APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants