-
Hi all, I'd like to know if there's a easy way to exclude a specific doc category based on different environments. The most related feature seems to be the pages plugin that can exclude pages with patterns. My use case is to hide categories administration, examples, and etc on prod, dev environments. But to make them show on demo and office environments. My workaound at the moment is creating different sidebars based on environments to "hide" them from the site. But the docs hidden from sidebar are still generated and accessible via URLs. I'd like to know if there's an elegant way to trully exclude a category based on different environments? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
This is something some Facebook sites are doing: filter the sidebars.js file with your own logic: You can run any nodejs code there, including reading However I don't know how they do to make the URLs unavailable, maybe the docs are simply not added to the docs folder? This PR adds an |
Beta Was this translation helpful? Give feedback.
This is something some Facebook sites are doing: filter the sidebars.js file with your own logic:
https://github.com/facebook/relay/blob/main/website/sidebars.js
You can run any nodejs code there, including reading
process.env
However I don't know how they do to make the URLs unavailable, maybe the docs are simply not added to the docs folder?
This PR adds an
exclude
config to all content plugins, it might help you achieve what you want: #5173