From 9462b82cbead8b0a72602b86ab49ca825dcf0d1f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Apr 2023 05:38:56 +0000 Subject: [PATCH 01/11] Version Packages --- .changeset/rude-pears-sneeze.md | 5 ----- packages/docusaurus-plugin/CHANGELOG.md | 6 ++++++ packages/docusaurus-plugin/package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/rude-pears-sneeze.md diff --git a/.changeset/rude-pears-sneeze.md b/.changeset/rude-pears-sneeze.md deleted file mode 100644 index 21be9fb..0000000 --- a/.changeset/rude-pears-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"solive-docusaurus-theme-code": patch ---- - -fix match props error diff --git a/packages/docusaurus-plugin/CHANGELOG.md b/packages/docusaurus-plugin/CHANGELOG.md index 1b8a6ff..d833841 100644 --- a/packages/docusaurus-plugin/CHANGELOG.md +++ b/packages/docusaurus-plugin/CHANGELOG.md @@ -1,5 +1,11 @@ # solive-docusaurus-theme-code +## 0.0.2 + +### Patch Changes + +- 5a8c475: fix match props error + ## 0.0.1 ### Patch Changes diff --git a/packages/docusaurus-plugin/package.json b/packages/docusaurus-plugin/package.json index 5fa7783..2c55cda 100644 --- a/packages/docusaurus-plugin/package.json +++ b/packages/docusaurus-plugin/package.json @@ -1,6 +1,6 @@ { "name": "solive-docusaurus-theme-code", - "version": "0.0.1", + "version": "0.0.2", "description": "A Docusaurus v2 plugin that supports solidity code live.", "main": "dist/index.js", "exports": { From 50decf264dae14bb061e8e6d29c47285b9927203 Mon Sep 17 00:00:00 2001 From: yck Date: Tue, 18 Apr 2023 16:50:01 +0800 Subject: [PATCH 02/11] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2ac42a2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 WTF.Academy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 98de54ac1a9bd6af541c6393bd8ff9fd5a093bc0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Apr 2023 09:01:34 +0000 Subject: [PATCH 03/11] Version Packages --- .changeset/neat-tips-hammer.md | 10 ---------- packages/compiler-utils/CHANGELOG.md | 6 ++++++ packages/compiler-utils/package.json | 2 +- packages/core/CHANGELOG.md | 10 ++++++++++ packages/core/package.json | 2 +- packages/docusaurus-plugin/CHANGELOG.md | 8 ++++++++ packages/docusaurus-plugin/package.json | 2 +- packages/provider/CHANGELOG.md | 6 ++++++ packages/provider/package.json | 2 +- packages/solc/CHANGELOG.md | 6 ++++++ packages/solc/package.json | 2 +- packages/tsconfig/CHANGELOG.md | 6 ++++++ packages/tsconfig/package.json | 2 +- 13 files changed, 48 insertions(+), 16 deletions(-) delete mode 100644 .changeset/neat-tips-hammer.md diff --git a/.changeset/neat-tips-hammer.md b/.changeset/neat-tips-hammer.md deleted file mode 100644 index 80e4468..0000000 --- a/.changeset/neat-tips-hammer.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"solive-docusaurus-theme-code": patch -"solive-compiler-utils": patch -"solive-provider": patch -"solive-tsconfig": patch -"solive-core": patch -"solive-solc": patch ---- - -update package info diff --git a/packages/compiler-utils/CHANGELOG.md b/packages/compiler-utils/CHANGELOG.md index 022c25f..4a1b437 100644 --- a/packages/compiler-utils/CHANGELOG.md +++ b/packages/compiler-utils/CHANGELOG.md @@ -1,5 +1,11 @@ # solive-compiler-utils +## 0.0.2 + +### Patch Changes + +- 91a216e: update package info + ## 0.0.1 ### Patch Changes diff --git a/packages/compiler-utils/package.json b/packages/compiler-utils/package.json index 5f0ee36..abddebe 100644 --- a/packages/compiler-utils/package.json +++ b/packages/compiler-utils/package.json @@ -1,6 +1,6 @@ { "name": "solive-compiler-utils", - "version": "0.0.1", + "version": "0.0.2", "main": "dist/index.js", "typings": "dist/src/index.d.ts", "files": [ diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index df88e40..793fe64 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,15 @@ # solive-core +## 0.0.2 + +### Patch Changes + +- 91a216e: update package info +- Updated dependencies [91a216e] + - solive-compiler-utils@0.0.2 + - solive-provider@0.0.2 + - solive-solc@0.0.2 + ## 0.0.1 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 296b495..795699c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "solive-core", - "version": "0.0.1", + "version": "0.0.2", "description": "Solidity Monaco Editor Core Library", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/docusaurus-plugin/CHANGELOG.md b/packages/docusaurus-plugin/CHANGELOG.md index d833841..2e7614b 100644 --- a/packages/docusaurus-plugin/CHANGELOG.md +++ b/packages/docusaurus-plugin/CHANGELOG.md @@ -1,5 +1,13 @@ # solive-docusaurus-theme-code +## 0.0.3 + +### Patch Changes + +- 91a216e: update package info +- Updated dependencies [91a216e] + - solive-core@0.0.2 + ## 0.0.2 ### Patch Changes diff --git a/packages/docusaurus-plugin/package.json b/packages/docusaurus-plugin/package.json index 0e8290c..bf65bdb 100644 --- a/packages/docusaurus-plugin/package.json +++ b/packages/docusaurus-plugin/package.json @@ -1,6 +1,6 @@ { "name": "solive-docusaurus-theme-code", - "version": "0.0.2", + "version": "0.0.3", "description": "A Docusaurus v2 plugin that supports solidity code live.", "main": "dist/index.js", "exports": { diff --git a/packages/provider/CHANGELOG.md b/packages/provider/CHANGELOG.md index c855bfe..0318c15 100644 --- a/packages/provider/CHANGELOG.md +++ b/packages/provider/CHANGELOG.md @@ -1,5 +1,11 @@ # solive-provider +## 0.0.2 + +### Patch Changes + +- 91a216e: update package info + ## 0.0.1 ### Patch Changes diff --git a/packages/provider/package.json b/packages/provider/package.json index 9daf7da..bbd6f1a 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -1,6 +1,6 @@ { "name": "solive-provider", - "version": "0.0.1", + "version": "0.0.2", "description": "Ethereum VM Provider", "module": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/solc/CHANGELOG.md b/packages/solc/CHANGELOG.md index 7286dea..6cdd2d1 100644 --- a/packages/solc/CHANGELOG.md +++ b/packages/solc/CHANGELOG.md @@ -1,5 +1,11 @@ # solive-solc +## 0.0.2 + +### Patch Changes + +- 91a216e: update package info + ## 0.0.1 ### Patch Changes diff --git a/packages/solc/package.json b/packages/solc/package.json index 32013a1..5f6e333 100644 --- a/packages/solc/package.json +++ b/packages/solc/package.json @@ -1,6 +1,6 @@ { "name": "solive-solc", - "version": "0.0.1", + "version": "0.0.2", "description": "Solidity Contract Compiler Tool - Browser Supported", "module": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/tsconfig/CHANGELOG.md b/packages/tsconfig/CHANGELOG.md index a956e54..3e25ed2 100644 --- a/packages/tsconfig/CHANGELOG.md +++ b/packages/tsconfig/CHANGELOG.md @@ -1,5 +1,11 @@ # solive-tsconfig +## 0.0.2 + +### Patch Changes + +- 91a216e: update package info + ## 0.0.1 ### Patch Changes diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index 98cf5ae..8580e1e 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "solive-tsconfig", - "version": "0.0.1", + "version": "0.0.2", "scripts": { "build": "echo 'nothing to build'" }, From 90c537de9b299883de8b70b5aef382953571a9f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Apr 2023 16:21:41 +0000 Subject: [PATCH 04/11] Version Packages --- .changeset/happy-fans-complain.md | 5 ----- packages/docusaurus-plugin/CHANGELOG.md | 6 ++++++ packages/docusaurus-plugin/package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/happy-fans-complain.md diff --git a/.changeset/happy-fans-complain.md b/.changeset/happy-fans-complain.md deleted file mode 100644 index a0c558c..0000000 --- a/.changeset/happy-fans-complain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"solive-docusaurus-theme-code": patch ---- - -fix plugin transform-model.ts import error lib diff --git a/packages/docusaurus-plugin/CHANGELOG.md b/packages/docusaurus-plugin/CHANGELOG.md index 2e7614b..abf39ce 100644 --- a/packages/docusaurus-plugin/CHANGELOG.md +++ b/packages/docusaurus-plugin/CHANGELOG.md @@ -1,5 +1,11 @@ # solive-docusaurus-theme-code +## 0.0.4 + +### Patch Changes + +- ebb8ef5: fix plugin transform-model.ts import error lib + ## 0.0.3 ### Patch Changes diff --git a/packages/docusaurus-plugin/package.json b/packages/docusaurus-plugin/package.json index bf65bdb..b21207b 100644 --- a/packages/docusaurus-plugin/package.json +++ b/packages/docusaurus-plugin/package.json @@ -1,6 +1,6 @@ { "name": "solive-docusaurus-theme-code", - "version": "0.0.3", + "version": "0.0.4", "description": "A Docusaurus v2 plugin that supports solidity code live.", "main": "dist/index.js", "exports": { From e05f6de4ac9729393b9cb8a5fcbf7d0c69416b0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Apr 2023 17:21:22 +0000 Subject: [PATCH 05/11] Version Packages --- .changeset/dirty-boxes-sneeze.md | 5 ----- .changeset/new-ravens-hammer.md | 5 ----- .changeset/strong-kids-design.md | 5 ----- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/docusaurus-plugin/CHANGELOG.md | 9 +++++++++ packages/docusaurus-plugin/package.json | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 .changeset/dirty-boxes-sneeze.md delete mode 100644 .changeset/new-ravens-hammer.md delete mode 100644 .changeset/strong-kids-design.md diff --git a/.changeset/dirty-boxes-sneeze.md b/.changeset/dirty-boxes-sneeze.md deleted file mode 100644 index b33818f..0000000 --- a/.changeset/dirty-boxes-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"solive-docusaurus-theme-code": patch ---- - -fix boolean prop not coerce transform diff --git a/.changeset/new-ravens-hammer.md b/.changeset/new-ravens-hammer.md deleted file mode 100644 index 19f220a..0000000 --- a/.changeset/new-ravens-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"solive-core": patch ---- - -add disableValidation and monacoEditorOptions diff --git a/.changeset/strong-kids-design.md b/.changeset/strong-kids-design.md deleted file mode 100644 index dc6c29e..0000000 --- a/.changeset/strong-kids-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"solive-docusaurus-theme-code": patch ---- - -add simple mode diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 793fe64..2cd0306 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # solive-core +## 0.0.3 + +### Patch Changes + +- 74ef4b0: add disableValidation and monacoEditorOptions + ## 0.0.2 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 795699c..1bde39f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "solive-core", - "version": "0.0.2", + "version": "0.0.3", "description": "Solidity Monaco Editor Core Library", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/docusaurus-plugin/CHANGELOG.md b/packages/docusaurus-plugin/CHANGELOG.md index abf39ce..c151078 100644 --- a/packages/docusaurus-plugin/CHANGELOG.md +++ b/packages/docusaurus-plugin/CHANGELOG.md @@ -1,5 +1,14 @@ # solive-docusaurus-theme-code +## 0.0.5 + +### Patch Changes + +- 74ef4b0: fix boolean prop not coerce transform +- 74ef4b0: add simple mode +- Updated dependencies [74ef4b0] + - solive-core@0.0.3 + ## 0.0.4 ### Patch Changes diff --git a/packages/docusaurus-plugin/package.json b/packages/docusaurus-plugin/package.json index b21207b..609a281 100644 --- a/packages/docusaurus-plugin/package.json +++ b/packages/docusaurus-plugin/package.json @@ -1,6 +1,6 @@ { "name": "solive-docusaurus-theme-code", - "version": "0.0.4", + "version": "0.0.5", "description": "A Docusaurus v2 plugin that supports solidity code live.", "main": "dist/index.js", "exports": { From 306d66b0a08d4909565bccf4e2cbc22e653e66b9 Mon Sep 17 00:00:00 2001 From: "Li, Amazing Ang" Date: Tue, 2 May 2023 23:14:12 +0800 Subject: [PATCH 06/11] add english doc support --- apps/doc/README.md | 53 +-------------- .../expansion/docusaurus-plugins/props.mdx | 22 ------ .../docusaurus-plugins/guide.mdx | 49 ++++--------- .../extension/docusaurus-plugins/props.mdx | 22 ++++++ .../docs/{expansion => extension}/index.mdx | 4 +- apps/doc/docs/get-started.mdx | 16 ++--- apps/doc/docs/introduction.mdx | 25 ++++--- apps/doc/docs/qa.mdx | 2 +- apps/doc/docs/solive-props.mdx | 68 +++++++++---------- .../docusaurus-plugins.mdx | 8 +-- .../{expansion => extension}/index.mdx | 0 .../current/get-started.mdx | 12 ++-- .../current/introduction.mdx | 24 +++---- 13 files changed, 114 insertions(+), 191 deletions(-) delete mode 100644 apps/doc/docs/expansion/docusaurus-plugins/props.mdx rename apps/doc/docs/{expansion => extension}/docusaurus-plugins/guide.mdx (61%) create mode 100644 apps/doc/docs/extension/docusaurus-plugins/props.mdx rename apps/doc/docs/{expansion => extension}/index.mdx (79%) rename apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/{expansion => extension}/docusaurus-plugins.mdx (97%) rename apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/{expansion => extension}/index.mdx (100%) diff --git a/apps/doc/README.md b/apps/doc/README.md index 8a928d6..6ddabae 100644 --- a/apps/doc/README.md +++ b/apps/doc/README.md @@ -1,55 +1,4 @@ -# WTF Starknet -Todo list of WTF Starknet during Starknet Building Hacker House Tel Aviv, 31st Jan-7th Feb, 2023. - -## Background -1. WTF Academy is a web3 open-source university for developers. - - WTF Solidity (5,700 ⭐): https://github.com/AmazingAng/WTF-Solidity - - WTF Ethers (1,100 ⭐): https://github.com/WTFAcademy/WTF-Ethers - - Integrated Education Platform (3,300 users): https://wtf.academy - -2. WTF Starknet is a platform to onboard developers to Starknet, which includes tutorial, examples, and on-chain certificates. - -## Todo and Progress - -### 1. Tutorials -Minimal tutorials on Starknet, assuming the learners have Ethereum development experience. -- Account Abstraction: @ocandocrypto -- Cairo: @hasselalcala [Draft] [Quiz] -- Tooling: @hasselalcala [Draft] -- Starknet.js @AmazingAng [Draft] -- Build a minimal Dapp - -### 2. Frontend - -Build a website for WTF StarkWare based on Docusaurus. - - dashboard page - - tutorial page - - quiz page - - certificate page - -### 3. Backend - - quiz backend @stoneworld @reborn-sama(huashui) - - certificate backend - -### 4. Contract -Build a SBT contract for certificates on starknet. - - certificate contract - -### 5. Design - - web design ([Figma](https://www.figma.com/file/dZiNEsfG5Nkc1uQFy3agEk)): [@tankxu](https://github.com/tankxu) - - logo design - -### 6. Project Management - - github todo list [x] - -## How to contribute - -We will manage the project on Github (yes, this repo), so you can see all the tasks and contributors here. - -1. Read [Project Brief](https://onlydust.notion.site/WTF-Academy-Starknet-cec45bfe02694dbc895eb42e8f3f1c31) -2. Contact project lead 0xAA's Telegram (@not0xAA) or [Twitter](https://twitter.com/0xAA_Science), briefly introduce yourself and which part you want to contribute to. -3. You can create a PR update your github ID after corresponding tasks, or I will do it for you. - +# SoLive Doc ## Website This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. diff --git a/apps/doc/docs/expansion/docusaurus-plugins/props.mdx b/apps/doc/docs/expansion/docusaurus-plugins/props.mdx deleted file mode 100644 index 5d2c3bc..0000000 --- a/apps/doc/docs/expansion/docusaurus-plugins/props.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: 属性 -slug: /docusaurus-plugins/props -hide_title: true ---- - -## 属性 - -> 注意:考虑对参数匹配的准确性和文档UI适应性,部分Solive的属性默认值有所变动,并增加和变动一些新的属性 - -| 属性 | 类型 | 默认值 | 说明 | -| --- | --- | --- | --- | -| width | string | 90% | 容器宽度 | -| height | string | 500px | 容器高度 | -| simple | boolean | false | 是否极简模式 | -| consoleOpen | boolean | true | 是否显示控制台 | -| consoleTriggerControl | boolean | false | 是否显示控制台触发按钮 | -| consoleDefaultVisible | boolean | false | 控制台默认是否可见 | -| deployOpen | boolean | true | 是否显示部署 | -| deployDefaultVisible | boolean | false | 部署默认是否可见 | -| fileNavOpen | boolean | true | 是否显示文件导航栏 | -| fileNavDefaultVisible | boolean | false | 文件导航栏默认是否可见 | diff --git a/apps/doc/docs/expansion/docusaurus-plugins/guide.mdx b/apps/doc/docs/extension/docusaurus-plugins/guide.mdx similarity index 61% rename from apps/doc/docs/expansion/docusaurus-plugins/guide.mdx rename to apps/doc/docs/extension/docusaurus-plugins/guide.mdx index 170df80..e6223e4 100644 --- a/apps/doc/docs/expansion/docusaurus-plugins/guide.mdx +++ b/apps/doc/docs/extension/docusaurus-plugins/guide.mdx @@ -1,27 +1,26 @@ --- -title: 引导 +title: Guide hide_title: true slug: /docusaurus-plugins --- +# SoLive Doc: a Docusaurus Extension for SoLive -## Docusaurus 插件 +> You can quickly integrate a lightweight Solidity Editor into your documentation using the `solive-docusaurus-theme-code` plugin. (Currently being improved) -> 你可以使用 `solive-docusaurus-theme-code` 插件快速集成一个轻量级Solidity Editor嵌入你的文档. (完善中) +## Installation -### 安装 - -1. 首先我们需要安装 `solive-docusaurus-theme-code` 插件: +1. First, we need to install the `solive-docusaurus-theme-code` plugin: ```bash npm2yarn npm install --save solive-docusaurus-theme-code ``` -2. 安装一些配置需要的依赖项(暂未找到较好的方案内置): +2. Install some required dependencies for configuration (currently no better solution is available): ```bash npm2yarn npm install -D stream-http https-browserify stream-browserify crypto-browserify stream-browserify path-browserify events os-browserify buffer url assert tty-browserify util browserify-zlib ``` -2. 其次你需要在你的 `docusaurus.config.js` 中配置 `solive` 插件. +3. Next, you need to configure the `solive` plugin in your `docusaurus.config.js`. ```js {3} module.exports = { @@ -31,23 +30,23 @@ module.exports = { }; ``` -### 快速使用 +## Quick Start -1. 你需要注意在代码块标记solive,和配置solive的属性: +1. To import SoLive in your document, you need to mark the Solidity code block with `solive` and its attributes: ````md ```solidity solive height=500px // your code ``` ```` -2. 你可以在代码块中配置solive相关属性 `height`(具体参考[属性表](/docs/docusaurus-plugins/props)): +2. You can configure solive attributes like `height` in the code block (refer to the [Properties Table](/docs/docusaurus-plugins/props)): ````md ```solidity solive height=300px // your code ``` ```` -3. 配置代码块文件名(可多文件): +3. Configure the file name in the code block (supports multiple files), please note that duplicated file name in one page will result in error: ````md ```solidity solive height=500px /** @@ -64,7 +63,7 @@ module.exports = { ``` ```` -3. 完整的代码块示例: +4. A complete SoLive code block example: ````md ```solidity solive height=500px /** @@ -104,7 +103,7 @@ contract Storage { ``` ```` -5. 你将看到: +5. You will see: ```solidity solive height=500px /** @@ -142,25 +141,3 @@ contract Storage { } ``` -### 极简模式 - -在部分场景下可能只需要展示代码块,而不需要编辑器,你可以使用极简模式(这将关闭语法校验,部署,编译,文件导航功能): - -````md - ```solidity solive simple=true height=160px - // SPDX-License-Identifier: MIT - pragma solidity ^0.8.4; - contract HelloWeb3{ - string public _string = "Hello Web3!"; - } - ``` -```` - -```solidity solive simple=true height=160px - - // SPDX-License-Identifier: MIT - pragma solidity ^0.8.4; - contract HelloWeb3{ - string public _string = "Hello Web3!"; - } -``` diff --git a/apps/doc/docs/extension/docusaurus-plugins/props.mdx b/apps/doc/docs/extension/docusaurus-plugins/props.mdx new file mode 100644 index 0000000..8040072 --- /dev/null +++ b/apps/doc/docs/extension/docusaurus-plugins/props.mdx @@ -0,0 +1,22 @@ +--- +title: Properties +slug: /docusaurus-plugins/props +hide_title: true +--- + +# Properties + +> Note: properties may change the default values and new properties will be added in the future. + +| Property | Type | Default Value | Description | +| --- | --- | --- | --- | +| width | string | 90% | Container width | +| height | string | 500px | Container height | +| simple | boolean | false | Is it minimal mode? | +| consoleOpen | boolean | true | Display console? | +| consoleTriggerControl | boolean | false | Show console trigger button? | +| consoleDefaultVisible | boolean | false | Is console visible by default? | +| deployOpen | boolean | true | Display deploy module? | +| deployDefaultVisible | boolean | false | Is deploy module visible by default? | +| fileNavOpen | boolean | true | Display file navigation bar? | +| fileNavDefaultVisible | boolean | false | Is file navigation bar visible by default? | \ No newline at end of file diff --git a/apps/doc/docs/expansion/index.mdx b/apps/doc/docs/extension/index.mdx similarity index 79% rename from apps/doc/docs/expansion/index.mdx rename to apps/doc/docs/extension/index.mdx index 5c446a8..2ae7091 100644 --- a/apps/doc/docs/expansion/index.mdx +++ b/apps/doc/docs/extension/index.mdx @@ -1,10 +1,10 @@ --- -title: 扩展 +title: Extension sidebar_position: 3 hide_title: true --- -## 扩展 +# Extension import DocCardList from '@theme/DocCardList'; diff --git a/apps/doc/docs/get-started.mdx b/apps/doc/docs/get-started.mdx index cdd4b1f..c7b4d00 100644 --- a/apps/doc/docs/get-started.mdx +++ b/apps/doc/docs/get-started.mdx @@ -1,5 +1,5 @@ --- -title: 开始 +title: Getting Started sidebar_position: 1 hide_title: true --- @@ -7,9 +7,9 @@ hide_title: true import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## 开始 +# Getting Started -### 安装 +## Installation @@ -35,9 +35,9 @@ pnpm install solive-core -### 使用 +## Import SoLive to your website -#### 1. 配置webpack +### 1. Configure Webpack @@ -132,13 +132,13 @@ module.exports = nextConfig -#### 2. 引入样式 +### 2. Import Styles ```js import 'solive-core/dist/index.css'; ``` -#### 3. 使用 +### 3. Usage ```react ``` -即可看到效果: +Now you can see the SoLive Component on your page: ```solidity solive height="500px" consoleDefaultVisible="true" deployDefaultVisible="true" /** diff --git a/apps/doc/docs/introduction.mdx b/apps/doc/docs/introduction.mdx index 05e1522..b99cb22 100644 --- a/apps/doc/docs/introduction.mdx +++ b/apps/doc/docs/introduction.mdx @@ -1,21 +1,20 @@ --- -title: 介绍 +title: Introduction sidebar_position: 0 slug: /introduction hide_title: true --- -## 介绍 -Solive是一个灵活的在线Solidity智能合约的试验场,受到了remix-IDE和react-live的启发。 Solive可让您在一个React组件中编辑、编译、部署和交互Solidity智能合约。 您可以将solive嵌入您的网站或教程,并让用户在浏览器中运行Solidity代码。 Solive也兼容移动浏览器。 +# Introduction +SoLive is a lightweight and fleaxible online Solidity playground, inspired by remix-IDE and react-live. SoLive enables you to edit, compile, deploy, and interact with Solidity smart contracts within a React component. You can integrate SoLive into your website or tutorial, allowing users to execute Solidity code directly in their browsers. Moreover, SoLive is compatible with mobile browsers. -### 使用场景: -1. 教育:我们将在WTF Solidity教程中使用solive替换代码块,让学生能够阅读和运行代码。 -2. 开发人员入门:Layer2项目可以使用Solive来招募以太坊开发人员。 +## Use cases: +1. Education: In the [WTF Solidity](https://github.com/AmazingAng/WTF-Solidity) tutorials, we will utilize SoLive to replace conventional code blocks, enabling students to read and run the code concurrently. +2. Developer Onboarding: Layer2 projects can leverage SoLive to attract and recruit Ethereum developers. -### 这是如何做的 -1. 参考remix-ide:一个在线IDE,用于开发智能合约 -2. 参考react-live:一个灵活的React代码实时编辑器。我们建立solive的原因是希望学生在阅读WTF Solidity教程的同时能运行示例代码。Solive的设计很轻便,只包含必要的模块以便编辑、编译、部署和与智能合约进行交互。 -3. 编辑模块:我们使用代码编辑器Monaco Editor。 -4. 编译模块:我们使用`solcjs`根据选定的Solidity版本进行编译智能合约。 -5. 部署:我们使用`ethersjs V5`和`ethereumjs vm`两者结合,将编译后的合约部署到本地EVM上。 -6. 交互:我们使用`ethersjs V5`和一个自定义的ABI-UI转换器来与部署的合约进行交互。 +## How it works +SoLive is lightweight and flexible by design. It includes only the essential modules needed for editing, compiling, deploying, and interacting with smart contracts. +1. Edit Module: We employ the Monaco Editor as the code editor. +2. Compile Module: We utilize `solcjs` to compile smart contracts based on the chosen Solidity version. +3. Deploy Module: We deploy the compiled contracts to the local EVM using a combination of `ethersjs V5` and `ethereumjs vm`. +4. Interact Module: To interact with the deployed contracts, we use `ethersjs V5` and a custom ABI-UI converter. \ No newline at end of file diff --git a/apps/doc/docs/qa.mdx b/apps/doc/docs/qa.mdx index b0cc48b..6d363f1 100644 --- a/apps/doc/docs/qa.mdx +++ b/apps/doc/docs/qa.mdx @@ -1,5 +1,5 @@ --- -title: 常见问题 +title: FAQ sidebar_position: 4 hide_title: true --- diff --git a/apps/doc/docs/solive-props.mdx b/apps/doc/docs/solive-props.mdx index 87477db..9c1af68 100644 --- a/apps/doc/docs/solive-props.mdx +++ b/apps/doc/docs/solive-props.mdx @@ -1,53 +1,53 @@ --- -title: 组件属性 +title: Component Properties sidebar_position: 2 hide_title: true --- -# 组件属性 +# Component Properties -## 属性表 +## Property Table -| 属性名 | 介绍 | 类型 | 默认值 | 是否必填 | -| ----- | ----- | ----- | ----- | ----- | -| id | 表单唯一标志 | string | - | ✅ | -| modelInfos | 文件信息 | array | [] | ✅ | -| height | 高度 | string | - | ✅ | -| rounded | 窗口弧度 | string | 12px | - | -| disableValidation | 是否禁用校验 | boolean | false | - | -| monacoEditorOptions | monaco编辑器配置 | (参考 [IStandaloneEditorConstructionOptions](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html)) | - | - | -| fileNav | 顶部文件导航 | TFileNav | (参考 [TFileNav](/docs/solive-props#tfilenav)) | - | -| console | 日志块 | TConsole | (参考 [TConsole](/docs/solive-props#tconsole)) | - | -| deploy | 部署块 | TDeploy | (参考 [TDeploy](/docs/solive-props#tdeploy)) | - | +| Property Name | Description | Type | Default Value | Required | +| ------------- | ----------- | ---- | ------------- | -------- | +| id | Unique form identifier | string | - | ✅ | +| modelInfos | File information | array | [] | ✅ | +| height | Height | string | - | ✅ | +| rounded | Window corner radius | string | 12px | - | +| disableValidation | Whether to disable validation | boolean | false | - | +| monacoEditorOptions | Monaco editor configuration | (Refer to [IStandaloneEditorConstructionOptions](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html)) | - | - | +| fileNav | Top file navigation | TFileNav | (Refer to [TFileNav](/docs/solive-props#tfilenav)) | - | +| console | Log block | TConsole | (Refer to [TConsole](/docs/solive-props#tconsole)) | - | +| deploy | Deployment block | TDeploy | (Refer to [TDeploy](/docs/solive-props#tdeploy)) | - | ## TFileNav -顶部文件导航属性表 +Top file navigation property table -| 属性名 | 介绍 | 类型 | 默认值 | 是否必填 | -| ----- | ----- | ----- | ----- | ----- | -| open | 是否开启功能 | boolean | true | - | +| Property Name | Description | Type | Default Value | Required | +| ------------- | ----------- | ---- | ------------- | -------- | +| open | Whether to enable the feature | boolean | true | - | ## TConsole -日志块属性表 +Log block property table -| 属性名 | 介绍 | 类型 | 默认值 | 是否必填 | -| ----- | ----- | ----- | ----- | ----- | -| defaultVisible | 默认是否显示 | boolean | true | - | -| defaultHeight | 默认高度 | string | "30%" | - | -| minHeight | 最小高度 | number | 78 | - | -| triggerControl | 是否开启控制 | boolean | true | - | -| open | 是否开启功能 | boolean | true | - | +| Property Name | Description | Type | Default Value | Required | +| ------------- | ----------- | ---- | ------------- | -------- | +| defaultVisible | Default visibility | boolean | true | - | +| defaultHeight | Default height | string | "30%" | - | +| minHeight | Minimum height | number | 78 | - | +| triggerControl | Whether to enable control | boolean | true | - | +| open | Whether to enable the feature | boolean | true | - | ## TDeploy -部署块属性表 +Deployment block property table -| 属性名 | 介绍 | 类型 | 默认值 | 是否必填 | -| ----- | ----- | ----- | ----- | ----- | -| defaultVisible | 默认是否显示 | boolean | true | - | -| defaultWidth | 默认宽度 | string | "200px" | - | -| minWidth | 最小宽度 | number | 140 | - | -| maxWidth | 最大宽度 | number | 240 | - | -| open | 是否开启功能 | boolean | true | - | +| Property Name | Description | Type | Default Value | Required | +| ------------- | ----------- | ---- | ------------- | -------- | +| defaultVisible | Default visibility | boolean | true | - | +| defaultWidth | Default width | string | "200px" | - | +| minWidth | Minimum width | number | 140 | - | +| maxWidth | Maximum width | number | 240 | - | +| open | Whether to enable the feature | boolean | true | - | \ No newline at end of file diff --git a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/expansion/docusaurus-plugins.mdx b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/docusaurus-plugins.mdx similarity index 97% rename from apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/expansion/docusaurus-plugins.mdx rename to apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/docusaurus-plugins.mdx index 402a6a5..8848173 100644 --- a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/expansion/docusaurus-plugins.mdx +++ b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/docusaurus-plugins.mdx @@ -3,11 +3,11 @@ title: Docusaurus 插件 hide_title: true --- -## Docusaurus 插件 +# Docusaurus 插件 > 你可以使用 `solive-docusaurus-theme-code` 插件快速集成一个轻量级Solidity Editor嵌入你的文档. -### 安装 +## 安装 1. 首先我们需要安装 `solive-docusaurus-theme-code` 插件: ```bash npm2yarn @@ -24,7 +24,7 @@ module.exports = { }; ``` -### 快速使用 +## 快速使用 1. 你需要注意在代码块标记solive,和配置solive的属性: ```md @@ -97,7 +97,7 @@ contract Storage { ```\ ```` -### 展示结果: +## 展示结果: ```solidity solive height=300px /** diff --git a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/expansion/index.mdx b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/index.mdx similarity index 100% rename from apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/expansion/index.mdx rename to apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/index.mdx diff --git a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/get-started.mdx b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/get-started.mdx index a47d28e..dd5e41e 100644 --- a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/get-started.mdx +++ b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/get-started.mdx @@ -7,9 +7,9 @@ hide_title: true import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## 开始 +# 开始 -### 安装 +## 安装 @@ -35,9 +35,9 @@ pnpm install solive -### 使用 +## 使用 -#### 1. 配置webpack +### 1. 配置webpack @@ -132,13 +132,13 @@ module.exports = nextConfig -#### 2. 引入样式 +### 2. 引入样式 ```js import 'solive-core/dist/index.css'; ``` -#### 3. 使用 +### 3. 使用 ```react Date: Tue, 2 May 2023 23:21:17 +0800 Subject: [PATCH 07/11] solive to SoLive --- apps/demo/README.md | 2 +- apps/doc/docs/solive-props.mdx | 6 +++--- apps/doc/docusaurus.config.js | 16 ++++++++-------- .../current/extension/docusaurus-plugins.mdx | 4 ++-- .../current/introduction.mdx | 8 ++++---- .../src/components/HomepageFeatures/index.tsx | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/demo/README.md b/apps/demo/README.md index 12682f3..c24a2bc 100644 --- a/apps/demo/README.md +++ b/apps/demo/README.md @@ -1,4 +1,4 @@ -# Solive Demo +# SoLive Demo ## run ``` diff --git a/apps/doc/docs/solive-props.mdx b/apps/doc/docs/solive-props.mdx index 9c1af68..759b59e 100644 --- a/apps/doc/docs/solive-props.mdx +++ b/apps/doc/docs/solive-props.mdx @@ -16,9 +16,9 @@ hide_title: true | rounded | Window corner radius | string | 12px | - | | disableValidation | Whether to disable validation | boolean | false | - | | monacoEditorOptions | Monaco editor configuration | (Refer to [IStandaloneEditorConstructionOptions](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html)) | - | - | -| fileNav | Top file navigation | TFileNav | (Refer to [TFileNav](/docs/solive-props#tfilenav)) | - | -| console | Log block | TConsole | (Refer to [TConsole](/docs/solive-props#tconsole)) | - | -| deploy | Deployment block | TDeploy | (Refer to [TDeploy](/docs/solive-props#tdeploy)) | - | +| fileNav | Top file navigation | TFileNav | (Refer to [TFileNav](/docs/SoLive-props#tfilenav)) | - | +| console | Log block | TConsole | (Refer to [TConsole](/docs/SoLive-props#tconsole)) | - | +| deploy | Deployment block | TDeploy | (Refer to [TDeploy](/docs/SoLive-props#tdeploy)) | - | ## TFileNav diff --git a/apps/doc/docusaurus.config.js b/apps/doc/docusaurus.config.js index 7757883..a2c7c02 100644 --- a/apps/doc/docusaurus.config.js +++ b/apps/doc/docusaurus.config.js @@ -31,7 +31,7 @@ const SECTIONS = [ /** @type {import('@docusaurus/types').Config} */ const config = { - title: "Solive", + title: "SoLive", tagline: "Online playground for Solidity", favicon: "img/favicon.ico", @@ -43,8 +43,8 @@ const config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: "Solive", // Usually your GitHub org/user name. - projectName: "Solive", // Usually your repo name. + organizationName: "SoLive", // Usually your GitHub org/user name. + projectName: "SoLive", // Usually your repo name. onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", @@ -57,7 +57,7 @@ const config = { locales: ["en"], }, - themes: ['solive-docusaurus-theme-code'], + themes: ['SoLive-docusaurus-theme-code'], presets: [ [ @@ -93,9 +93,9 @@ const config = { // Replace with your project's social card image: "img/docusaurus-social-card.jpg", navbar: { - title: "Solive", + title: "SoLive", logo: { - alt: "Solive", + alt: "SoLive", src: "img/logo_300x300.png", }, items: [ @@ -137,12 +137,12 @@ const config = { items: [ { label: "GitHub", - href: "https://github.com/WTFAcademy/solive", + href: "https://github.com/WTFAcademy/SoLive", }, ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} Solive, Inc. Built with Docusaurus.`, + copyright: `Copyright © ${new Date().getFullYear()} SoLive, Inc. Built with Docusaurus.`, }, prism: { theme: lightCodeTheme, diff --git a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/docusaurus-plugins.mdx b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/docusaurus-plugins.mdx index 8848173..fabc82f 100644 --- a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/docusaurus-plugins.mdx +++ b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/extension/docusaurus-plugins.mdx @@ -9,7 +9,7 @@ hide_title: true ## 安装 -1. 首先我们需要安装 `solive-docusaurus-theme-code` 插件: +1. 首先我们需要安装 `SoLive-docusaurus-theme-code` 插件: ```bash npm2yarn npm install --save solive-docusaurus-theme-code ``` @@ -33,7 +33,7 @@ module.exports = { ```\ ``` -2. 你可以在代码块中配置solive相关属性 `height`(具体参考[属性表](./introduction.mdx)): +2. 你可以在代码块中配置SoLive相关属性 `height`(具体参考[属性表](./introduction.mdx)): ```md ```solidity solive height=300px // your code diff --git a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/introduction.mdx b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/introduction.mdx index a55a7c3..8e1ee52 100644 --- a/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/introduction.mdx +++ b/apps/doc/i18n/zh/docusaurus-plugin-content-docs/current/introduction.mdx @@ -5,14 +5,14 @@ slug: /introduction hide_title: true --- # 介绍 -Solive 是一个轻量级且灵活的在线 Solidity 试验场,受 Remix-IDE 和 React-Live 启发。Solive 使您能够在 React 组件中编辑、编译、部署和与 Solidity 智能合约进行交互。您可以将 Solive 集成到您的网站或教程中,让用户直接在浏览器中执行 Solidity 代码。此外,Solive 还兼容移动浏览器。 +SoLive 是一个轻量级且灵活的在线 Solidity 试验场,受 Remix-IDE 和 React-Live 启发。SoLive 使您能够在 React 组件中编辑、编译、部署和与 Solidity 智能合约进行交互。您可以将 SoLive 集成到您的网站或教程中,让用户直接在浏览器中执行 Solidity 代码。此外,SoLive 还兼容移动浏览器。 ## 使用场景: -1. 教育:在 [WTF Solidity](https://github.com/AmazingAng/WTF-Solidity) 教程中,我们将使用 Solive 替换传统的代码块,让学生能够同时阅读和运行代码。 -2. 开发人员入门:Layer2 项目可以利用 Solive 吸引并招募以太坊开发者。 +1. 教育:在 [WTF Solidity](https://github.com/AmazingAng/WTF-Solidity) 教程中,我们将使用 SoLive 替换传统的代码块,让学生能够同时阅读和运行代码。 +2. 开发人员入门:Layer2 项目可以利用 SoLive 吸引并招募以太坊开发者。 ## 如何实现 -Solive 的设计轻量且灵活。它仅包含编辑、编译、部署和与智能合约进行交互所需的关键模块。 +SoLive 的设计轻量且灵活。它仅包含编辑、编译、部署和与智能合约进行交互所需的关键模块。 1. 编辑模块:我们使用 Monaco Editor 作为代码编辑器。 2. 编译模块:我们使用 `solcjs`,根据所选的 Solidity 版本进行智能合约编译。 3. 部署模块:我们使用 `ethersjs V5` 和 `ethereumjs vm` 的组合将编译后的合约部署到本地 EVM 上。 diff --git a/apps/doc/src/components/HomepageFeatures/index.tsx b/apps/doc/src/components/HomepageFeatures/index.tsx index 8e36afa..5c6c95b 100644 --- a/apps/doc/src/components/HomepageFeatures/index.tsx +++ b/apps/doc/src/components/HomepageFeatures/index.tsx @@ -53,9 +53,9 @@ export default function HomepageFeatures(): JSX.Element {
-

