Skip to content

Commit

Permalink
refactor: explicit sidebars (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg authored May 2, 2023
1 parent 7fbae20 commit a46009f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 33 deletions.
35 changes: 2 additions & 33 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
Expand Down Expand Up @@ -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',
{
Expand Down
10 changes: 10 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
@@ -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

1 comment on commit a46009f

@vercel
Copy link

@vercel vercel bot commented on a46009f May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./

docs.uniswap.org
docs-git-main-uniswap.vercel.app
docs-uniswap.vercel.app

Please sign in to comment.