-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Include links to source code in documentation #22393
Comments
@nodejs/documentation @nodejs/website |
we wouldn't be able to reliably do this unless we switched to some form of inline documentation. at a minimum some tag like |
Live example from Rust: try_reserve. Rails does something similar: Rails.env. Links to GitHub are appealing, but would require the build process to get the final commit hash (example from Rails: rails/rails@fc5dd0b). Rust appears to take a different path: produce a syntax highlighted set of pages that is published with the documentation, and provide links into that. While this is clearly a non-trivial amount of work, I agree that it would be very useful, and would be fun to develop. I'll try to create a small proof of concept in the next week or two. |
@rubys cool! Let me know if I can help in any way. |
Fixed in #22405 (comment) By 6046570 |
Awesome. Thanks so much for working on this @rubys! |
Describe the solution you'd like
For someone who's learning about the internals of node, it's useful to know exactly where in the codebase certain functions are implemented. I think it would be nice if the node docs linked say a function (like
setTimeout
) to the line in source code (on Github perhaps) where that function is implemented.How it works in rust docs
Rust doc does this and I think it's a really nice feature that helps those wishing to dig deeper but isn't so intrusive to confuse or overwhelm newcomers.
How it might work for node docs
The text was updated successfully, but these errors were encountered: