Skip to content

Commit 1374b7a

Browse files
authored
[fix] Fix edit url and upgrade docusaurus (#142)
* upgrade docusaurus * fix edit url * fix links
1 parent 4f13e1f commit 1374b7a

File tree

6 files changed

+2043
-1139
lines changed

6 files changed

+2043
-1139
lines changed

docs/03-move/06-deploy-first-move-contract.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ There are two CLI tools to deploy binary package to chain: `mpm deploy` and `sta
8484

8585
- mpm deploy
8686

87-
Account provider is need to signature the deployment transaction. There are three types of account privder for `mpm deploy` command:
87+
Account provider is need to signature the deployment transaction. There are three types of account provider for `mpm deploy` command:
8888
1) local-account-dir; 2) secret-file; 3) environment variable.
8989

9090
The commands corresponding to the three account provider are as follows:

docs/03-move/07-interacting-with-the-contract.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Interactiong with the contract by CLI
1+
# Interacting with the contract by CLI
22

33
This article guides you on how to interact with the contract.
44

docusaurus.config.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const config = {
1515
onBrokenLinks: 'throw',
1616
onBrokenMarkdownLinks: 'warn',
1717
favicon: '/img/favicon.ico',
18-
organizationName: 'staroinorg', // Usually your GitHub org/user name.
18+
organizationName: 'starcoinorg', // Usually your GitHub org/user name.
1919
projectName: 'starcoin-cookbook', // Usually your repo name.
2020
i18n: {
2121
defaultLocale: 'en',
@@ -31,7 +31,7 @@ const config = {
3131
},
3232
},
3333
},
34-
plugins: [require.resolve("@cmfcmf/docusaurus-search-local")],
34+
plugins: [require.resolve("@cmfcmf/docusaurus-search-local")],
3535
presets: [
3636
[
3737
'classic',
@@ -40,7 +40,15 @@ const config = {
4040
docs: {
4141
sidebarPath: require.resolve('./sidebars.js'),
4242
// Please change this to your repo.
43-
editUrl: 'https://github.com/starcoinorg/starcoin-cookbook/edit/main/',
43+
editUrl: ({ locale, versionDocsDirPath, docPath }) => {
44+
let link
45+
if (locale === 'en') {
46+
link = `https://github.com/starcoinorg/starcoin-cookbook/edit/main/${versionDocsDirPath}/${docPath}`
47+
} else {
48+
link = `https://github.com/starcoinorg/starcoin-cookbook/edit/main/i18n/${locale}/docusaurus-plugin-content-docs/current/${docPath}`
49+
}
50+
return link
51+
},
4452
},
4553
blog: {
4654
showReadingTime: true,

i18n/zh/docusaurus-plugin-content-docs/current/03-move/11-quick-start.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
提前准备:
88

9-
1. 需要按照[如何设置本地开发网络](./02-getting-started/02-setup/03-dev-network.md)搭建 dev 网络,并通过 Starcoin 控制台连接到 dev 网络。
10-
2. 按照[账号管理](./02-getting-started/03-accounts/1.account-manage.md)创建一个账号或者使用已有账号,并且给账号里转一点 STC。
11-
3. 通过[第一笔链上交易](./02-getting-started/03-accounts/2.first-transaction.md)对 transaction 有基本理解。
9+
1. 需要按照[如何设置本地开发网络](../02-getting-started/02-setup/03-dev-network.md)搭建 dev 网络,并通过 Starcoin 控制台连接到 dev 网络。
10+
2. 按照[账号管理](../02-getting-started/03-accounts/1.account-manage.md)创建一个账号或者使用已有账号,并且给账号里转一点 STC。
11+
3. 通过[第一笔链上交易](../02-getting-started/03-accounts/2.first-transaction.md)对 transaction 有基本理解。
1212

1313
下面先介绍一下必备的工具和项目结构。
1414
接下来将介绍一些必备工具和项目结构。

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
},
1616
"dependencies": {
1717
"@cmfcmf/docusaurus-search-local": "^0.10.0",
18-
"@docusaurus/core": "2.0.0-beta.17",
19-
"@docusaurus/preset-classic": "2.0.0-beta.17",
18+
"@docusaurus/core": "^2.0.0-beta.22",
19+
"@docusaurus/preset-classic": "^2.0.0-beta.22",
2020
"@mdx-js/react": "^1.6.22",
2121
"clsx": "^1.1.1",
2222
"prism-react-renderer": "^1.2.1",

0 commit comments

Comments
 (0)