elements icon indicating copy to clipboard operation
elements copied to clipboard

Customizing the Table of Contents in @stoplight/elements

Open WeiyiZ-008 opened this issue 7 months ago • 1 comments

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:

  • Adding new dividers or sections to the TOC
  • Renaming existing dividers or sections in the TOC

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 avatar Jul 26 '24 23:07 WeiyiZ-008