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:
28
docs/next.config.js
Normal file
28
docs/next.config.js
Normal 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,
|
||||
});
|
||||
Reference in New Issue
Block a user