Use useBaseUrl for .mdx docs

This commit is contained in:
Marc Rousavy 2021-03-04 17:02:14 +01:00
parent 012712da9d
commit 79c5c0717e
7 changed files with 25 additions and 11 deletions

View File

@ -4,10 +4,12 @@ title: Zooming with Reanimated
sidebar_label: Zooming with Reanimated
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="283" height="535" style={{ float: 'right' }}>
<image href="../img/demo.gif" x="18" y="33" width="247" height="469" />
<image href="../img/frame.png" width="283" height="535" />
<image href={useBaseUrl("img/demo.gif")} x="18" y="33" width="247" height="469" />
<image href={useBaseUrl("img/frame.png")} width="283" height="535" />
</svg>
</div>

View File

@ -4,10 +4,12 @@ title: Camera Devices
sidebar_label: Camera Devices
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="283" height="535" style={{ float: 'right' }}>
<image href="../img/demo.gif" x="18" y="33" width="247" height="469" />
<image href="../img/frame.png" width="283" height="535" />
<image href={useBaseUrl("img/demo.gif")} x="18" y="33" width="247" height="469" />
<image href={useBaseUrl("img/frame.png")} width="283" height="535" />
</svg>
</div>

View File

@ -4,8 +4,10 @@ title: Camera Errors
sidebar_label: Camera Errors
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<div>
<img align="right" width="35%" src="../img/example_error.png" />
<img align="right" width="35%" src={useBaseUrl("img/example_error.png")} />
</div>
## Why?

View File

@ -4,8 +4,10 @@ title: Camera Formats
sidebar_label: Camera Formats
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<div>
<img align="right" width="35%" src="../img/example.png" />
<img align="right" width="35%" src={useBaseUrl("img/example.png")} />
</div>
### What are camera formats?

View File

@ -4,6 +4,8 @@ title: Frame Processors
sidebar_label: Frame Processors
---
import useBaseUrl from '@docusaurus/useBaseUrl';
:::warning
FRAME PROCESSORS ARE STILL WORK IN PROGRESS - SEE [#2](https://github.com/cuvent/react-native-vision-camera/pull/2)
:::
@ -11,8 +13,8 @@ FRAME PROCESSORS ARE STILL WORK IN PROGRESS - SEE [#2](https://github.com/cuvent
<!-- TODO: Demo of QR code scanning or smth -->
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="283" height="535" style={{ float: 'right' }}>
<image href="../img/demo.gif" x="18" y="33" width="247" height="469" />
<image href="../img/frame.png" width="283" height="535" />
<image href={useBaseUrl("img/demo.gif")} x="18" y="33" width="247" height="469" />
<image href={useBaseUrl("img/frame.png")} width="283" height="535" />
</svg>
</div>
@ -23,7 +25,7 @@ Frame processors are functions that are written in JavaScript (or TypeScript) wh
For example, you might want to create a QR code scanner _without ever writing native code while still achieving almost-native performance_. Since you can write the scanning part yourself, you can implement a custom QR code system like the one Snapchat uses for Snap-codes.
<div align="center">
<img src="../img/snap-code.png" width="15%" />
<img src={useBaseUrl("img/snap-code.png")} width="15%" />
</div>
<br />

View File

@ -5,8 +5,10 @@ sidebar_label: Getting Started
slug: /
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<div>
<img align="right" width="35%" src="../img/example_intro.png" />
<img align="right" width="35%" src={useBaseUrl("img/example_intro.png")} />
</div>
## Installing the library

View File

@ -4,8 +4,10 @@ title: Troubleshooting
sidebar_label: Troubleshooting
---
import useBaseUrl from '@docusaurus/useBaseUrl';
<div>
<img align="right" width="35%" src="../img/11_back.png" />
<img align="right" width="35%" src={useBaseUrl("img/11_back.png")} />
</div>
Before opening an issue, make sure you try the following: