π₯ Make videos programmatically with React
fix: inline code titles and use bash instead of console
Frenco2e990eca4247
diff --git a/packages/docs/docs/audio-visualization.md b/packages/docs/docs/audio-visualization.mdindex 47269cfd57..5701735b5c 100644--- a/packages/docs/docs/audio-visualization.md+++ b/packages/docs/docs/audio-visualization.md@@ -9,7 +9,9 @@ Using the audio visualization APIs in Remotion 2.0, you can create animations baYou can import an audio file using an `import` statement:-```tsx+```ts twoslash+import {Audio} from 'remotion'+// ---cut---import audio from './audio.mp3'```diff --git a/packages/docs/docs/dynamic-import.md b/packages/docs/docs/dynamic-import.mdindex a2c9222ebc..6fec280e91 100644--- a/packages/docs/docs/dynamic-import.md+++ b/packages/docs/docs/dynamic-import.md@@ -11,7 +11,7 @@ This can become an unexpected hurdle in Webpack. On this page we collect some tiConsider you have a PNG sequence of images with the following file structure:-```+```bashmy-video/ββ src/β ββ assets/@@ -35,7 +35,7 @@ export const DynamicImports: React.FC = () => {};```-```console+```bashError: Cannot find module './image0.png'```diff --git a/packages/docs/docs/env-variables.md b/packages/docs/docs/env-variables.mdindex 784823a342..849cb783d9 100644--- a/packages/docs/docs/env-variables.md+++ b/packages/docs/docs/env-variables.md@@ -13,7 +13,7 @@ If you want to pass an environment variable from the CLI, you need to prefix itYou can pass environment variables in development mode and while rendering. For example:-```console+```bashREMOTION_MY_VAR=hello_world npm start```@@ -25,7 +25,7 @@ In your project, you can access the variable using `process.env.REMOTION_MY_VAR`For example, if your file contains-```dotenv+```ini title=".env"MY_VAR=helloANOTHER_VAR=world```diff --git a/packages/docs/docs/get-compositions.md b/packages/docs/docs/get-compositions.mdindex 02002deeec..cab2fb6488 100644--- a/packages/docs/docs/get-compositions.md+++ b/packages/docs/docs/get-compositions.md@@ -42,21 +42,21 @@ An already open Puppeteer [`Browser`](https://pptr.dev/#?product=Puppeteer&versiReturns a promise that resolves to an array of available compositions. Example value:-```json+```ts twoslash[{- "id": "HelloWorld",- "width": 1920,- "height": 1080,- "fps": 30+ id: "HelloWorld",+ width: 1920,+ height: 1080,+ fps: 30,},{- "id": "Title",- "width": 1080,- "height": 1080,- "fps": 30- }-]+ id: "Title",+ width: 1080,+ height: 1080,+ fps: 30,+ },+];```## See alsodiff --git a/packages/docs/docs/get-input-props.md b/packages/docs/docs/get-input-props.mdindex 12c3b00b31..6b2d4f38ab 100644--- a/packages/docs/docs/get-input-props.md+++ b/packages/docs/docs/get-input-props.md@@ -17,7 +17,7 @@ This method is not available when inside a Remotion Player. Instead, get the proPass in a [parseable](/docs/cli) JSON representation using the `--props` flag to either `remotion preview` or `remotion render`:-```console+```bashnpx remotion render --props='{"hello": "world"}' src/index.tsx my-composition out.mp4```diff --git a/packages/docs/docs/gif.md b/packages/docs/docs/gif.mdindex 87b2fdea0e..5d756170a5 100644--- a/packages/docs/docs/gif.md+++ b/packages/docs/docs/gif.md@@ -6,7 +6,7 @@ title: "@remotion/gif"You can install this package from NPM to get a component for displaying GIFs that synchronize with Remotions [`useCurrentFrame()`](use-current-frame).-```console+```bashnpm i @remotion/gif```diff --git a/packages/docs/docs/legacy-babel-loader.md b/packages/docs/docs/legacy-babel-loader.mdindex f0459e5ec6..d2cb51439e 100644--- a/packages/docs/docs/legacy-babel-loader.md+++ b/packages/docs/docs/legacy-babel-loader.md@@ -13,15 +13,11 @@ This should not be necessary in general, it is encouraged to [report issues](htt## Example-`console`--```+```bash title="Console"npm i @remotion/babel-loader```-`remotion.config.ts`--```ts twoslash+```ts twoslash title="remotion.config.ts"import {Config} from 'remotion'// ---cut---import {replaceLoadersWithBabel} from '@remotion/babel-loader';diff --git a/packages/docs/docs/register-root.md b/packages/docs/docs/register-root.mdindex 2739cf1164..d0da2e52d6 100644--- a/packages/docs/docs/register-root.md+++ b/packages/docs/docs/register-root.md@@ -11,9 +11,7 @@ The list of compositions can be updated without reloading the page, but calling## Example-`index.ts`--```tsx twoslash+```tsx twoslash title="index.ts"// @filename: ./Video.tsxexport const RemotionVideo = () => <></>;@@ -25,9 +23,7 @@ import {RemotionVideo} from './Video';registerRoot(RemotionVideo);```-`Video.tsx`--```tsx twoslash+```tsx twoslash title="Video.tsx"// @allowUmdGlobalAccess// @filename: MyComponent.tsxexport default () => <></>diff --git a/packages/docs/docs/timeout.md b/packages/docs/docs/timeout.mdindex a03f51e008..66da07fcea 100644--- a/packages/docs/docs/timeout.md+++ b/packages/docs/docs/timeout.md@@ -5,7 +5,7 @@ title: Puppeteer timeoutThe following error:-```console+```bashTimeoutError: waiting for function failed: timeout 30000ms exceeded```diff --git a/packages/docs/docs/transparent-videos.mdx b/packages/docs/docs/transparent-videos.mdxindex 0ad1441cf8..685f59d938 100644--- a/packages/docs/docs/transparent-videos.mdx+++ b/packages/docs/docs/transparent-videos.mdx@@ -44,7 +44,7 @@ Config.Output.setCodec('vp8');You can also set the settings on the command line:-```console+```bash--image-format=png --pixel-format=yuva420p --codec=vp8```@@ -66,7 +66,7 @@ Config.Output.setProResProfile('4444');You can also set the settings on the command line:-```console+```bash--image-format=png --pixel-format=yuva444p10le --codec=prores --prores-profile=4444```diff --git a/packages/docs/docs/using-fonts.md b/packages/docs/docs/using-fonts.mdindex cabe8b9e91..8ee964c72e 100644--- a/packages/docs/docs/using-fonts.md+++ b/packages/docs/docs/using-fonts.md@@ -7,15 +7,11 @@ You can use fonts by loading them in a CSS file using @font-face. Web fonts ofte## Example using Google Web Fonts-`font.css`:--```css+```css title="font.css"@import url("https://fonts.googleapis.com/css2?family=Bangers");```-`MyComp.tsx`:--```tsx twoslash+```tsx twoslash title="MyComp.tsx"import './font.css'const MyComp: React.FC = () => {@@ -31,9 +27,7 @@ Google Web Fonts by default appends `?display=swap` to their URLs. Make sure to## Example using local fonts-`font.css`:--```css+```css title="font.css"@font-face {font-family: "Bangers";font-style: normal;@@ -42,9 +36,7 @@ Google Web Fonts by default appends `?display=swap` to their URLs. Make sure to}```-`MyComp.tsx`:--```tsx twoslash+```tsx twoslash title="MyComp.tsx"import './font.css'const MyComp: React.FC = () => {