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

Deep-linking chunked docs - possible enhancement #16

Open
oddhack opened this issue Aug 19, 2021 · 2 comments
Open

Deep-linking chunked docs - possible enhancement #16

oddhack opened this issue Aug 19, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@oddhack
Copy link

oddhack commented Aug 19, 2021

We use the chunker on the Vulkan Specification and it's a great tool for us - the single HTML page version of this document is beyond ridiculously huge and slow to load. The recent reimplementation was a godsend to the spec editor (me) due to performance improvements. So, we're very grateful to have it available.

That said,it would be really helpful for our purposes to have stable chapter naming - the spec evolves rapidly and chapters are added periodically - so instead of chap7.html we could have 'synchronization.html'. What this would let us do is create stable deep links into particular chapters from other Vulkan documentation, which isn't possible today. At best, we could do HTML postprocessing to construct a (section/anchor, page filename) map that has to be consumed by other tools operating on the other docs.

For our documents, the 'id' attributes generated by asciidoctor would be a fine chapter naming convention - of course if the chapter gets split further than it would require either 'id-id.html' naming convention or 'id-sectnum', so it's not trivial to make this robust when combined with the different nesting depths that can be specified through the command line (likewise specifying the nesting depths in terms of the chapter name instead of the chapter number would complete the pairing).

I don't have any idea how generally useful this would be, or if it's something you would be receptive to implementing. But as a first step, wanted to ask if you would be receptive to this approach, or have alternate suggestions to the same end?

(N.b. it is a shame that webservers don't have enough information to be able to rewrite HTML anchors in URLs, since that's all done browser-side).

@wshito
Copy link
Owner

wshito commented Aug 21, 2021

Hi, thank you for your feedback. Your request should be useful since the other similar tool, asciidoctor-multipage, takes your strategy for the file naming. I didn't take that way simply because I mostly write documents in Japanese which would make the URL look awful if I don't put ids on every single headings because the heading titles become the ids automatically by asciidoctor when I produce HTML.

I haven't looked at the code yet so I don't know how hard it is to implement. I am currently busy being involved in some projects. So you might have to wait some time.

Until then, we should discuss how the URLs for nesting pages should look like.

@wshito
Copy link
Owner

wshito commented Sep 6, 2021

@oddhack I have started to work on this enhancement. Please give me some time because I want to do refactoring first. If you have any more request, feel free to drop lines here for this occasion.

Meanwhile, encourage your people to leave stars on my project! That'll help me a lot! 😉

@wshito wshito added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Nov 7, 2021
wshito added a commit that referenced this issue Sep 13, 2022
- All the dependencies are updated to the latest version.
- No more use of private API in Cheerio package.  Cheerio dependency is now encapsulated in `Node.mjs` module.
- Major refactoring for future maintenance.  #16 
- Supports Node.is v18.x. #38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants