Skip to content

🎥 Make videos programmatically with React

Docs: Remove "simple mode"

Jonny Burgera6d9af21c108
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index af9114add9..cf4f72d9a4 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -14,7 +14,7 @@ The **package name** for each folder is `@remotion/[folder-name]`, except for th
Any new features or settings should be documented in the `packages/docs` folder.
-- Add new pages to the sidebar: `packages/docs/sidebars.js`.
+- Add new pages to the sidebar: `packages/docs/sidebars.ts`.
- When creating a new page or duplicating an existing page, don't add the `image:` tag to the frontmatter at first. Instead, run `cd package/docs && bun render-cards.mjs` afterwards to generate and automatically add the `image:` tag. Commit the created image and the changed frontmatter.
- Usually, there is a TableOfContents.tsx file in the folder of the documentaiton for the package. Add it there as well if there is a table of contents.
diff --git a/package.json b/package.json
index 1786456d4b..341a78d8ea 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
},
"pnpm": {
"overrides": {
- "caniuse-lite": "1.0.30001690"
+ "caniuse-lite": "1.0.30001724"
}
},
"devDependencies": {
diff --git a/packages/docs/docs/contributing/docs.mdx b/packages/docs/docs/contributing/docs.mdx
index 417eaabf5f..9e44831b84 100644
--- a/packages/docs/docs/contributing/docs.mdx
+++ b/packages/docs/docs/contributing/docs.mdx
@@ -16,34 +16,13 @@ At the bottom of each page, the `Improve this page` button is the easiest way to
## Submitting a new page
-<Tabs
-defaultValue="quick"
-values={[
-{ label: 'Basic setup (quicker)', value: 'quick', },
-{ label: 'Full docs', value: 'full', },
-]
-}>
-<TabItem value="quick">
-
-This method will avoid having to compile all docs. You cannot validate if links to other docs are valid.
-
-<Step>1</Step> Set up the Remotion repository <a href="/docs/contributing">according to the instructions here</a>. <br/>
-<Step>2</Step> Run <code>node new-doc.mjs</code> and follow the instructions.<br/>
-
- </TabItem>
-
- <TabItem value="full">
<Step>1</Step> Set up the Remotion repository <a href="/docs/contributing">according the instructions here</a>. <br/>
-<Step>2</Step> Create a new <code>.md</code> document in the <code>packages/docs/docs</code> folder. <br/>
-<Step>3</Step> Add the document to <code>packages/docs/sidebars.js</code>.<br/>
+<Step>2</Step> Create a new <code>.mdx</code> document in the <code>packages/docs/docs</code> folder. <br/>
+<Step>3</Step> Add the document to <code>packages/docs/sidebars.ts</code>.<br/>
<Step>4</Step> Write what you have to say!<br/>
<Step>5</Step> Run <code>node render-cards.mjs</code> in <code>packages/docs</code> to generate preview cards that will show up if the documentation page is shared on social media.<br/>
- </TabItem>
-
-</Tabs>
-
## Language guidelines
- **Keep it brief**: Developers don't like to read, so adding too much words will lead to information being lost.
diff --git a/packages/docs/docs/player/premounting.mdx b/packages/docs/docs/player/premounting.mdx
index a4ef62778a..609d3ad6ed 100644
--- a/packages/docs/docs/player/premounting.mdx
+++ b/packages/docs/docs/player/premounting.mdx
@@ -108,7 +108,6 @@ const PremountedSequenceRefForwardingFunction: React.ForwardRefRenderFunction<
return {
...passedStyle,
opacity: active ? 0 : 1,
- // @ts-expect-error Only in the docs - it will not give a type error in a Remotion project
pointerEvents: active ? 'none' : (passedStyle?.pointerEvents ?? 'auto'),
};
}, [active, passedStyle]);
diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.ts
similarity index 73%
rename from packages/docs/docusaurus.config.js
rename to packages/docs/docusaurus.config.ts
index e5c0b2e6a2..2e9352411c 100644
--- a/packages/docs/docusaurus.config.js
+++ b/packages/docs/docusaurus.config.ts
@@ -1,9 +1,6 @@
-/**
- *
- * @param {"complete" | "new-doc"} mode
- * @returns
- */
-const config = (mode) => ({
+import type {Config} from '@docusaurus/types';
+
+const config: Config = {
title: 'Remotion | Make videos programmatically',
tagline: 'Make videos programmatically',
url: 'https://www.remotion.dev',
@@ -38,19 +35,16 @@ const config = (mode) => ({
to: '/docs',
label: 'Docs',
position: 'left',
- type: mode === 'complete' ? 'docSidebar' : 'doc',
- docId: mode === 'complete' ? undefined : 'new-doc',
- sidebarId: mode === 'complete' ? 'mainSidebar' : undefined,
+ type: 'docSidebar',
+ sidebarId: 'mainSidebar',
+ },
+ {
+ to: '/docs/api',
+ label: 'API',
+ position: 'left',
+ type: 'docSidebar',
+ sidebarId: 'apiSidebar',
},
- mode === 'complete'
- ? {
- to: '/docs/api',
- label: 'API',
- position: 'left',
- type: 'docSidebar',
- sidebarId: 'apiSidebar',
- }
- : null,
{
type: 'dropdown',
label: 'Products',
@@ -212,12 +206,10 @@ const config = (mode) => ({
label: 'Contact us',
to: 'contact',
},
- mode === 'complete'
- ? {
- label: 'Blog',
- to: 'blog',
- }
- : null,
+ {
+ label: 'Blog',
+ to: 'blog',
+ },
{
label: 'Success Stories',
to: 'success-stories',
@@ -252,15 +244,14 @@ const config = (mode) => ({
},
presets: [
[
- '@docusaurus/preset-classic',
+ 'classic',
{
gtag: {
trackingID: 'G-Z6B254S5Q4',
},
docs: {
- path: mode === 'complete' ? 'docs' : 'new-docs',
- sidebarPath:
- mode === 'complete' ? require.resolve('./sidebars.js') : undefined,
+ path: 'docs',
+ sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/remotion-dev/remotion/edit/main/packages/docs/',
showLastUpdateTime: true,
@@ -268,8 +259,6 @@ const config = (mode) => ({
blog: {
onInlineAuthors: 'ignore',
onUntruncatedBlogPosts: 'ignore',
- path:
- mode === 'complete' ? undefined : 'intentionally-not-existing-path',
showReadingTime: true,
// Please change this to your repo.
editUrl:
@@ -291,55 +280,51 @@ const config = (mode) => ({
},
],
],
- plugins:
- mode === 'complete'
- ? [
- [
- '@docusaurus/plugin-content-blog',
- {
- /**
- * Required for any multi-instance plugin
- */
- id: 'success-stories',
- /**
- * URL route for the blog section of your site.
- * *DO NOT* include a trailing slash.
- */
- routeBasePath: 'success-stories',
- /**
- * Path to data on filesystem relative to site dir.
- */
- path: './success-stories',
- blogSidebarTitle: 'Success stories',
- onUntruncatedBlogPosts: 'ignore',
- onInlineAuthors: 'ignore',
- },
- ],
- [
- '@docusaurus/plugin-content-blog',
- {
- /**
- * Required for any multi-instance plugin
- */
- id: 'learn',
- /**
- * URL route for the blog section of your site.
- * *DO NOT* include a trailing slash.
- */
- routeBasePath: 'learn',
- /**
- * Path to data on filesystem relative to site dir.
- */
- path: './learn',
- blogSidebarTitle: 'Learn',
- onUntruncatedBlogPosts: 'ignore',
- onInlineAuthors: 'ignore',
- },
- ],
- './route-plugin',
- ]
- : [],
-});
+ plugins: [
+ [
+ '@docusaurus/plugin-content-blog',
+ {
+ /**
+ * Required for any multi-instance plugin
+ */
+ id: 'success-stories',
+ /**
+ * URL route for the blog section of your site.
+ * *DO NOT* include a trailing slash.
+ */
+ routeBasePath: 'success-stories',
+ /**
+ * Path to data on filesystem relative to site dir.
+ */
+ path: './success-stories',
+ blogSidebarTitle: 'Success stories',
+ onUntruncatedBlogPosts: 'ignore',
+ onInlineAuthors: 'ignore',
+ },
+ ],
+ [
+ '@docusaurus/plugin-content-blog',
+ {
+ /**
+ * Required for any multi-instance plugin
+ */
+ id: 'learn',
+ /**
+ * URL route for the blog section of your site.
+ * *DO NOT* include a trailing slash.
+ */
+ routeBasePath: 'learn',
+ /**
+ * Path to data on filesystem relative to site dir.
+ */
+ path: './learn',
+ blogSidebarTitle: 'Learn',
+ onUntruncatedBlogPosts: 'ignore',
+ onInlineAuthors: 'ignore',
+ },
+ ],
+ './route-plugin',
+ ],
+};
-module.exports = config('complete');
-module.exports.customFields = {config};
+export default config;
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.ts
similarity index 99%
rename from packages/docs/sidebars.js
rename to packages/docs/sidebars.ts
index 9e03533e49..e3fe0261c9 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.ts
@@ -1,4 +1,6 @@
-module.exports = {
+import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
+
+const sidebars: SidebarsConfig = {
apiSidebar: [
'api',
{
@@ -1407,3 +1409,5 @@ module.exports = {
},
],
};
+
+export default sidebars;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index aa54ffdf49..0b050a49c6 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5,7 +5,7 @@ settings:
excludeLinksFromLockfile: false
overrides:
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
importers:
@@ -17695,7 +17695,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.25.0
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.1.1
@@ -17711,7 +17711,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.25.0
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.1.1
@@ -17726,7 +17726,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.25.0
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.1.1
@@ -17742,7 +17742,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.25.0
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.1.1
@@ -17758,7 +17758,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.25.0
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.1.1
@@ -18126,7 +18126,7 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
electron-to-chromium: 1.5.167
node-releases: 2.0.19
update-browserslist-db: 1.1.3([email protected])
@@ -18314,13 +18314,13 @@ packages:
resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
dependencies:
browserslist: 4.25.0
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
lodash.memoize: 4.1.2
lodash.uniq: 4.5.0
dev: false
- resolution: {integrity: sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==}
+ resolution: {integrity: sha512-WqJo7p0TbHDOythNTqYujmaJTvtYRZrjpP8TCvH6Vb9CYJerJNKamKzIWOM4BkQatWj9H2lYulpdAQNBe7QhNA==}
resolution: {integrity: sha512-Od2o+ZmoEw9PBdN/yCGvzfu0WVqlufBPEWNG452wY7E9aT8RBE+ChpZF526doOlg7zumO4iCS+RAeht4P0Gbpw==}
@@ -24949,7 +24949,7 @@ packages:
'@swc/counter': 0.1.3
'@swc/helpers': 0.5.15
busboy: 1.6.0
- caniuse-lite: 1.0.30001690
+ caniuse-lite: 1.0.30001724
postcss: 8.4.31
react: 19.0.0
react-dom: 19.0.0([email protected])