Skip to content
Merged
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
29 changes: 29 additions & 0 deletions components/files.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "Files"
description: "Serve static assets from your documentation"
icon: "folder"
---

Mintlify automatically serves static assets from your documentation repository at the appropriate path on your domain. For example, if you have `/images/my-logo.png` in your repo, the image file is available at `https://docs.your-project.com/images/my-logo.png`.

This works for any file type you want to make available to your users, including images, PDFs, videos, or schemas.

Check warning on line 9 in components/files.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

components/files.mdx#L9

Did you really mean 'PDFs'?

Files must be less than 20 MB for images and 100 MB for other file types.

## File organization

Organize your files using folders to keep your repository easy to navigate:

```text
/your-project
|- docs.json
|- images/
|- logo.png
|- screenshots/
|- dashboard.png
|- assets/
|- whitepaper.pdf
|- demo-video.mp4
```

Files are served from the root of your domain, so the structure in your repository directly maps to the URL structure. From the previous example, `assets/whitepaper.pdf` would be available at `https://docs.your-project.com/assets/whitepaper.pdf`.

Check warning on line 29 in components/files.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

components/files.mdx#L29

In general, use active voice instead of passive voice ('are served').
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"pages": [
"text",
"image-embeds",
"components/files",
"list-table",
"code",
"reusable-snippets",
Expand Down
2 changes: 0 additions & 2 deletions image-embeds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

Add images, embed videos, and include interactive content with iframes to your documentation.

All static assets in your docs repository are automatically served at the appropriate path on your domain. For example, if you have `/images/my-logo.png` in your repo, the image will be available at `https://docs.yoursite.com/images/my-logo.png`.

<Frame>
<img
className="rounded-xl"
Expand All @@ -29,12 +27,12 @@
```

<Tip>
Always include descriptive alt text to improve accessibility and SEO. The alt text should clearly describe what the image shows.

Check warning on line 30 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L30

Spell out 'SEO', if it's unfamiliar to the audience.
</Tip>

Image files must be less than 20 MB. For larger files, host them on a CDN service like [Amazon S3](https://aws.amazon.com/s3) or [Cloudinary](https://cloudinary.com).

Check warning on line 33 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L33

Spell out 'CDN', if it's unfamiliar to the audience.

### HTML image embeds

Check warning on line 35 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L35

'HTML image embeds' should use sentence-style capitalization.

For more control over image display, use HTML `<img>` tags:

Expand All @@ -47,9 +45,9 @@
/>
```

#### Disable zoom functionality

Check warning on line 48 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L48

Use 'capability' or 'feature' instead of 'functionality'.

To disable the default zoom on click for images, add the `noZoom` property:

Check warning on line 50 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L50

Use 'turn off' or 'off' instead of 'disable'.

```html highlight="4"
<img
Expand All @@ -76,7 +74,7 @@
```

<Note>
Images within anchor tags automatically display a pointer cursor to indicate they are clickable.

Check warning on line 77 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L77

Use 'they're' instead of 'they are'.
</Note>

#### Light and dark mode images
Expand Down Expand Up @@ -128,7 +126,7 @@
src="https://www.youtube.com/embed/4KzFe50RQkQ"
title="YouTube video player"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"

Check warning on line 129 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L129

Use semicolons judiciously.

Check warning on line 129 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L129

Use semicolons judiciously.

Check warning on line 129 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L129

Use semicolons judiciously.

Check warning on line 129 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L129

Use semicolons judiciously.

Check warning on line 129 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L129

Use semicolons judiciously.
allowFullScreen
></iframe>
</Frame>
Expand All @@ -145,7 +143,7 @@
></video>
```

### Autoplay videos

Check warning on line 146 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L146

'Autoplay videos' should use sentence-style capitalization.

To autoplay a video, use:

Expand All @@ -164,7 +162,7 @@
When using JSX syntax, write double-word attributes in camelCase: `autoPlay`, `playsInline`, `allowFullScreen`.
</Note>

## iframes

Check warning on line 165 in image-embeds.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

image-embeds.mdx#L165

'iframes' should use sentence-style capitalization.

Embed external content using iframe elements:

Expand Down