website
website copied to clipboard
Restrict api methods with platform
Not sure how many people this could benefit, but the docs could benefit from being able to hide methods that are platform specific. For example, I'm currently hired to develop for Windows only, and have to scroll through many macOS specific methods. It would be nice to filter both the view and the sidebar to a specific platform for faster reading.
Hi I would really like to work on this but do we have a design for the filter button or toggle?
Hi, So I played around a little bit with the website's code and understood how docusaurus is working. In my opinion the filter feature can be implemented by using .mdx instead of normal markdown files, that way we will be able to put some js logic on our markdown also we would need to update all the files such that the headings that need to be filtered are wrapped with their tags such as mac, linux or windows. If you can think of a more simpler approach to this I would love to discuss and work on this.
@DevanceJ I think we would want to do it with JavaScript on the website rather than modifying the source MDX files. The information is already embedded into the Markdown header for each API.
By adding a Filter logic Plugin to docusaurus maybe what do you think. Should I try working on a filter logic?
You mean a Remark plugin for the Docusaurus config? I'm not sure how it would look in practice off the top of my head but feel free to experiment!