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

Docs: Add id attribute to old manual's header tags #24498

Closed
wants to merge 5 commits into from

Conversation

jamestiotio
Copy link

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.

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 15, 2022

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

@jamestiotio
Copy link
Author

@Mugen87 Could you kindly check again? I have implemented some fixes. It should be possible to link to a specific ID now.

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 30, 2022

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>
@jamestiotio
Copy link
Author

jamestiotio commented Oct 1, 2022

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>
@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 17, 2024

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.

@Mugen87 Mugen87 closed this Apr 17, 2024
@Mugen87 Mugen87 added this to the r164 milestone Apr 17, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants