mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
feat(v2): support for adding relative images and handling broken image links (#3069)
* all relative path in image url * throw error if file doesn't present * better error * add @docusaurus/core to deps * fix test
This commit is contained in:
parent
15e73daae7
commit
3155dc30dc
15 changed files with 162 additions and 4 deletions
|
@ -959,8 +959,11 @@ You can use images by requiring them and using an image tag through MDX:
|
|||
# My markdown page
|
||||
|
||||
<img src={require('./assets/docusaurus-asset-example-banner.png').default} />
|
||||
```
|
||||
|
||||
or
|
||||
|
||||

|
||||
```
|
||||
The ES imports syntax also works:
|
||||
|
||||
```mdx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue