Add support for nested documentation sections (like Guides) #215
Conversation
Broken TOC is my fault. I fixed it in the original PR. What is wrong with the contributing link? It references the root of the site tree. Let's shoot for the minimum of what works. Don't worry about trying to expose a document's embedded TOC in the sidebar menu. |
Thanks
We simply don't process
Fair point, we can leave that one for last and maybe add it in a separate PR |
@lmammino I have another guide I'd like to write. How can I help move this along? |
Hey @jsumners, sorry again for the delay on this. I should be able to restart the work on this next week. Hopefully, i can find enough time to be able to ship a first PR . |
I decided to add my new doc as a reference doc. It made more sense to do so anyway. |
Is this still a thing? I can work on it and take it from here! |
hey @luisorbaiceta, we would still love to get this done and I'd be more than happy to hand over the work. Let me know if the current status makes sense to you. I am happy to discuss the current approach but I am not prescriptive. If you realize the are other valid approaches let's explore them as well! |
I'm taking a look at it right now. Will let you know if any doubt comes up! 👌 |
I'm having some trouble during the build proccess. I have done as suggested in #241 by removing the content hash plugin (It´s the only way to get it working on Windows) and added the fix. Now files are being served (except for the The thing is that I expect the local instance of the website to look like the current fastify one, but It differs here: Am I missing something? Is this a Windows thing? |
It might be easier to re-create this PR from scratch. |
The problem is that even if I build it from the master branch I still have the problem shown in the images above |
Please describe what problem I am supposed to be seeing in the screenshot. Or add some arrows to it pointing out the differences. |
I've updated the comment above |
🤷♂️ We will need to wait for the expert advice of @lmammino. |
Hey sorry for the delay, @luisorbaiceta. Regarding the graphic discrepancies, I think it's because the master branch is a bit ahead of this branch, so you might need to pull the changes or rebase. Regarding the background image, I am not currently sure why that's happening but I don't expect anything major. I think we can consider this a minor concern and not a blocker for now. Finally, regarding the hashes, that's something we'll need to address because we will need hashes in the final production build (otherwise new changes will not show up live since the CDN does not invalidate the cache on deployments — except for HTML files — but instead it relies on assets having different URLs). On this last point, I would say don't worry too much for now, meaning don't take this as a blocker. We can either figure out how to replace that content-hash plugin or I can do the last finishing touches and the final release once everything else is done. Apologies if this is in a bit of a messy state right now. By the way, what @jsumners suggested:
It's a totally valid approach if you feel it will allow you to do progress faster! So don't feel constrained by what's currently here! |
The thing is I have also tried building from the master branch and I still get the same discrepancies...
I will adopt the fix mentioned in #241 but won't commit It to the PR so we can address this issue in another moment Edit:After having tried with a Macbook I can now confirm that is a Windows issue @lmammino |
@luisorbaiceta now that the Windows issue is resolved, do you plan to come back to this? |
Yes! @jsumners, I hope to have this done by next week Update: I haven't had the chance to take over this yet, hopefully I will find a gap next week 😬 |
🎉 |
Just checking back in to see if this is still something you want/plan to work on @luisorbaiceta. |
Right now the site only generates pages for files in |
So I guess the desired behaviour is that if a subfolder exists, we generate a page with a TOC for that subfolder and then each individual page within it. If no folder is found then we leave it as is. Is this correct? |
I think so, yes! |
Yes. |
This PR adds support for nested documentation sections like what is currently being proposed with "Guides" in fastify/fastify#2610.
Current status
Status: DRAFT
There are still some major issues with the current implementation and some more work to do.
See the following 2 pictures:
Nested documentation section index (PIC1)
Nested documentation page (PIC2)
TODO list
CONTRIBUTING.md
(PIC 2 issue 2)API
subfolder