From 724e1ae0b848948031030ce34fefafe8dd8bd276 Mon Sep 17 00:00:00 2001 From: evchip Date: Thu, 25 Sep 2025 20:07:58 +0200 Subject: [PATCH 1/5] rename to mjs --- docusaurus.config.js => docusaurus.config.mjs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docusaurus.config.js => docusaurus.config.mjs (100%) diff --git a/docusaurus.config.js b/docusaurus.config.mjs similarity index 100% rename from docusaurus.config.js rename to docusaurus.config.mjs From 833dc42eefaadd2c37bb2498b340325c3150f626 Mon Sep 17 00:00:00 2001 From: evchip Date: Thu, 25 Sep 2025 20:08:44 +0200 Subject: [PATCH 2/5] change config to use ES6 import statements --- docusaurus.config.mjs | 90 +++++++++++++++++++++++++++++++------------ 1 file changed, 66 insertions(+), 24 deletions(-) diff --git a/docusaurus.config.mjs b/docusaurus.config.mjs index 8e010b10..7ea465e7 100644 --- a/docusaurus.config.mjs +++ b/docusaurus.config.mjs @@ -1,14 +1,16 @@ -const math = require('remark-math') -const katex = require('rehype-katex') -require('dotenv').config() +import dotenv from 'dotenv' +import rehypeKatex from 'rehype-katex' +import remarkMath from 'remark-math' -module.exports = { +dotenv.config() + +const config = { + themes: ['@docusaurus/theme-mermaid'], + markdown: { + mermaid: true, + }, customFields: { - // Analytics proxy URL - // analyticsProxyUrl: process.env.REACT_APP_AMPLITUDE_PROXY_URL, - // Determines if staging env stagingEnv: process.env.REACT_APP_STAGING, - // From node nodeEnv: process.env.NODE_ENV, }, title: 't1', @@ -16,16 +18,25 @@ module.exports = { url: 'https://docs.t1protocol.com', baseUrl: '/', onBrokenLinks: 'warn', - onBrokenMarkdownLinks: 'ignore', + onBrokenMarkdownLinks: 'warn', favicon: 'img/favicon.ico', - organizationName: 't1', // Usually your GitHub org/user name. - projectName: 't1-docs', // Usually your repo name. + organizationName: 't1protocol', + projectName: 't1-docs', themeConfig: { image: 'img/t1-rollup.png', prism: { additionalLanguages: ['solidity'], }, - algolia: null, + mermaid: { + theme: { light: 'neutral', dark: 'dark' }, + }, + // not using search for now + // algolia: { + // appId: 'PLACEHOLDER', + // apiKey: 'PLACEHOLDER', + // indexName: 't1-docs', + // contextualSearch: true, + // }, navbar: { title: 't1 Docs', items: [ @@ -42,7 +53,6 @@ module.exports = { className: 'V3_active', }, { - // TODO(docs): Publish docs repo and make public at this URL href: 'https://github.com/t1protocol/', label: 'GitHub', position: 'right', @@ -54,11 +64,28 @@ module.exports = { // style: "dark", links: [ { - title: 'Developers', + title: 'Documentation', items: [ { - label: 'How it works', - href: 'https://www.t1protocol.com/#how-it-works', + label: 'Concepts', + to: '/concepts/protocol/introduction', + }, + { + label: 'Integration', + to: '/integration/xChainRead/overview', + }, + ], + }, + { + title: 'Resources', + items: [ + { + label: 'Website', + href: 'https://www.t1protocol.com', + }, + { + label: 'GitHub', + href: 'https://github.com/t1protocol', }, ], }, @@ -70,7 +97,7 @@ module.exports = { href: 'https://discord.com/invite/nbvyXZHgke', }, { - label: 'X', + label: 'X (Twitter)', href: 'https://x.com/t1protocol', }, { @@ -80,7 +107,7 @@ module.exports = { ], }, ], - // copyright: `unlicensed`, + copyright: `© ${new Date().getFullYear()} t1 Protocol. Built with Docusaurus.`, }, colorMode: { // "light" | "dark" @@ -101,15 +128,14 @@ module.exports = { { docs: { routeBasePath: '/', - sidebarPath: require.resolve('./sidebars.js'), - remarkPlugins: [math], - rehypePlugins: [katex], + sidebarPath: './sidebars.js', + remarkPlugins: [remarkMath], + rehypePlugins: [[rehypeKatex, { strict: false }]], editUrl: 'https://github.com/t1protocol/docs/tree/main/', includeCurrentVersion: true, }, theme: { - customCss: require.resolve('./src/css/custom.css'), - customCss2: require.resolve('./src/css/colors.css'), + customCss: ['./src/css/custom.css', './src/css/colors.css'], }, }, ], @@ -122,5 +148,21 @@ module.exports = { crossorigin: 'anonymous', }, ], - plugins: [['@saucelabs/theme-github-codeblock', {}]], + plugins: [ + function disableCSSMinimization(_context, _options) { + return { + name: 'disable-css-minimization', + configureWebpack(config, isServer) { + if (!isServer) { + // Disable CSS minimization to avoid broken styles + config.optimization.minimizer = config.optimization.minimizer.filter( + (minimizer) => minimizer.constructor.name !== 'CssMinimizerPlugin' + ) + } + }, + } + }, + ], } + +export default config From 791f2ec1a74ecf5952d7053b5f1b17a760ed558f Mon Sep 17 00:00:00 2001 From: evchip Date: Thu, 25 Sep 2025 20:18:19 +0200 Subject: [PATCH 3/5] revert accidental change to footer --- docusaurus.config.mjs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docusaurus.config.mjs b/docusaurus.config.mjs index 8b7a6732..7ea465e7 100644 --- a/docusaurus.config.mjs +++ b/docusaurus.config.mjs @@ -64,11 +64,15 @@ const config = { // style: "dark", links: [ { - title: 'Developers', + title: 'Documentation', items: [ { - label: 'How it works', - href: 'https://www.t1protocol.com/#how-it-works', + label: 'Concepts', + to: '/concepts/protocol/introduction', + }, + { + label: 'Integration', + to: '/integration/xChainRead/overview', }, ], }, From 6b601acecb2582d3c27e7582e5b0e22fbb55aa08 Mon Sep 17 00:00:00 2001 From: evchip Date: Thu, 25 Sep 2025 20:20:34 +0200 Subject: [PATCH 4/5] check that minimizer is defined to prevent error on yarn start --- docusaurus.config.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docusaurus.config.mjs b/docusaurus.config.mjs index 7ea465e7..d6008352 100644 --- a/docusaurus.config.mjs +++ b/docusaurus.config.mjs @@ -155,9 +155,11 @@ const config = { configureWebpack(config, isServer) { if (!isServer) { // Disable CSS minimization to avoid broken styles - config.optimization.minimizer = config.optimization.minimizer.filter( - (minimizer) => minimizer.constructor.name !== 'CssMinimizerPlugin' - ) + if (config.optimization?.minimizer) { + config.optimization.minimizer = config.optimization.minimizer.filter( + (minimizer) => minimizer.constructor.name !== 'CssMinimizerPlugin' + ) + } } }, } From 3072306c87684a70b562ffe672cf9e720abc74b3 Mon Sep 17 00:00:00 2001 From: evchip Date: Thu, 25 Sep 2025 20:38:16 +0200 Subject: [PATCH 5/5] restore gtag removed in merge conflict resolution --- docusaurus.config.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docusaurus.config.mjs b/docusaurus.config.mjs index d6008352..2c1d8922 100644 --- a/docusaurus.config.mjs +++ b/docusaurus.config.mjs @@ -164,6 +164,12 @@ const config = { }, } }, + [ + '@docusaurus/plugin-google-gtag', + { + trackingID: 'G-3RN3N09K6C', // Your GA4 measurement ID + }, + ], ], }