| 1 | # Mintlify Documentation Formatting Rules |
| 2 | |
| 3 | ## Component Formatting |
| 4 | |
| 5 | When working with Mintlify documentation components (Card, Info, Tip, Note, Warning, etc.), follow these formatting guidelines: |
| 6 | |
| 7 | ### Bullet Points and Lists |
| 8 | |
| 9 | 1. **Always add a blank line** after the opening component tag and before the closing tag |
| 10 | 2. **Indent content** by 2 spaces within components |
| 11 | 3. **Use proper list formatting** with each item on its own line: |
| 12 | - Start lists on a new line after introductory text |
| 13 | - Use `-` for unordered lists |
| 14 | - Maintain consistent indentation |
| 15 | |
| 16 | ### Examples |
| 17 | |
| 18 | #### ✅ Correct Formatting: |
| 19 | |
| 20 | ```mdx |
| 21 | <Card title="Example" icon="icon-name"> |
| 22 | |
| 23 | This is the content with proper formatting: |
| 24 | - First bullet point |
| 25 | - Second bullet point |
| 26 | - Third bullet point |
| 27 | |
| 28 | </Card> |
| 29 | ``` |
| 30 | |
| 31 | ```mdx |
| 32 | <Info> |
| 33 | |
| 34 | Important information here: |
| 35 | - Point one |
| 36 | - Point two |
| 37 | - Point three |
| 38 | |
| 39 | </Info> |
| 40 | ``` |
| 41 | |
| 42 | #### ❌ Incorrect Formatting: |
| 43 | |
| 44 | ```mdx |
| 45 | <Card title="Example" icon="icon-name"> |
| 46 | This is wrong: - All bullets - On one line - Bad formatting |
| 47 | </Card> |
| 48 | ``` |
| 49 | |
| 50 | ### Component-Specific Rules |
| 51 | |
| 52 | 1. **Card Components**: Always include blank lines and proper indentation |
| 53 | 2. **Info/Tip/Note/Warning**: Format lists as bullet points, not inline |
| 54 | 3. **CardGroup**: Each Card within should follow the same formatting rules |
| 55 | 4. **Code Blocks**: Within components, maintain proper indentation |
| 56 | |
| 57 | ### Links in Lists |
| 58 | |
| 59 | When including links in bullet points: |
| 60 | ```mdx |
| 61 | - [Link Text](url): Description of the link |
| 62 | ``` |
| 63 | |
| 64 | ### Nested Components |
| 65 | |
| 66 | For nested components, maintain proper indentation levels: |
| 67 | ```mdx |
| 68 | <CardGroup> |
| 69 | <Card title="First Card"> |
| 70 | |
| 71 | Content here: |
| 72 | - Bullet one |
| 73 | - Bullet two |
| 74 | |
| 75 | </Card> |
| 76 | |
| 77 | <Card title="Second Card"> |
| 78 | |
| 79 | More content: |
| 80 | - Another bullet |
| 81 | - Final bullet |
| 82 | |
| 83 | </Card> |
| 84 | </CardGroup> |
| 85 | ``` |
| 86 | |
| 87 | ## Application |
| 88 | |
| 89 | These rules apply to all `.mdx` files in the `docs/` directory, particularly: |
| 90 | - Guide documents |
| 91 | - Cookbook documents |
| 92 | - Reference documentation |
| 93 | - Any Mintlify-powered documentation |
| 94 | |
| 95 | ## Automation Note |
| 96 | |
| 97 | When using Continue or other AI assistants to generate or modify documentation: |
| 98 | - Always format Mintlify components according to these rules |
| 99 | - Review generated content for proper formatting |
| 100 | - Apply these rules consistently across all documentation |