diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..9f9ddf7f4c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "website/react-redux"] + path = website/react-redux + url = https://github.com/reduxjs/react-redux.git diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 8bff9c27ea..e1add1fbac 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -49,6 +49,11 @@ const config: Config = { src: 'img/redux.svg' }, items: [ + { + label: 'React Redux', + to: '/react-redux/introduction/getting-started', + position: 'left' + }, { label: 'Getting Started', to: 'introduction/getting-started', @@ -159,7 +164,7 @@ const config: Config = { href: 'https://redux.js.org/' }, copyright: `Copyright © 2015–${new Date().getFullYear()} Dan Abramov and the Redux documentation authors.` - }, + } // algolia: { // appId: 'YUQHC5OCW0', // apiKey: 'ef8f3e604a1e7ed3afa4dbaeeecfa5f2', @@ -221,6 +226,16 @@ const config: Config = { dataDoNotTrack: true, dataCache: true } satisfies UmamiOptions + ], + [ + '@docusaurus/plugin-content-docs', + { + id: 'react-redux', + path: 'react-redux/docs', + routeBasePath: 'react-redux', + sidebarPath: './react-redux.sidebars.ts', + include: ['{api,introduction,using-react-redux,tutorials}/*.{md,mdx}'] + } ] ] } diff --git a/website/react-redux b/website/react-redux new file mode 160000 index 0000000000..a8d654d2af --- /dev/null +++ b/website/react-redux @@ -0,0 +1 @@ +Subproject commit a8d654d2af7d1ac76724c4c8e38c37d5440a4f47 diff --git a/website/react-redux.sidebars.ts b/website/react-redux.sidebars.ts new file mode 100644 index 0000000000..ec9602130b --- /dev/null +++ b/website/react-redux.sidebars.ts @@ -0,0 +1,17 @@ +import type { SidebarsConfig } from '@docusaurus/plugin-content-docs' + +const sidebars: SidebarsConfig = { + docs: [ + { + type: 'category', + label: 'Introduction', + collapsed: false, + items: [ + 'introduction/getting-started', + 'introduction/why-use-react-redux' + ] + } + ] +} + +export default sidebars