From a1d4cd3b02929037d1cc8661f159ff43faf384ad Mon Sep 17 00:00:00 2001 From: Gabriel Barros Date: Wed, 7 Aug 2024 23:24:13 -0300 Subject: [PATCH] Add configuration for versioned only site --- .../version-1.5-sidebars.json | 204 ++++++++++++++++++ cartesi-rollups_versions.json | 1 + docusaurus.config.js | 16 +- 3 files changed, 213 insertions(+), 8 deletions(-) create mode 100644 cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json diff --git a/cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json b/cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json new file mode 100644 index 00000000..7ebbd726 --- /dev/null +++ b/cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json @@ -0,0 +1,204 @@ +{ + "rollups": [ + { + "type": "doc", + "id": "overview", + "label": "Overview" + }, + { + "type": "doc", + "id": "quickstart", + "label": "Quickstart" + }, + { + "type": "category", + "label": "Core Concepts", + "collapsed": true, + "items": [ + "core-concepts/optimistic-rollups", + "core-concepts/architecture", + "core-concepts/mainnet-considerations" + ] + }, + { + "type": "category", + "label": "Rollups APIs", + "collapsed": true, + "items": [ + "rollups-apis/http-api", + { + "type": "category", + "label": "Backend APIs", + "collapsed": true, + "items": [ + "rollups-apis/backend/introduction", + "rollups-apis/backend/notices", + "rollups-apis/backend/vouchers", + "rollups-apis/backend/reports" + ] + }, + { + "type": "category", + "label": "Frontend APIs", + "collapsed": true, + "items": [ + { + "type": "category", + "label": "Smart contracts API", + "collapsed": true, + "items": [ + "rollups-apis/json-rpc/overview", + "rollups-apis/json-rpc/input-box", + "rollups-apis/json-rpc/application", + "rollups-apis/json-rpc/application-factory", + { + "type": "category", + "label": "Portals", + "collapsed": true, + "items": [ + "rollups-apis/json-rpc/portals/ERC20Portal", + "rollups-apis/json-rpc/portals/ERC721Portal", + "rollups-apis/json-rpc/portals/ERC1155SinglePortal", + "rollups-apis/json-rpc/portals/ERC1155BatchPortal", + "rollups-apis/json-rpc/portals/EtherPortal" + ] + }, + { + "type": "category", + "label": "Relayer", + "collapsed": true, + "items": [ + "rollups-apis/json-rpc/relays/relays" + ] + } + ] + }, + { + "type": "category", + "label": "GraphQL API", + "collapsed": true, + "items": [ + "rollups-apis/graphql/overview", + { + "type": "category", + "label": "Queries", + "collapsed": true, + "items": [ + { + "type": "autogenerated", + "dirName": "rollups-apis/graphql/queries" + } + ] + }, + { + "type": "category", + "label": "Objects", + "collapsed": true, + "items": [ + { + "type": "autogenerated", + "dirName": "rollups-apis/graphql/objects" + } + ] + }, + { + "type": "category", + "label": "Filters", + "collapsed": true, + "items": [ + { + "type": "autogenerated", + "dirName": "rollups-apis/graphql/inputs" + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "category", + "label": "Development", + "collapsed": true, + "items": [ + "development/installation", + "development/creating-application", + "development/building-the-application", + "development/running-the-application", + "development/cli-commands", + "development/send-requests", + "development/retrieve-outputs", + "development/asset-handling", + "development/migration", + "development/community-tools" + ] + }, + { + "type": "category", + "label": "Deployment", + "collapsed": true, + "items": [ + "deployment/introduction", + "deployment/self-hosted" + ] + }, + { + "type": "category", + "label": "Tutorials", + "collapsed": true, + "items": [ + "tutorials/calculator", + "tutorials/ether-wallet", + "tutorials/erc-20-token-wallet", + "tutorials/erc-721-token-wallet", + "tutorials/react-frontend-application" + ] + }, + { + "type": "category", + "label": "References", + "collapsed": true, + "items": [ + { + "type": "category", + "label": "Releases", + "items": [ + { + "type": "link", + "label": "Cartesi CLI", + "href": "https://github.com/cartesi/cli/releases" + }, + { + "type": "link", + "label": "Rollups Node", + "href": "https://github.com/cartesi/rollups-node/releases" + }, + { + "type": "link", + "label": "Rollups Contracts", + "href": "https://github.com/cartesi/rollups-contracts/releases" + } + ] + }, + { + "type": "category", + "label": "Changelog", + "items": [ + { + "type": "link", + "label": "Rollups Node", + "href": "https://github.com/cartesi/rollups-node/blob/main/CHANGELOG.md" + }, + { + "type": "link", + "label": "Rollups Contracts", + "href": "https://github.com/cartesi/rollups-contracts/blob/main/CHANGELOG.md" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/cartesi-rollups_versions.json b/cartesi-rollups_versions.json index d1d83fd8..a4a86398 100644 --- a/cartesi-rollups_versions.json +++ b/cartesi-rollups_versions.json @@ -1,4 +1,5 @@ [ + "1.5", "1.3", "1.0", "0.9", diff --git a/docusaurus.config.js b/docusaurus.config.js index 1b87196d..8cda7d35 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -339,12 +339,12 @@ const config = { id: "cartesi-rollups", path: "cartesi-rollups", routeBasePath: "cartesi-rollups", - sidebarPath: require.resolve("./sidebarsRollups.js"), + // sidebarPath: require.resolve("./sidebarsRollups.js"), editUrl: "https://github.com/cartesi/docs/tree/main", docLayoutComponent: "@theme/DocPage", docItemComponent: "@theme/ApiItem", - includeCurrentVersion: true, - lastVersion: "current", + includeCurrentVersion: false, + lastVersion: "1.5", admonitions: { keywords: [ "note", @@ -357,7 +357,7 @@ const config = { ], }, versions: { - current: { + "1.5": { label: "1.5", path: "1.5", }, @@ -513,15 +513,15 @@ const config = { config: { backEndApi: { // Note: petstore key is treated as the and can be used to specify an API doc instance when using CLI commands - specPath: "cartesi-rollups/rollups-apis/rollup.yaml", // Path to designated spec file - outputDir: "cartesi-rollups/rollups-apis/rollup", // Output directory for generated .mdx docs + specPath: "cartesi-rollups_versioned_docs/version-1.5/rollups-apis/rollup.yaml", // Path to designated spec file + outputDir: "cartesi-rollups_versioned_docs/version-1.5/rollups-apis/rollup", // Output directory for generated .mdx docs sidebarOptions: { groupPathsBy: "tag", }, }, frontEndApi: { - specPath: "cartesi-rollups/rollups-apis/inspect.yaml", - outputDir: "cartesi-rollups/rollups-apis/inspect", + specPath: "cartesi-rollups_versioned_docs/version-1.5/rollups-apis/inspect.yaml", + outputDir: "cartesi-rollups_versioned_docs/version-1.5/rollups-apis/inspect", }, }, },