-
-
Notifications
You must be signed in to change notification settings - Fork 35.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
Docs: Add id attribute to old manual's header tags #24498
Conversation
It seems that the feature request of the issue is not implemented with this PR. The ids are now added but it's not possible link to a specific section. E.g. the site link https://raw.githack.com/jamestiotio/three.js/dev/docs/index.html#manual/en/introduction/Creating-a-scene works but not https://raw.githack.com/jamestiotio/three.js/dev/docs/index.html#manual/en/introduction/Creating-a-scene#rendering-the-scene |
@Mugen87 Could you kindly check again? I have implemented some fixes. It should be possible to link to a specific ID now. |
It seems to work now. However, I'm not sure about the value of this feature if header links have to be created manually. Compared to sites like wikipedia, the docs do not have a table of contents section so the links are currently not clickable. I wonder if a clickable hashtag next to each header would solve this issue. |
Signed-off-by: James R T <jamestiotio@gmail.com>
Hi @Mugen87, I have added clickable hashtags in commit adebeb9. The hashtags are located beside each header to its right, in a style somewhat similar to the one used in the articles on GitHub Blog. Could you kindly check if this is much better? Cheers! |
Signed-off-by: James R T <jamestiotio@gmail.com>
The current documentation (and its manual part) lacks certain features which are common in other projects like advanced search or more fine-grained navigation in the manual. However, we have the special situation that we are not generating our documentation but developing it ourself. That said, the focus of this project shouldn't lie on developing a documentation template but a 3D engine. So we have to make compromises in context of the documentation by limiting the features and focusing on the most important things. This change ended up more complicated than originally thought. Next to the additional JS logic we would have to add a significant amount of markup to introduce linkable headers. This is unfortunately out of scope. If we adapt a different style for maintaining the manual (see #27832), we hopefully get this feature for free. |
Related issue: #23225
Description
This pull request adds the requested
id
attributes to the header tags (<h2>
and<h3>
) in the old manual.Additional note: I figured that this should be done incrementally to avoid a huge list of changes that is harder to review. I will work on adding the corresponding
id
attributes to the API reference docs and examples in separate PRs.