Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions create/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords: ["code blocks", "syntax highlighting", "code styling"]

## Add code samples

You can add inline code snippets or code blocks. Code blocks support meta options for syntax highlighting, titles, line highlighting, icons, and more.
_You can add inline code snippets or code blocks. Code blocks support meta options for syntax highlighting, titles, line highlighting, icons, and more._

### Inline code

Expand Down Expand Up @@ -143,7 +143,6 @@ class HelloWorld {
}
}
```

</Accordion>

### Twoslash
Expand All @@ -152,7 +151,7 @@ In JavaScript and TypeScript code blocks, use `twoslash` to enable interactive t

<CodeGroup>

```ts twoslash Twoslash example
```ts Twoslash example twoslash
type Pet = "cat" | "dog" | "hamster";

function adoptPet(name: string, type: Pet) {
Expand Down Expand Up @@ -235,7 +234,7 @@ Highlight specific lines in your code blocks using `highlight` with the line num

<CodeGroup>

```javascript Line highlighting example {1,2,5}
```javascript Line highlighting example highlight={1-2,5}
const greeting = "Hello, World!";
function sayHello() {
console.log(greeting);
Expand All @@ -261,7 +260,7 @@ Focus on specific lines in your code blocks using `focus` with line numbers or r

<CodeGroup>

```javascript Line focusing example focus=2,4,5
```javascript Line focusing example focus={2,4-5}
const greeting = "Hello, World!";
function sayHello() {
console.log(greeting);
Expand Down Expand Up @@ -454,9 +453,9 @@ Add `[!code ++]` or `[!code --]` inside a comment at the end of a line to mark i

| Language | Added | Removed |
| --- | --- | --- |
| JavaScript, TypeScript, Java, C, C++, Go, Rust | `// [!code ++]` | `// [!code --]` |
| JavaScript, TypeScript, Java, C, C\+\+, Go, Rust | `// [!code ++]` | `// [!code --]` |
| Python, Ruby, Bash, YAML | `# [!code ++]` | `# [!code --]` |
| HTML, XML | `<!-- [!code ++] -->` | `<!-- [!code --] -->` |
| HTML, XML | `{/* [!code ++] */}` | `{/* [!code --] */}` |
| CSS | `/* [!code ++] */` | `/* [!code --] */` |
| SQL, Lua | `-- [!code ++]` | `-- [!code --]` |

Expand All @@ -478,8 +477,8 @@ sayHello();

```python Python diff lines
def greet():
print("Hello, World!") # [!code --]
print("Hello, Mintlify!") # [!code ++]
print("Hello, World!") # [!code --]
print("Hello, Mintlify!") # [!code ++]

greet()
```
Expand All @@ -498,8 +497,8 @@ sayHello();
````text Python format
```python Python diff lines
def greet():
print("Hello, World!") # [!code --]
print("Hello, Mintlify!") # [!code ++]
print("Hello, World!") // [!code --]
print("Hello, Mintlify!") // [!code ++]

greet()
```
Expand All @@ -522,8 +521,7 @@ Use the `<CodeBlock>` component in custom React components to programmatically r
</ResponseField>

<ResponseField name="icon" type="string">
The icon to display in the code block header. See [Icons](/components/icons)
for available options.
The icon to display in the code block header. See [Icons](/components/icons) for available options.
</ResponseField>

<ResponseField name="lines" type="boolean">
Expand All @@ -539,13 +537,11 @@ Use the `<CodeBlock>` component in custom React components to programmatically r
</ResponseField>

<ResponseField name="highlight" type="string">
The lines to highlight. Provide a stringified array of numbers. Example:
`"[1,3,4,5]"`.
The lines to highlight. Provide a stringified array of numbers. Example: `"[1,3,4,5]"`.
</ResponseField>

<ResponseField name="focus" type="string">
The lines to focus on. Provide a stringified array of numbers. Example:
`"[1,3,4,5]"`.
The lines to focus on. Provide a stringified array of numbers. Example: `"[1,3,4,5]"`.
</ResponseField>

### Example
Expand All @@ -570,4 +566,4 @@ export const CustomCodeBlock = ({
</CodeBlock>
);
};
```
```
48 changes: 26 additions & 22 deletions create/text.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
title: "Format text"
description: "Format text in your documentation with Markdown headings, bold, italic, links, blockquotes, and other inline styling options in MDX pages."
keywords: ["Markdown formatting", "text styling", "headings", "anchor links", "custom heading IDs"]
keywords: ["Markdown formatting", "text styling", "headers", "anchor links", "custom heading IDs"]
---

