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

Question: How to render Sidebar Menu on a custom page #914

Open
kossmokvin opened this issue Aug 14, 2024 · 1 comment
Open

Question: How to render Sidebar Menu on a custom page #914

kossmokvin opened this issue Aug 14, 2024 · 1 comment

Comments

@kossmokvin
Copy link

Greeting!
I would like to render the 'openapi-sidebar-default' sidebar menu on a custom page. But I am unable to import the apiMetadata on a custom page. Any help would be greatly appreciated.
Thank you in advance!

@ElliotFriend
Copy link
Contributor

I'm not precisely sure what you mean by "custom page." Is that referring to a file located inside the /src/pages directory? If so, those pages don't have sidebars.

The next question I'd have for you is what do you mean by openapi-sidebar-default? You can specify which sidebar is displayed on a given doc using the frontmatter:

---
title: Custom Sidebar Here
displayed_sidebar: 'openapi-sidebar-default'
---

This doc will display the specified sidebar, even if it's not a doc _in_ the sidebar.

All that said, this openapi plugin doesn't really mess with your already-configured sidebars. So, if you want to display those sidebars you may need to do some configuring. Check out this page for some details on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants