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

feat(godocfx): add two levels of nesting to TOC #2972

Merged
merged 1 commit into from Oct 6, 2020
Merged

feat(godocfx): add two levels of nesting to TOC #2972

merged 1 commit into from Oct 6, 2020

Conversation

tbpg
Copy link
Contributor

@tbpg tbpg commented Oct 6, 2020

The TOC is a bit unruly with every package in a single list. So, I added a couple levels of nesting: one for the module and one for the first part after the module. In other words, I split package names into mod/mid/suffix and nest shared mod and mid values. If there would only be one element in the nested list, it isn't nested. This is like a trie with only two levels.

The result looks like this:

- uid: cloud.google.com/go/bigquery
  name: cloud.google.com/go/bigquery
  items:
  - name: README
    href: README.md
  - name: connection
    items:
    - uid: cloud.google.com/go/bigquery/connection/apiv1
      name: apiv1
    - uid: cloud.google.com/go/bigquery/connection/apiv1beta1
      name: apiv1beta1
  - uid: cloud.google.com/go/bigquery/datatransfer/apiv1
    name: datatransfer/apiv1

@tbpg tbpg requested a review from codyoss October 6, 2020 15:37
@tbpg tbpg requested a review from a team as a code owner October 6, 2020 15:37
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 6, 2020
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! LGTM

@tbpg tbpg merged commit 3a49b2d into master Oct 6, 2020
@tbpg tbpg deleted the toc branch October 6, 2020 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants