feat: move docs to github pages (#3296)

* feat(docs): setup nextra

* feat(docs): add pages

* docs: update introduction page

* docs: fix typos

* docs: fix links

* docs: update README

* docs: sync with master

* docs: remove old docs

* fix(ci/docs): fix typos

* fix(ci/docs): fix docs setup

* fix(docs): update next config

* chore(ci/docs): clean up

* chore(docs): add meta tags

* chore: apply review changes

* docs: move drm into api section

* docs: fix next config

* docs: fix links

* docs: add methods section

* chore: sync with main

* docs: add missing onAudio events
This commit is contained in:
Krzysztof Moch
2023-10-26 08:54:14 +02:00
committed by GitHub
parent 0f8467f51d
commit 85e30f0335
32 changed files with 2289 additions and 1992 deletions

28
docs/next.config.js Normal file
View File

@@ -0,0 +1,28 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx',
});
let assetPrefix = '';
let basePath = '';
// If we're in a GitHub Action, we need to set the assetPrefix and basePath
// to add repo_name to the path.
// eg. https://<organization>.github.io/<repo_name>
if (process.env.GITHUB_ACTIONS) {
const repo_name = 'react-native-video';
assetPrefix = `/${repo_name}/`;
basePath = `/${repo_name}`;
}
module.exports = withNextra({
output: 'export',
images: {
unoptimized: true,
},
assetPrefix,
basePath,
});