From 956f9db9c8160073a451790c33dc5bdd44c0a1fa Mon Sep 17 00:00:00 2001 From: prince Date: Thu, 26 Jun 2025 19:00:13 +0800 Subject: [PATCH] refactor sidebars --- docs/{api => integration}/xChainRead/api-reference.md | 2 +- docs/integration/{7683 => xChainRead}/frontend.md | 6 +++--- .../{7683/xChainRead.md => xChainRead/overview.md} | 8 ++++---- docusaurus.config.js | 11 ++--------- sidebars.js | 1 - 5 files changed, 10 insertions(+), 18 deletions(-) rename docs/{api => integration}/xChainRead/api-reference.md (99%) rename docs/integration/{7683 => xChainRead}/frontend.md (98%) rename docs/integration/{7683/xChainRead.md => xChainRead/overview.md} (84%) diff --git a/docs/api/xChainRead/api-reference.md b/docs/integration/xChainRead/api-reference.md similarity index 99% rename from docs/api/xChainRead/api-reference.md rename to docs/integration/xChainRead/api-reference.md index dba3bc84..16c89ab2 100644 --- a/docs/api/xChainRead/api-reference.md +++ b/docs/integration/xChainRead/api-reference.md @@ -2,7 +2,7 @@ id: api-reference title: API Reference sidebar_label: API Reference -sidebar_position: 1 +sidebar_position: 2 --- # API Reference diff --git a/docs/integration/7683/frontend.md b/docs/integration/xChainRead/frontend.md similarity index 98% rename from docs/integration/7683/frontend.md rename to docs/integration/xChainRead/frontend.md index 4324d104..909428fd 100644 --- a/docs/integration/7683/frontend.md +++ b/docs/integration/xChainRead/frontend.md @@ -1,8 +1,8 @@ --- id: frontend -title: Frontend Integration -sidebar_label: Frontend Integration -sidebar_position: 2 +title: ERC 7683 Frontend Integration +sidebar_label: ERC 7683 Frontend Integration +sidebar_position: 3 --- # Frontend Integration for 7683 Intent Bridging diff --git a/docs/integration/7683/xChainRead.md b/docs/integration/xChainRead/overview.md similarity index 84% rename from docs/integration/7683/xChainRead.md rename to docs/integration/xChainRead/overview.md index 2c5e11d5..3e0e59a0 100644 --- a/docs/integration/7683/xChainRead.md +++ b/docs/integration/xChainRead/overview.md @@ -1,7 +1,7 @@ --- -id: xChainRead +id: overview title: xChainRead Overview -sidebar_label: xChainRead +sidebar_label: Overview sidebar_position: 1 --- @@ -92,8 +92,8 @@ The `requestRead` function is used to request a cross-chain read. It takes a `Re ### 3. Handle Proof Response -Once the read request is processed, the result will be posted to the [API](../../api/xChainRead/api-reference). You can fetch the proof from the API and verify it with your contract. The `verifyProofOfRead` function is used to verify the proof. It takes a `bytes` calldata as input, which can be fetched via the `handle_read_result_with_proof_calldata` field from the API. If the proof is valid, the function will return the request ID and the result of the target function. If the proof is invalid, the function will revert. +Once the read request is processed, the result will be posted to the [API](../xChainRead/api-reference). You can fetch the proof from the API and verify it with your contract. The `verifyProofOfRead` function is used to verify the proof. It takes a `bytes` calldata as input, which can be fetched via the `handle_read_result_with_proof_calldata` field from the API. If the proof is valid, the function will return the request ID and the result of the target function. If the proof is invalid, the function will revert. ## Next Steps -- [API Reference](../../api/xChainRead/api-reference) - Detailed API documentation +- [API Reference](../xChainRead/api-reference) - Detailed API documentation diff --git a/docusaurus.config.js b/docusaurus.config.js index 95ef997d..14cd3101 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -5,7 +5,7 @@ require('dotenv').config() module.exports = { customFields: { // Analytics proxy URL - analyticsProxyUrl: process.env.REACT_APP_AMPLITUDE_PROXY_URL, + // analyticsProxyUrl: process.env.REACT_APP_AMPLITUDE_PROXY_URL, // Determines if staging env stagingEnv: process.env.REACT_APP_STAGING, // From node @@ -36,18 +36,11 @@ module.exports = { className: 'V3_active', }, { - to: '/integration/7683/xChainRead', + to: '/integration/xChainRead/overview', label: 'Integration', position: 'left', className: 'V3_active', }, - { - to: '/api/xChainRead/api-reference', - label: 'API', - position: 'left', - className: 'V3_active', - }, - { // TODO(docs): Publish docs repo and make public at this URL href: 'https://github.com/t1protocol/', diff --git a/sidebars.js b/sidebars.js index 60fd8262..3f4d8b9d 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,7 +1,6 @@ /** @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' }], integrationSidebar: [{ type: 'autogenerated', dirName: 'integration' }], conceptsSidebar: [{ type: 'autogenerated', dirName: 'concepts' }], contractsSidebar: [{ type: 'autogenerated', dirName: 'contracts' }],