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

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

Open
WeiyiZ-008 opened this issue Jul 26, 2024 · 1 comment
Open

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

WeiyiZ-008 opened this issue Jul 26, 2024 · 1 comment
Labels
enhancement New feature or request triaged

Comments

@WeiyiZ-008
Copy link

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
Copy link
Author

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

@mnaumanali94 mnaumanali94 added enhancement New feature or request triaged labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged
Projects
None yet
Development

No branches or pull requests

2 participants