## Headings

Headings organize your content and create navigation anchors. They appear in the table of contents and help users scan your documentation.

### Create headings
# 123

Use `#` symbols to create headings of different levels:
### Create headings hello

Use `#` symbols to create heaasdasddings of different levels:asd

Check warning on line 15 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L15

Did you really mean 'heaasdasddings'?

```mdx
## Main section heading
Expand All @@ -24,7 +26,7 @@
Use descriptive, keyword-rich headings that clearly indicate the content that follows. This improves both user navigation and search engine optimization.
</Tip>

### Custom heading IDs
### Custom heading IDsasd

Check warning on line 29 in create/text.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

create/text.mdx#L29

Did you really mean 'IDsasd'?

By default, Mintlify generates anchor IDs automatically from heading text. You can override the generated ID with a custom one using the `{#custom-id}` syntax:

Expand Down Expand Up @@ -69,9 +71,9 @@
Apply these formatting styles to your text:

| Style | Syntax | Example | Result |
|-------|--------|---------|--------|
| --- | --- | --- | --- |
| **Bold** | `**text**` | `**important note**` | **important note** |
| *Italic* | `_text_` | `_emphasis_` | *emphasis* |
| _Italic_ | `_text_` | `_emphasis_` | _emphasis_ |
| ~~Strikethrough~~ | `~text~` | `~deprecated feature~` | ~~deprecated feature~~ |

### Combine formats
Expand All @@ -84,16 +86,16 @@
*~~italic and strikethrough~~*
```

**_bold and italic_**<br />
**~~bold and strikethrough~~**<br />
*~~italic and strikethrough~~*
**_bold and italic_**\
**~~bold and strikethrough~~**\
_~~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> |

Expand All @@ -110,9 +112,8 @@
[Steps](/components/steps)
```

[Quickstart](/quickstart)<br />
[Steps](/components/steps)

[Quickstart](/quickstart)\
[Steps](/components/steps)

### External links

Expand Down Expand Up @@ -223,8 +224,8 @@
This line starts on a new line.
```

This line ends here.<br />
This line starts on a new line.
This line ends here.\
This line starts on a new line.

<Tip>
In most cases, paragraph breaks with blank lines provide better readability than manual line breaks.
Expand Down Expand Up @@ -266,18 +267,18 @@
```

<Warning>
HTML-style `<!-- ... -->` comments are not supported in MDX. Always use `{/* ... */}`.
HTML-style `{/* ... */}` comments are not supported in MDX. Always use `{/* ... */}`.
</Warning>

## Escape special characters

MDX treats `{` and `}` as the start and end of JSX expressions, and `<` as the start of a JSX tag. When you want these characters to render as literal text, escape them so MDX does not try to parse them.

| Character | How to escape |
| :--- | :--- |
| `{` and `}` | Wrap the character in backticks (`` `{` ``), use the HTML entity (`&#123;` for `{`, `&#125;` for `}`), or write it inside a JSX expression as a string (`{'{'}`). |
| `<` | Wrap in backticks (`` `<` ``), use the HTML entity `&lt;`, or write `{'<'}`. |
| `` ` `` | Use a backslash (`` \` ``). |
| :-- | :-- |
| `{` and `}` | Wrap the character in backticks (``{``), use the HTML entity (`&#123;` for `{`, `&#125;` for `}`), or write it inside a JSX expression as a string (`{'{'}`). |
| `<` | Wrap in backticks (``<``), use the HTML entity `&lt;`, or write `{'<'}`. |
| ``` | Use a backslash (`\``). |
| `\` | Use a double backslash (`\\`). |

```mdx Escape examples
Expand All @@ -288,21 +289,24 @@
In JSX, write {'{ key: value }'} to display a literal object.
```

Inside fenced code blocks (```` ``` ````), MDX does not parse curly braces, so you can write `{variable}` directly without escaping. Escaping is only required in regular prose and inside JSX attributes.
Inside fenced code blocks (`````), MDX does not parse curly braces, so you can write `{variable}` directly without escaping. Escaping is only required in regular prose and inside JSX attributes.

## Best practices

### Content organization

- Use headings to create clear content hierarchy
- Follow proper heading hierarchy (don't skip from H2 to H4)
- Write descriptive, keyword-rich heading 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
- Test links regularly to prevent broken references
7 changes: 6 additions & 1 deletion customize/custom-domain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
keywords: ["custom domain setup", "DNS configuration", "CNAME records", "TLS certificates"]
---

<Card title="Editor is solved" icon="sparkles">
Make chagnes in Editor. They appear in live site

Check warning on line 8 in customize/custom-domain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L8

Did you really mean 'chagnes'?
</Card>

To host your documentation on a custom domain:

1. Add your domain in your dashboard.
2. Configure DNS settings on your domain provider.
3. Allow time for DNS to propagate and TLS certificates to be automatically provisioned.
Expand Down Expand Up @@ -140,4 +145,4 @@
"canonical": "https://docs.mintlify.com"
}
}
```
```
35 changes: 33 additions & 2 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,39 @@
"icon": "rocket",
"boost": 2,
"pages": [
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"untitled-page",
"index",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"ai-native",
"quickstart",
{
"group": "CLI",
Expand All @@ -40,8 +72,7 @@
"cli/preview",
"cli/commands"
]
},
"ai-native"
}
]
},
{
Expand Down
55 changes: 26 additions & 29 deletions index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,32 @@ export const HeroCard = ({ filename, title, description, href }) => {
);
};

export const HeroCard = ({ filename, title, description, href }) => {
return (
<a className="group cursor-pointer pb-8" href={href}>
<img
src={`https://raw.githubusercontent.com/mintlify/docs/refs/heads/main/images/hero/${filename}.png`}
className="block dark:hidden pointer-events-none group-hover:scale-105 transition-all duration-100"
/>
<img
src={`https://raw.githubusercontent.com/mintlify/docs/refs/heads/main/images/hero/${filename}-dark.png`}
className="pointer-events-none group-hover:scale-105 transition-all duration-100 hidden dark:block"
/>
<h3 className="mt-5 text-gray-900 dark:text-zinc-50 font-medium">
{title}
</h3>
<span className="mt-1.5">{description}</span>
</a>
);
};

