-
Notifications
You must be signed in to change notification settings - Fork 3k
Spec: Fix table of content generation #11067
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
Conversation
|
I think this is probably a reasonable thing to do. Looking online, apparently switching to a single H1 element will also help out screen readers and accessibility software as well so sounds like a good thing to do. I would like to hear if anyone else has strong opnions though, especially since we have a few inflight Spec changes. |
|
ping @rdblue |
|
|
||
|
|
||
| # Specification | ||
| ## Specification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is the only problem. It appears that if there are multiple H1 sections, only the first one shows up in TOC. For the other changes, we do want to avoid over-nesting, which was originally added a few website iterations ago to get things to stop showing up in the TOC.
I think for at least a few of these, we can just change Specification and not other sections. For example, Terms is already H3, so there's no need to make it H4 because there is no intermediate H3 level above it. Everything before Schemas and Data Types falls in that category.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I just changed spec to H2 and reverted other changes. Rendered site LGTM.
Updated the PR.
| Writers are not allowed to commit files with a partition spec that contains a field with an unknown transform. | ||
|
|
||
| ## Schemas and Data Types | ||
| ### Schemas and Data Types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the container (specification) is going to be H2, I think this is a decision point. Do we care that things beyond this point are nested within Specification? I think I would rather have headings that are more distinct in the body of the spec than worry about these sections being nested within Spec. I'm curious what other people think though. @RussellSpitzer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I just changed spec to H2 and reverted other changes. Rendered site LGTM.
Updated the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rdblue I think we want to add additional nesting because we can limit the depth in the ToC configuration. That way we can have proper structure and not have the table of contents explode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The maximum depth we have is 3, do we have any plan to add depth limit? If not, maybe we don't have to argue on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't have any preference. I'm fine with just pumping all the nesting one more step deep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't right though. The Specification header should be above the others (e.g. Schemas and Data Types) not at the same level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that sounds fine to me.
|
@ajantha-bhat I feel like this has bounced back and forth on the levels, but we should be focused on getting the structure correct first and then addressing the ToC. This current version has L2/H2 should be: Everything else should be nested below. |
|
@danielcweeks: Thanks for the feedback. I have updated it accordingly. New TOC looks like this.
|
|
I think this is fine. @danielcweeks is the organization what you want? |
|
@ajantha-bhat looks like we have conflicts. It would be good to get this in, but I don't think this section of the docs is tied to the 1.7.0 release. |
7298396 to
35ce2ed
Compare
|
@danielcweeks: Thanks for the review. Conflict was due to recent row-lineage merge. I have resolved it now. PR is ready. |
|
Thanks @ajantha-bhat and @danielcweeks , @rdblue , @manuzhang and @amogh-jahagirdar for review |


Table of contents in the spec web page is not generated for
specand its subsection after #10948. It is super hard to navigate the spec without the table of contents.The reason is mkdocs only consider first H1 for TOC generation.
More info: squidfunk/mkdocs-material#818
So, keeping spec as H2 and adjusted its sub topics.
Note that the double # removal is not fully reverted, only added back one # . It is still kept at the same level as expected in the PR#10948
Also locally verified the new table of contents by building it in the
sitedirectory usingmake serveand hosted athttp://localhost:8000/spec