MatrixAI / Polykey-Docs

Documentation for Polykey
https://polykey.com/docs/
GNU General Public License v3.0
1 stars 5 forks source link

Implement Tabs for Structuring Content in Documentation #38

Closed CryptoTotalWar closed 5 months ago

CryptoTotalWar commented 6 months ago

Is your feature request related to a problem? Please describe.

I have a problem where I need to be able to structure content within a particular subject block. Instead of having one long/tall block of content (where information can become repetitive and hard to find), I want to have tabs within a subject block that can help condense and organize the information for a user.

Describe the solution you'd like

Example 1 image Description: I would like Method 1 & Method 2 to each be their respective tabs with their corresponding content.

Example 2 image Description: Similarly, I want ZSH to be its tab with instructions and Bash to be its tab with instructions.

Example 3 image Description: Would like example 1 and example 2 to be in tabs as such.

Describe alternatives you've considered

I've also considered using toggle headings (hiding contents inside of an H1, H2, or H3 where the user clicks to display blocks of content inside).

Additional context

In our next meeting @duynguyen1105 , I would like you to show me how to implement the code changes myself, referencing the documentation here: Docusorous Tabs, in the context of the current setup of the codebase. For example, I know I need to do the following:

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

However, I am unsure if the markdown file I am working on is the place where the imports should be stated. I need help figuring out how to set up the import statements correctly, etc.

linear[bot] commented 6 months ago

PRO-41 Implement Tabs for Structuring Content in Documentation

CMCDragonkai commented 6 months ago

Yes you just import at the top of your .md file. I believe "MDX" works directly inside all .md files. So just try it. I believe if you check the README.md you can see I do the same with one of the index files to show an autogenerated list of subdocs.

CryptoTotalWar commented 5 months ago

@CMCDragonkai you were right. It was that simple. Closing ticket as resolved. Will be implementing Tabs for structuring parallels of information.