{/* vale Mintlify.Semicolons = YES */}

<div className="relative">
<div className="absolute -top-14 left-0 right-0 opacity-80">
<img
src="/images/hero/background-light.svg"
className="block dark:hidden pointer-events-none w-full h-auto"
alt="Decorative background image."
/>
<img
src="/images/hero/background-dark.svg"
className="hidden dark:block pointer-events-none w-full h-auto"
alt="Decorative background image."
/>
<img src="/images/hero/background-light.svg" className="block dark:hidden pointer-events-none w-full h-auto" alt="Decorative background image." />

<img src="/images/hero/background-dark.svg" className="hidden dark:block pointer-events-none w-full h-auto" alt="Decorative background image." />
</div>

<div className="relative z-10 px-4 py-16 lg:py-48 lg:pb-24 max-w-3xl mx-auto">
Expand All @@ -55,26 +67,11 @@ export const HeroCard = ({ filename, title, description, href }) => {
<div className="px-6 lg:px-0 mt-12 lg:mt-24 grid sm:grid-cols-2 gap-x-6 gap-y-4">
<HeroCard filename="rocket" title="Quickstart" description="Deploy your first docs site in minutes with our step-by-step guide" href="/quickstart" />

<HeroCard
filename="cli"
title="CLI installation"
description="Install the CLI to preview and develop your docs locally"
href="/installation"
/>
<HeroCard filename="cli" title="CLI installation" description="Install the CLI to preview and develop your docs locally" href="/installation" />

<HeroCard
filename="editor"
title="Web editor"
description="Make quick updates and manage content with our browser-based editor"
href="/editor/index"
/>
<HeroCard filename="editor" title="Web editor" description="Make quick updates and manage content with our browser-based editor" href="/editor/index" />

<HeroCard
filename="components"
title="Components"
description="Build rich, interactive documentation with our ready-to-use components"
href="/components/accordions"
/>
<HeroCard filename="components" title="Components" description="Build rich, interactive documentation with our ready-to-use components" href="/components/accordions" />
</div>
</div>
</div>
</div>
Loading
Loading