Files
Ethan Palm 0406ff0cb0 Testing cursor rule (#858)
* testing cursor rule

* update frontmatter

* update headers and text formatting sections

* update links section

note: Cursor made up a CLI command

* remove callout from links

* blockquotes and math

* line breaks

* best practices

* fix link

* reviewer feedback
2025-06-26 13:51:35 -07:00

214 lines
5.1 KiB
Plaintext

---
title: "Headers and text"
description: "Learn how to format text, create headers, and style content"
icon: "heading"
---
## Headers
Headers organize your content and create navigation anchors. They appear in the table of contents and help users scan your documentation.
### Creating headers
Use `#` symbols to create headers of different levels:
```mdx
## Main section header
### Subsection header
#### Sub-subsection header
```
<Tip>
Use descriptive, keyword-rich headers that clearly indicate the content that follows. This improves both user navigation and search engine optimization.
</Tip>
## Text formatting
We support most Markdown formatting for emphasizing and styling text.
### Basic formatting
Apply these formatting styles to your text:
| Style | Syntax | Example | Result |
|-------|--------|---------|--------|
| **Bold** | `**text**` | `**important note**` | **important note** |
| *Italic* | `_text_` | `_emphasis_` | *emphasis* |
| ~~Strikethrough~~ | `~text~` | `~deprecated feature~` | ~~deprecated feature~~ |
### Combining formats
You can combine formatting styles:
```mdx
**_bold and italic_**
**~~bold and strikethrough~~**
*~~italic and strikethrough~~**
```
**_bold and italic_**<br />
**~~bold and strikethrough~~**<br />
*~~italic and strikethrough~~*
### Superscript and subscript
For mathematical expressions or footnotes, use HTML tags:
| Type | Syntax | Example | Result |
|------|--------|---------|--------|
| Superscript | `<sup>text</sup>` | `example<sup>2</sup>` | example<sup>2</sup> |
| Subscript | `<sub>text</sub>` | `example<sub>n</sub>` | example<sub>n</sub> |
## Links
Links help users navigate between pages and access external resources. Use descriptive link text to improve accessibility and user experience.
### Internal links
Link to other pages in your documentation using root-relative paths:
```mdx
[Quickstart](/quickstart)
[Steps](/components/steps)
```
[Quickstart](/quickstart)<br />
[Steps](/components/steps)
<Note>
Avoid relative links like `[page](../page)` as they load slower and cannot be optimized as effectively as root-relative links.
</Note>
### External links
For external resources, include the full URL:
```mdx
[Markdown Guide](https://www.markdownguide.org/)
```
[Markdown Guide](https://www.markdownguide.org/)
### Broken links
You can check for broken links in your documentation using the [CLI](/installation):
```bash
mint broken-links
```
## Blockquotes
Blockquotes highlight important information, quotes, or examples within your content.
### Single line blockquotes
Add `>` before text to create a blockquote:
```mdx
> This is a quote that stands out from the main content.
```
> This is a quote that stands out from the main content.
### Multi-line blockquotes
For longer quotes or multiple paragraphs:
```mdx
> This is the first paragraph of a multi-line blockquote.
>
> This is the second paragraph, separated by an empty line with `>`.
```
> This is the first paragraph of a multi-line blockquote.
>
> This is the second paragraph, separated by an empty line with `>`.
<Tip>
Use blockquotes sparingly to maintain their visual impact and meaning. Consider using [callouts](/components/callouts) for notes, warnings, and other information.
</Tip>
## Mathematical expressions
We support LaTeX for rendering mathematical expressions and equations.
### Inline math
Use single dollar signs, `$`, for inline mathematical expressions:
```mdx
The Pythagorean theorem states that $(a^2 + b^2 = c^2)$ in a right triangle.
```
The Pythagorean theorem states that $(a^2 + b^2 = c^2)$ in a right triangle.
### Block equations
Use double dollar signs, `$$`, for standalone equations:
```mdx
$$
E = mc^2
$$
```
$$
E = mc^2
$$
<Info>
LaTeX support requires proper mathematical syntax. Refer to the [LaTeX documentation](https://www.latex-project.org/help/documentation/) for comprehensive syntax guidelines.
</Info>
## Line breaks and spacing
Control spacing and line breaks to improve content readability.
### Paragraph breaks
Separate paragraphs with blank lines:
```mdx
This is the first paragraph.
This is the second paragraph, separated by a blank line.
```
This is the first paragraph.
This is the second paragraph, separated by a blank line.
### Manual line breaks
Use HTML `<br />` tags for forced line breaks within paragraphs:
```mdx
This line ends here.<br />
This line starts on a new line.
```
This line ends here.<br />
This line starts on a new line.
<Tip>
In most cases, paragraph breaks with blank lines provide better readability than manual line breaks.
</Tip>
## Best practices
### Content organization
- Use headers to create clear content hierarchy
- Follow proper header hierarchy (don't skip from H2 to H4)
- Write descriptive, keyword-rich header text
### Text formatting
- Use bold for emphasis, not for entire paragraphs
- Reserve italics for terms, titles, or subtle emphasis
- Avoid over-formatting that distracts from content
### Links
- Write descriptive link text instead of "click here" or "read more"
- Use root-relative paths for internal links
- Test links regularly to prevent broken references