stoplightio / elements

Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.
https://stoplight.io/open-source/elements/
Apache License 2.0
1.71k stars 197 forks source link

Customizing the Table of Contents in @stoplight/elements #2625

Open WeiyiZ-008 opened 1 month ago

WeiyiZ-008 commented 1 month ago

Description

Hello,

I am currently using @stoplight/elements to render my API documentation in a React application. I am looking for guidance on how to customize the table of contents (TOC), specifically for:

Current Setup

Here is a brief overview of my current setup:

  1. I have my API documentation defined in an OpenAPI/Swagger JSON file.
  2. I am using the API component from @stoplight/elements to render the documentation.
  3. I have created a custom toc.json file to structure the TOC, which is placed in the public directory of my React project.

Questions

Adding Dividers/Sections: How can I add new dividers or sections to the TOC to better organize my documentation?

WeiyiZ-008 commented 1 month ago

For example, I would like to add another section above Overview, or add sub group within the Overview image