Say hi to Solive 🤟

+

Say hi to SoLive 🤟


-

Solive is a flexible online playground for Solidity smart contracts, inspired by remix-IDE and react-live. Solive enables you to edit, compile, deploy, and interact with solidity smart contracts in one React component. You can embed solive into your website/tutorials and let users run solidity code in the browser. Solive is also compatible with mobile browsers.

+

SoLive is a flexible online playground for Solidity smart contracts, inspired by remix-IDE and react-live. SoLive enables you to edit, compile, deploy, and interact with solidity smart contracts in one React component. You can embed SoLive into your website/tutorials and let users run solidity code in the browser. SoLive is also compatible with mobile browsers.

What's next:
From de1a8337c1eebd9f7ffc0c37d9297f8262b36e9a Mon Sep 17 00:00:00 2001 From: "Li, Amazing Ang" Date: Wed, 3 May 2023 10:56:35 +0800 Subject: [PATCH 08/11] Update docusaurus.config.js --- apps/doc/docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/doc/docusaurus.config.js b/apps/doc/docusaurus.config.js index a2c7c02..b240fea 100644 --- a/apps/doc/docusaurus.config.js +++ b/apps/doc/docusaurus.config.js @@ -57,7 +57,7 @@ const config = { locales: ["en"], }, - themes: ['SoLive-docusaurus-theme-code'], + themes: ['solive-docusaurus-theme-code'], presets: [ [ From f355d17e51b3527d515ffdd6935b0b73252b1457 Mon Sep 17 00:00:00 2001 From: "Li, Amazing Ang" Date: Wed, 3 May 2023 13:32:05 +0800 Subject: [PATCH 09/11] Update docusaurus.config.js --- apps/doc/docusaurus.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/doc/docusaurus.config.js b/apps/doc/docusaurus.config.js index b240fea..aa07d9e 100644 --- a/apps/doc/docusaurus.config.js +++ b/apps/doc/docusaurus.config.js @@ -91,6 +91,11 @@ const config = { /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ // Replace with your project's social card + colorMode: { + defaultMode: 'dark', + disableSwitch: false, + respectPrefersColorScheme: false, + }, image: "img/docusaurus-social-card.jpg", navbar: { title: "SoLive", From 72546b26d49d27f46606464fa8d24a28fd4201ab Mon Sep 17 00:00:00 2001 From: "Li, Amazing Ang" Date: Wed, 3 May 2023 13:47:28 +0800 Subject: [PATCH 10/11] Update docusaurus.config.js --- apps/doc/docusaurus.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/doc/docusaurus.config.js b/apps/doc/docusaurus.config.js index aa07d9e..8c29b0a 100644 --- a/apps/doc/docusaurus.config.js +++ b/apps/doc/docusaurus.config.js @@ -109,7 +109,12 @@ const config = { docId: "introduction", position: "left", label: "Docs", - } + }, + { + href: 'https://demo.solive.wtf', + label: 'Playground', + position: 'left', + }, ], }, footer: { From c41b0d33806d0f6c968ca02d2716bbdbfca9718e Mon Sep 17 00:00:00 2001 From: "Li, Amazing Ang" Date: Wed, 3 May 2023 20:46:59 +0800 Subject: [PATCH 11/11] add i18n button --- README.md | 4 ++-- apps/doc/docusaurus.config.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ace895..d9e206a 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ A flexible online playground for Solidity smart contract, inspired by remix-IDE and react-live ### Demo -- Check demo website: https://solive.wtf +- Check demo website: https://demo.solive.wtf - build demo: [demo](./apps/demo) ### DOC -- Check doc website: https://solive-doc-git-dev-wtfacademy.vercel.app +- Check doc website: https://solive.wtf - build doc: [doc](./apps/doc) diff --git a/apps/doc/docusaurus.config.js b/apps/doc/docusaurus.config.js index 8c29b0a..c7fa1a2 100644 --- a/apps/doc/docusaurus.config.js +++ b/apps/doc/docusaurus.config.js @@ -54,7 +54,7 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: "en", - locales: ["en"], + locales: ["en", `zh`], }, themes: ['solive-docusaurus-theme-code'], @@ -115,6 +115,9 @@ const config = { label: 'Playground', position: 'left', }, + { + type: 'localeDropdown', + }, ], }, footer: {