Skip to content

Parameterized sidebars in frontmatter (e.g. APIRef, DefaultAPISidebar) #502

@caugner

Description

@caugner

Most sidebar macros do not have a parameter, so they can be specified directly in frontmatter like this:

sidebar: xmlsidebar

Other sidebar macros have a parameter like this:

{{APIRef("Ink API")}}

In particular, this means that the sidebar macros have to be replicated in translated content, whereas the sidebar frontmatter is inherited (explaining few matches for sidebar: in translated-content).

Possible solutions:

  1. Extend the type of the sidebar frontmatter, e.g. string | Record<string, string>:
    sidebar:
      apiref: Ink API
    
  2. Add a separate API field:
    api: Ink API
    sidebar: apiref
    
  3. Derive the API from the slug following the API reorg

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions