How to Add an Image
Add a new image to C-CORE docs site!
#
Save image to the static folderPlace the image file in the docs/static/img/
folder.
mdx
component#
Add image as a First, import the useBaseUrl
function at the top of the doc, just after the metadata. This functions helps assure the url is correct after Docusaurus performs various optimizations at build.
---id: add-image-tutorialtitle: How to Add an Imagesidebar_label: How to Add an Image--- import useBaseUrl from '@docusaurus/useBaseUrl'
Then, add an image component.
---id: add-image-tutorialtitle: How to Add an Imagesidebar_label: How to Add an Image--- import useBaseUrl from '@docusaurus/useBaseUrl'
<img alt="Tokyo turnips" src={useBaseUrl('img/tokyo-turnips.jpg')} />