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

Links between the user guide and the reference would be nice #263

Closed
HadrienG2 opened this issue May 30, 2017 · 5 comments
Closed

Links between the user guide and the reference would be nice #263

HadrienG2 opened this issue May 30, 2017 · 5 comments

Comments

@HadrienG2
Copy link

HadrienG2 commented May 30, 2017

nalgebra provides two sources of documentation. The user guide is meant as a high-level description of the library, and is a lots more approachable when trying to discover its functionality, whereas the API documentation provides a more detailed reference suitable for answering more specific questions such as "why won't this code compile".

In this sense, these two forms of documentation are complementary. But currently, they don't link to one another. If I want to know more about a function described in the user guide, I need to manually look it up in the API documentation, through lots of copy and paste in the search box.

It would be nice if there were a way to automatically add links to the API reference in the user guide, so that one could just click on the name of the function in the user guide instead.

@milibopp
Copy link
Collaborator

This might be quite a bit of effort. And there is one crucial thing I cannot really find, namely the user guide's source code.

@sebcrozet where are you keeping that?

@HadrienG2
Copy link
Author

HadrienG2 commented Jul 28, 2017

Indeed, the amount of effort needed for this would depend on the toolchain used to generate the user guide. Since rustdoc uses a very regular scheme for reference documentation URLs, I would expect that starting from some sort of fully qualified name (e.g. "struct nalgebra::core::Matrix"), one could easily generate both user guide text ("Matrix") and an associated link to the reference documentation ("http://nalgebra.org/rustdoc/nalgebra/core/struct.Matrix.html"). But the toolchain used to build the user guide needs to be sufficiently flexible in order to allow all this markup generation to be easily integrated...

@sebcrozet
Copy link
Member

The user guide is currently built with mkdocs. The source of the user guide is on the gh-pages branch of nalgebra (though I should move this to its own repo. in the future). Is guess there is some ways to add this kind of link with some custom Javascript.

@milibopp
Copy link
Collaborator

It would be nice if it could be done during generation of the static pages, as there is technically no need for client-side code for this kind of feature. Not sure how easy it is to do with mkdocs. Does it support some kind of templating?

@sebcrozet
Copy link
Member

This issue has been moved to the nalgebra.org repository: dimforge/nalgebra.rs#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants