feat(src): add page navigation to main section
PR Description
This PR affects
srcanddocs
This PR contains the following:
- Addition of "Previous" and "Next" buttons for easy navigation between pages (especially on mobile)
- Docs update on the need to
buildbefore runningpreview
I am open to any changes needed to push this PR through.
Some screenshots of the update
Section with previous and next
Section with just previous and doc changes
So one issue with this approach (using the sidebar) is that you can nest pages. For example, https://lucia-auth.com/guides/oauth. It wouldn't make sense if the next page of "OAuth basics" is "Email and password."
Personally, I'm fine with not having next/previous buttons. It doesn't bother me too much, especially if each page is pretty long
The example you stated here perfectly brings up something I also thought about.
Having the Section title at the top of each page in a smaller, more subtle text.
e.g Small text: "Guides" Main text: "Oauth"
The main aim of those buttons is a quicker navigation between the pages of a section.
Personally, I think having to go to the nav bar to go to the next section is a poor UX (especially on mobile, I experienced this firsthand when I was first reading the Copenhagen book which was the inspiration behind this PR)
I think you should give it a try, it flows much better navigating at the bottom of the main section than having to go to the nav bar (either at the left or at the top on mobile) to change pages in each section. Plus if you want to do that, you still can even with these buttons.
Edit: #5fe54d6 adds the section title to the markup