Skip to content

Limited docs sidebar sorting #172

@lachlancollins

Description

@lachlancollins

Problem

Currently, the sidebar generator iterates over the core items and adds framework items as it goes, then goes through any framework sections that were not core sections. This means that groups with core items always appear first.

Proposal

Frameworks could be moved within sections, so that the logic would be to render the section, its core items, and the selected framework's items.

const configSchema = z.object({
  docSearch: z.object({
    appId: z.string(),
    apiKey: z.string(),
    indexName: z.string(),
  }),
  sections: z.array(
    z.object({
      name: z.string(),
      items: z.array(
        z.object({
          label: z.string(),
          to: z.string(),
          badge: z.string().optional(),
        })
      ),
      frameworks: z.array(
        z.object({
          name: z.string(),
          items: z.array(
            z.object({
              label: z.string(),
              to: z.string(),
              badge: z.string().optional(),
            })
          ),
        })
      ),
    })
  ),
  users: z.array(z.string()).optional(),
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions