diff --git a/docusaurus.config.js b/docusaurus.config.js index 74fdd3220a..4f619ad441 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -199,9 +199,8 @@ module.exports = { '@docusaurus/preset-classic', { docs: { - id: 'contracts', - path: 'docs/contracts', - routeBasePath: 'contracts/', + routeBasePath: '/', + sidebarPath: require.resolve("./sidebars.js"), remarkPlugins: [math], rehypePlugins: [katex], editUrl: 'https://github.com/uniswap/uniswap-docs/tree/main/', @@ -231,36 +230,6 @@ module.exports = { ], plugins: [ ['@saucelabs/theme-github-codeblock', {}], - [ - '@docusaurus/plugin-content-docs', - { - id: 'sdk', - path: 'docs/sdk', - routeBasePath: 'sdk', - remarkPlugins: [[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }]], - includeCurrentVersion: true, - }, - ], - [ - '@docusaurus/plugin-content-docs', - { - id: 'api', - path: 'docs/api', - routeBasePath: 'api/', - remarkPlugins: [[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }]], - includeCurrentVersion: true, - }, - ], - [ - '@docusaurus/plugin-content-docs', - { - id: 'concepts', - path: 'docs/concepts', - routeBasePath: 'concepts/', - remarkPlugins: [[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }]], - includeCurrentVersion: true, - }, - ], [ '@docusaurus/plugin-client-redirects', { diff --git a/sidebars.js b/sidebars.js new file mode 100644 index 0000000000..80846b7c37 --- /dev/null +++ b/sidebars.js @@ -0,0 +1,10 @@ +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const sidebars = { + // By default, Docusaurus generates a sidebar from the docs folder structure + apiSidebar: [{ type: 'autogenerated', dirName: 'api' }], + conceptsSidebar: [{ type: 'autogenerated', dirName: 'concepts' }], + contractsSidebar: [{ type: 'autogenerated', dirName: 'contracts' }], + sdkSidebar: [{ type: 'autogenerated', dirName: 'sdk' }], +} + +module.exports = sidebars