apify / apify-docs

This project is the home of Apify's documentation.
https://docs.apify.com
Apache License 2.0
26 stars 73 forks source link

Inside course, hide most of the navigation #1026

Open honzajavorek opened 4 months ago

honzajavorek commented 4 months ago

When reading a lesson, the course UI should not distract the student from progressing over the learning path - more navigation we could hide the better. E.g. in the sidebar I'd only see the course I'm currently taking and its lessons.

Screenshot 2024-05-22 at 10-26-59 Sample lesson 1 Academy Apify Documentation

I don't aim to remove all distractions on that screenshot, some definitely have a reason to be there, but more we can remove the better.

honzajavorek commented 4 months ago

When internally discussing this, @TC-MO mentioned

We could change the file structure of the courses and have sidebars be autogenerated & different sidebars per course. I think docusaurus supports this out of the box without the need for hacking it too much.

and @B4nan mentioned

Looks like we can even have a page in multiple sidebars (and force which one is used on a given page)

I'm ready to dig into this and take responsibility for delivering the change, but as a Docusaurus newbie I expect some stumbling. Any guidance appreciated.

B4nan commented 4 months ago

so you would like to remove all the nav elements completely? curious what other sites are doing this? would you adjust the navbar at least so its clear where you are? it feels too much, if you want to remove the top level nav including breadcrumbs, you end up on a page that looks like a landing page but its actually quite deep in the structure.

it should be all doable but if we want to adjust more than just the sidebar, its gonna be harder (since we would need a custom layout probably). for sidebars it should be pretty simple (and things are all documented on docusaurus side)

feel free to poke me on slack if you need help with some specifics

TC-MO commented 4 months ago

Most of what we need regarding autogenerated sidebars is here & most of what we need regarding utilizing multiple sidebars is here.

The gist is that we would need to structure the files in a way that courses have separate folders - this would give us autogenerated sidebar per course Then, to force a certain sidebar we just need to make sure we add it to the front matter of the doc.

Only thing to remember would be to have some sort of home page which would be part of every sidebar so users cane asily go back and choose different course, but I guess our top navbar can work this way since clicking on Academy puts you in docs.apify.com/academy

also, would you really consider an ability to hide the whole sidebar as distraction? I would say it's quite the contrary.

honzajavorek commented 4 months ago

I added this sentence to the bottom of the initial post, but perhaps it was too late 😅

I don't aim to remove all distractions on that screenshot, some definitely have a reason to be there, but more we can remove the better.

For starters I'd focus on the sidebar as I think it's the most distracting when navigating between lessons.

honzajavorek commented 4 months ago

would you really consider an ability to hide the whole sidebar as distraction? I would say it's quite the contrary

The stuff I outlined distract the reader as a sum. Neither of the things distract much individually. The ability to hide the sidebar is probably the least distracting of those. I'd doubt anyone actually uses it, but that's another story (possibly even bikeshedding). If we manage to lower the sum by removing other stuff, the sidebar control can enjoy my love.

honzajavorek commented 4 months ago

@TC-MO awesome pointers, thanks!

The gist is that we would need to structure the files in a way that courses have separate folders - this would give us autogenerated sidebar per course

Good good. In long term, I wanted to flatten the courses structure to a single folder per course and a single file per lesson. This seems to be in line with that. Not something I'd be diving into right away, so I think this "decluttering" issue will have to wait until I shake up the course files first.

I'd definitely also want to have a homepage as an index of courses, similar to the one Academy already has. Let's see how it's going to work.