You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Download assets like PDFs directly from your documentation"
4
+
---
5
+
6
+
The `<Download>` component lets users download assets like PDFs directly from your documentation.
7
+
8
+
<Info>
9
+
For information on how to embed assets, check out the documentation on [Images](/learn/docs/writing-content/markdown#images), [PDFs](/learn/docs/writing-content/markdown#pdfs), and [Videos](/learn/docs/writing-content/markdown#videos).
Copy file name to clipboardExpand all lines: fern/products/docs/pages/component-library/writing-content/markdown.mdx
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ Read the [Introduction](/learn/overview/introduction).
67
67
68
68
## Images
69
69
70
-
You can use locally stored images or URLs to include images in your Markdown pages. Use either [Markdown syntax](https://www.markdownguide.org/basic-syntax/#images-1) or the [`<img>` HTML tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) to insert the image.
70
+
You can use locally stored images or URLs to include images in your Markdown pages. Use either [Markdown syntax](https://www.markdownguide.org/basic-syntax/#images-1) or the [`<img>` HTML tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) to insert the image. Don't use the `<embed>` element, as it has inconsistent browser support.
71
71
72
72
<Info title="Image paths">
73
73
You can reference images using paths relative to the page's location (using `./` or `../`) or relative to the `fern` folder root (using `/`). For example, an image at `fern/assets/images/logo.png` can be referenced from any page as `/assets/images/logo.png`.
@@ -108,21 +108,26 @@ Common image attributes:
108
108
For more details about the HTML image element and its attributes, see the [MDN documentation on the img element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img).
109
109
</Note>
110
110
111
-
## Embedding local assets
111
+
## PDFs
112
112
113
-
You can embed local assets in your Markdown pages using the [`<embed>` component](/learn/docs/content/components/embed). This is useful for displaying PDFs, images, videos, OpenAPI files, and other assets into your docs.
113
+
Embed PDFs using the `<iframe>` element. Don't use the `<embed>` element, as it has inconsistent browser support.
114
114
115
-
For example, to embed a video, use the following Markdown:
You can embed videos in your documentation using the HTML `<video>` tag. This gives you control over video playback settings like autoplay, looping, and muting.
130
+
You can embed videos in your documentation using the HTML `<video>` tag. This gives you control over video playback settings like autoplay, looping, and muting. Don't use the `<embed>` element, as it has inconsistent browser support.
For more details about the HTML video element and its attributes, see the [MDN documentation on the video element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video).
190
195
</Note>
191
196
192
-
## Embed YouTube or Loom videos
197
+
### Embed YouTube or Loom videos
193
198
194
199
You can embed videos from YouTube, Loom, Vimeo, and other streaming platforms using an `<iframe>` element.
0 commit comments