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

Uniform treatment of sidebar #1251

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

panglesd
Copy link
Collaborator

This PR is a change in how we handle the sidebar.

The current status is that we give the sidebar the modules and the pages separately. This is good because it allows them to be rendered separately which can be readable, but this is bad because:

  • It gives less flexibility in the sidebar/hierarchy (for instance in a monorepo we might want to hierarchize the modules) while letting it be quite uniform in the canonical case.
  • The sidebar and the breadcrumbs do not correspond
  • There are conflicts whenever the library roots are included in the pages roots
  • This does not handle implementations!

This PR changes the sidebar so that it is generated from the hierarchy of both modules, pages, sources, ...
The good things are above. The bad things are:

  • It is a bit harder to make it look good.
  • The children_order is more important (to have the libraries at the end).

Here is a preview for such a sidebar for ppxlib.

(It seems to me that we will need to add the @toc-expand tags)

I still need to clean up the history but the code should be ok already, and the discussion can start!

@jonludlam
Copy link
Member

Thanks for this! It breaks sherlodoc though - do you have a branch of that that's compatible?

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.

2 participants