@aigne/doc-smith 0.8.11-beta.5 → 0.8.11-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +9 -2
  4. package/README.md +1 -1
  5. package/agents/clear/choose-contents.mjs +2 -2
  6. package/agents/clear/clear-document-structure.mjs +8 -8
  7. package/agents/clear/index.yaml +1 -1
  8. package/agents/evaluate/document-structure.yaml +1 -1
  9. package/agents/generate/check-document-structure.yaml +3 -3
  10. package/agents/generate/check-need-generate-structure.mjs +8 -8
  11. package/agents/generate/document-structure-tools/add-document.mjs +3 -3
  12. package/agents/generate/document-structure-tools/delete-document.mjs +2 -2
  13. package/agents/generate/document-structure-tools/move-document.mjs +3 -2
  14. package/agents/generate/document-structure-tools/update-document.mjs +2 -2
  15. package/agents/generate/generate-structure.yaml +1 -1
  16. package/agents/generate/update-document-structure.yaml +3 -3
  17. package/agents/generate/user-review-document-structure.mjs +10 -10
  18. package/agents/update/batch-generate-document.yaml +1 -1
  19. package/agents/update/check-document.mjs +2 -2
  20. package/agents/utils/check-feedback-refiner.mjs +1 -1
  21. package/agents/utils/choose-docs.mjs +1 -1
  22. package/agents/utils/load-document-all-content.mjs +3 -3
  23. package/agents/utils/load-sources.mjs +1 -1
  24. package/agents/utils/save-docs.mjs +7 -28
  25. package/aigne.yaml +2 -2
  26. package/docs/_sidebar.md +1 -1
  27. package/docs/advanced-how-it-works.md +3 -3
  28. package/docs/advanced-quality-assurance.md +1 -1
  29. package/docs/cli-reference.ja.md +151 -80
  30. package/docs/cli-reference.md +126 -55
  31. package/docs/cli-reference.zh-TW.md +133 -62
  32. package/docs/cli-reference.zh.md +143 -72
  33. package/docs/configuration-interactive-setup.md +1 -1
  34. package/docs/configuration-language-support.md +1 -1
  35. package/docs/configuration-preferences.md +1 -1
  36. package/docs/configuration.ja.md +104 -48
  37. package/docs/configuration.md +58 -2
  38. package/docs/configuration.zh-TW.md +99 -42
  39. package/docs/configuration.zh.md +78 -21
  40. package/docs/features-generate-documentation.ja.md +63 -44
  41. package/docs/features-generate-documentation.md +54 -35
  42. package/docs/features-generate-documentation.zh-TW.md +67 -48
  43. package/docs/features-generate-documentation.zh.md +61 -41
  44. package/docs/features-publish-your-docs.ja.md +69 -46
  45. package/docs/features-publish-your-docs.md +65 -42
  46. package/docs/features-publish-your-docs.zh-TW.md +73 -50
  47. package/docs/features-publish-your-docs.zh.md +67 -44
  48. package/docs/features-translate-documentation.ja.md +35 -33
  49. package/docs/features-translate-documentation.md +24 -22
  50. package/docs/features-translate-documentation.zh-TW.md +32 -30
  51. package/docs/features-translate-documentation.zh.md +29 -27
  52. package/docs/features-update-and-refine.ja.md +120 -66
  53. package/docs/features-update-and-refine.md +110 -56
  54. package/docs/features-update-and-refine.zh-TW.md +116 -62
  55. package/docs/features-update-and-refine.zh.md +118 -64
  56. package/docs/getting-started.ja.md +22 -22
  57. package/docs/getting-started.md +1 -1
  58. package/docs/getting-started.zh-TW.md +16 -16
  59. package/docs/getting-started.zh.md +28 -28
  60. package/docs/overview.md +3 -3
  61. package/docs-mcp/analyze-docs-relevance.yaml +6 -6
  62. package/docs-mcp/docs-search.yaml +1 -1
  63. package/package.json +2 -2
  64. package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
  65. package/prompts/common/document-structure/document-structure-rules.md +2 -2
  66. package/prompts/detail/document-rules.md +1 -1
  67. package/prompts/detail/generate-document.md +1 -1
  68. package/prompts/evaluate/document-structure.md +6 -6
  69. package/prompts/structure/check-document-structure.md +10 -10
  70. package/prompts/structure/document-rules.md +2 -2
  71. package/prompts/structure/generate-structure-system.md +3 -3
  72. package/prompts/structure/structure-example.md +1 -1
  73. package/prompts/structure/structure-getting-started.md +1 -1
  74. package/prompts/structure/update-document-structure.md +9 -9
  75. package/prompts/utils/feedback-refiner.md +1 -1
  76. package/tests/agents/clear/choose-contents.test.mjs +1 -1
  77. package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
  78. package/tests/agents/evaluate/generate-report.test.mjs +1 -1
  79. package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
  80. package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
  81. package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
  82. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +3 -3
  83. package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
  84. package/tests/agents/generate/user-review-document-structure.test.mjs +7 -5
  85. package/tests/agents/update/check-document.test.mjs +1 -1
  86. package/tests/agents/utils/format-document-structure.test.mjs +5 -5
  87. package/tests/agents/utils/load-sources.test.mjs +4 -4
  88. package/tests/agents/utils/save-docs.test.mjs +1 -1
  89. package/tests/utils/conflict-detector.test.mjs +1 -1
  90. package/tests/utils/docs-finder-utils.test.mjs +8 -8
  91. package/types/document-structure-schema.mjs +9 -9
  92. package/utils/conflict-detector.mjs +1 -1
  93. package/utils/constants/index.mjs +4 -4
  94. package/utils/docs-finder-utils.mjs +11 -11
  95. package/utils/markdown-checker.mjs +1 -1
@@ -1,58 +1,81 @@
1
1
  # Publish Your Docs
2
2
 
3
- After generating your documentation, the `aigne doc publish` command uploads your content to a Discuss Kit platform, making it accessible online. This guide explains how to publish your documentation to either the official platform or your own self-hosted website.
3
+ After generating your documentation, the `aigne doc publish` command uploads your files and makes them accessible via a shareable link. This guide provides a step-by-step process for publishing your documentation to either the official AIGNE platform or a self-hosted instance.
4
4
 
5
5
  ## The Publishing Process
6
6
 
7
- The `aigne doc publish` command initiates an interactive process. The first time you publish to a new destination, it will guide you through authentication. Subsequent publishes will use saved credentials.
7
+ The `aigne doc publish` command starts an interactive workflow. The first time you publish to a destination, the CLI will open a browser to guide you through a one-time authentication process. For subsequent publishes, it will use the saved credentials stored in `~/.aigne/doc-smith-connected.yaml`.
8
8
 
9
- ```d2 The Publishing Flow icon=lucide:upload-cloud
10
- direction: down
9
+ ```d2 The Publishing Workflow icon=lucide:upload-cloud
11
10
  shape: sequence_diagram
12
11
 
13
- User: { shape: c4-person }
14
- CLI: { label: "AIGNE CLI" }
15
- Browser: { label: "Browser" }
16
- Platform: { label: "Discuss Kit Platform" }
17
-
18
- User -> CLI: "aigne doc publish"
19
-
20
- alt: "First-time publish or missing config" {
21
- CLI -> User: "Select Platform\n(Official / Self-Hosted)"
22
- User -> CLI: "Provides selection"
23
- CLI -> Browser: "Opens authentication URL"
24
- User -> Browser: "Logs in & authorizes"
25
- Browser -> Platform: "Sends credentials"
26
- Platform -> CLI: "Returns Access Token"
27
- CLI -> CLI: "Saves Token for future use"
12
+ User: {
13
+ label: "Developer / CI-CD"
14
+ shape: c4-person
28
15
  }
29
16
 
30
- CLI -> Platform: "Uploads docs & media files"
31
- Platform -> CLI: "Success response"
32
- CLI -> User: "✅ Published Successfully!"
17
+ CLI: {
18
+ label: "CLI\n(aigne doc publish)"
19
+ }
20
+
21
+ Local-Config: {
22
+ label: "Local Config\n(~/.aigne/...)"
23
+ shape: cylinder
24
+ }
33
25
 
26
+ Browser
27
+
28
+ Platform: {
29
+ label: "Platform\n(Official or Self-Hosted)"
30
+ }
31
+
32
+ User -> CLI: "Run command"
33
+
34
+ alt "Interactive Mode" {
35
+ CLI -> Local-Config: "Check for credentials"
36
+ opt "Credentials not found (First time)" {
37
+ CLI -> User: "Prompt to choose platform"
38
+ User -> CLI: "Platform selected"
39
+ CLI -> Browser: "Open auth URL"
40
+ User -> Browser: "Login & Authorize"
41
+ Browser -> Platform: "Request token"
42
+ Platform -> Browser: "Return token"
43
+ Browser -> CLI: "Send token to CLI"
44
+ CLI -> Local-Config: "Save credentials"
45
+ }
46
+ CLI -> Platform: "Upload documentation"
47
+ Platform -> CLI: "Confirm success"
48
+ CLI -> User: "Display success message"
49
+ }
50
+
51
+ alt "CI/CD Mode" {
52
+ note over CLI: "Reads token from ENV VAR"
53
+ CLI -> Platform: "Upload documentation"
54
+ Platform -> CLI: "Confirm success"
55
+ CLI -> User: "Return success status"
56
+ }
34
57
  ```
35
58
 
36
59
  ## Publishing Options
37
60
 
38
- You have two main options for hosting your documentation:
61
+ You can choose between two primary destinations for hosting your documentation:
39
62
 
40
63
  <x-cards data-columns="2">
41
64
  <x-card data-title="Official Platform" data-icon="lucide:globe">
42
- Publish to [docsmith.aigne.io](https://docsmith.aigne.io/app/), a free, public hosting platform provided by AIGNE. This is a good option for open-source projects or to quickly share your docs.
65
+ Publish to docsmith.aigne.io, a service operated by AIGNE. This is a straightforward option for open-source projects or for quickly sharing your documentation publicly.
43
66
  </x-card>
44
- <x-card data-title="Your Own Website" data-icon="lucide:server">
45
- Publish to your own Discuss Kit instance for full control over access and branding. This is suitable for internal or private documentation. You can get a Discuss Kit instance from the [Blocklet Store](https://store.blocklet.dev/blocklets/z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu).
67
+ <x-card data-title="Self-Hosted Instance" data-icon="lucide:server">
68
+ Publish to your own Discuss Kit instance for complete control over branding, access, and data privacy. This is the recommended option for internal or private documentation. You can run your own Discuss Kit instance by following the instructions available at the official documentation.
46
69
  </x-card>
47
70
  </x-cards>
48
71
 
49
72
  ## Step-by-Step Guide
50
73
 
51
- Follow these steps to publish your documentation for the first time.
74
+ Follow these steps to publish your documentation.
52
75
 
53
76
  ### 1. Run the Publish Command
54
77
 
55
- In your project's root directory, run the following command:
78
+ Navigate to your project's root directory and execute the following command:
56
79
 
57
80
  ```bash Terminal icon=lucide:terminal
58
81
  aigne doc publish
@@ -60,19 +83,19 @@ aigne doc publish
60
83
 
61
84
  ### 2. Choose Your Platform
62
85
 
63
- If this is your first time publishing, you will be prompted to select a destination. Choose the option that fits your needs.
86
+ If this is your first time publishing, you will be prompted to select a destination. Choose the option that fits your requirements.
64
87
 
65
- ![Choose between the official platform or a self-hosted instance](https://docsmith.aigne.io/image-bin/uploads/9fd929060b5abe13d03cf5eb7aea85aa.png)
88
+ ![Choose between the official platform or a self-hosted instance](https://docsmith.aigne.io/image-bin/uploads/9fd929060b5abe13d0_3cf5eb7aea85aa.png)
66
89
 
67
- If you select your own website, you will be asked to enter its URL.
90
+ If you select a self-hosted instance, you will be asked to enter its URL.
68
91
 
69
92
  ### 3. Authenticate Your Account
70
93
 
71
- For the first connection to a new platform, a browser window will open for you to log in and authorize the CLI. This is a one-time step per platform; your access token is saved locally in `~/.aigne/doc-smith-connected.yaml` for future use.
94
+ For the initial connection, a browser window will open automatically for you to log in and authorize the CLI. This step is only required once per platform. The access token is saved locally for future use.
72
95
 
73
96
  ### 4. Confirmation
74
97
 
75
- Once the upload is complete, a success message will appear in your terminal.
98
+ Once the upload is complete, a success message will appear in your terminal, confirming that the documentation is live.
76
99
 
77
100
  ```
78
101
  ✅ Documentation Published Successfully!
@@ -80,14 +103,14 @@ Once the upload is complete, a success message will appear in your terminal.
80
103
 
81
104
  ## Publishing in CI/CD Environments
82
105
 
83
- For automated workflows, you can provide arguments and environment variables to bypass the interactive prompts.
106
+ To use the publish command in automated workflows like CI/CD pipelines, you can bypass the interactive prompts by providing the necessary information through arguments and environment variables.
84
107
 
85
108
  | Method | Name | Description |
86
109
  |---|---|---|
87
- | **Argument** | `--appUrl` | Specifies the URL of your Discuss Kit instance directly. |
88
- | **Env Var** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | Provides the access token, skipping the interactive login. |
110
+ | **Argument** | `--appUrl` | Specifies the URL of your Discuss Kit instance. |
111
+ | **Env Var** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | Provides the access token to skip the interactive login process. |
89
112
 
90
- Here is an example of a non-interactive publish command suitable for a CI/CD pipeline:
113
+ Here is an example of a non-interactive publish command suitable for a CI/CD script:
91
114
 
92
115
  ```bash CI/CD Example icon=lucide:workflow
93
116
  export DOC_DISCUSS_KIT_ACCESS_TOKEN="your_access_token_here"
@@ -96,12 +119,12 @@ aigne doc publish --appUrl https://docs.mycompany.com
96
119
 
97
120
  ## Troubleshooting
98
121
 
99
- If you encounter an issue during publishing, check for these common problems:
122
+ If you encounter an issue during the publishing process, it may be due to one of the following common problems.
100
123
 
101
- - **Connection Error**: The provided URL for your self-hosted instance might be incorrect, or the server may be unreachable. Verify the URL and your network connection.
124
+ - **Connection Error**: The CLI may return an error message like `Unable to connect to: <URL>`. This can be caused by network issues, a server that is temporarily unavailable, or an incorrect URL. Verify that the URL is correct and the server is reachable.
102
125
 
103
- - **Invalid Website URL**: The URL must point to a valid website built on the ArcBlock platform. The CLI will show an error like `The provided URL is not a valid website on ArcBlock platform`. To host your documentation, you can start by getting a [Discuss Kit instance from the store](https://store.blocklet.dev/blocklets/z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu).
126
+ - **Invalid Website URL**: The command may fail with the message `The provided URL is not a valid website on ArcBlock platform`. The destination URL must be a website built on the ArcBlock platform. To host your documentation, you can run your own instance of Discuss Kit.
104
127
 
105
- - **Missing Required Components**: The destination website must have the Discuss Kit component installed. If it is missing, the CLI will return an error like `This website does not have required components for publishing`. Please refer to the [Discuss Kit documentation](https://www.arcblock.io/docs/web3-kit/en/discuss-kit) to add the necessary component.
128
+ - **Missing Required Components**: An error stating `This website does not have required components for publishing` indicates that the destination website does not have the Discuss Kit component installed. Please refer to the Discuss Kit documentation to add the necessary component to your site.
106
129
 
107
- For a complete list of commands and options, refer to the [CLI Command Reference](./cli-reference.md).
130
+ For a complete list of commands and options, see the [CLI Command Reference](./cli-reference.md).
@@ -1,58 +1,81 @@
1
- # 發布您的文件
1
+ # 發佈您的文件
2
2
 
3
- 產生文件後,`aigne doc publish` 指令會將您的內容上傳到 Discuss Kit 平台,使其可以在線上存取。本指南將說明如何將您的文件發布到官方平台或您自己託管的網站。
3
+ 產生您的文件後,`aigne doc publish` 指令會上傳您的檔案,並透過可分享的連結使其可供存取。本指南提供了將您的文件發佈到官方 AIGNE 平台或自行託管實例的逐步流程。
4
4
 
5
- ## 發布流程
5
+ ## 發佈流程
6
6
 
7
- `aigne doc publish` 指令會啟動一個互動式流程。當您首次發布到新目標時,它會引導您進行身份驗證。後續的發布將使用已儲存的憑證。
7
+ `aigne doc publish` 指令會啟動一個互動式工作流程。當您第一次發佈到某個目的地時,CLI 會開啟瀏覽器引導您完成一次性的身份驗證過程。對於後續的發佈,它將使用儲存在 `~/.aigne/doc-smith-connected.yaml` 中的已儲存憑證。
8
8
 
9
- ```d2 發布流程 icon=lucide:upload-cloud
10
- direction: down
9
+ ```d2 The Publishing Workflow icon=lucide:upload-cloud
11
10
  shape: sequence_diagram
12
11
 
13
- 使用者: { shape: c4-person }
14
- CLI: { label: "AIGNE CLI" }
15
- 瀏覽器: { label: "瀏覽器" }
16
- 平台: { label: "Discuss Kit 平台" }
17
-
18
- 使用者 -> CLI: "aigne doc publish"
19
-
20
- alt: "首次發布或缺少設定" {
21
- CLI -> 使用者: "選擇平台\n(官方 / 自行託管)"
22
- 使用者 -> CLI: "提供選擇"
23
- CLI -> 瀏覽器: "開啟驗證 URL"
24
- 使用者 -> 瀏覽器: "登入並授權"
25
- 瀏覽器 -> 平台: "傳送憑證"
26
- 平台 -> CLI: "返回存取權杖"
27
- CLI -> CLI: "儲存權杖以供未來使用"
12
+ User: {
13
+ label: "開發者 / CI-CD"
14
+ shape: c4-person
28
15
  }
29
16
 
30
- CLI -> 平台: "上傳文件與媒體檔案"
31
- 平台 -> CLI: "成功回應"
32
- CLI -> 使用者: "✅ 發布成功!"
17
+ CLI: {
18
+ label: "CLI\n(aigne doc publish)"
19
+ }
20
+
21
+ Local-Config: {
22
+ label: "本地設定\n(~/.aigne/...)"
23
+ shape: cylinder
24
+ }
33
25
 
26
+ Browser
27
+
28
+ Platform: {
29
+ label: "平台\n(官方或自行託管)"
30
+ }
31
+
32
+ User -> CLI: "執行指令"
33
+
34
+ alt "互動模式" {
35
+ CLI -> Local-Config: "檢查憑證"
36
+ opt "找不到憑證 (首次)" {
37
+ CLI -> User: "提示選擇平台"
38
+ User -> CLI: "已選擇平台"
39
+ CLI -> Browser: "開啟驗證 URL"
40
+ User -> Browser: "登入並授權"
41
+ Browser -> Platform: "請求權杖"
42
+ Platform -> Browser: "返回權杖"
43
+ Browser -> CLI: "傳送權杖至 CLI"
44
+ CLI -> Local-Config: "儲存憑證"
45
+ }
46
+ CLI -> Platform: "上傳文件"
47
+ Platform -> CLI: "確認成功"
48
+ CLI -> User: "顯示成功訊息"
49
+ }
50
+
51
+ alt "CI/CD 模式" {
52
+ note over CLI: "從環境變數讀取權杖"
53
+ CLI -> Platform: "上傳文件"
54
+ Platform -> CLI: "確認成功"
55
+ CLI -> User: "返回成功狀態"
56
+ }
34
57
  ```
35
58
 
36
- ## 發布選項
59
+ ## 發佈選項
37
60
 
38
- 您有兩種主要選項來託管您的文件:
61
+ 您可以選擇兩個主要的目的地來託管您的文件:
39
62
 
40
63
  <x-cards data-columns="2">
41
64
  <x-card data-title="官方平台" data-icon="lucide:globe">
42
- 發布到 [docsmith.aigne.io](https://docsmith.aigne.io/app/),這是由 AIGNE 提供的免費公開託管平台。對於開源專案或需要快速分享文件的情況,這是一個不錯的選擇。
65
+ 發佈到由 AIGNE 營運的服務 docsmith.aigne.io。對於開源專案或希望快速公開分享文件的使用者來說,這是一個直接的選項。
43
66
  </x-card>
44
- <x-card data-title="您自己的網站" data-icon="lucide:server">
45
- 發布到您自己的 Discuss Kit 實例,以完全控制存取權限和品牌。這適用於內部或私密文件。您可以從 [Blocklet 商店](https://store.blocklet.dev/blocklets/z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu) 取得 Discuss Kit 實例。
67
+ <x-card data-title="自行託管實例" data-icon="lucide:server">
68
+ 發佈到您自己的 Discuss Kit 實例,以完全控制品牌、存取權限和資料隱私。這是內部或私有文件的推薦選項。您可以按照官方文件中的說明來執行您自己的 Discuss Kit 實例。
46
69
  </x-card>
47
70
  </x-cards>
48
71
 
49
- ## 步驟指南
72
+ ## 逐步指南
50
73
 
51
- 請按照以下步驟首次發布您的文件。
74
+ 請按照以下步驟發佈您的文件。
52
75
 
53
- ### 1. 執行發布指令
76
+ ### 1. 執行發佈指令
54
77
 
55
- 在您專案的根目錄中,執行以下指令:
78
+ 導覽至您專案的根目錄並執行以下指令:
56
79
 
57
80
  ```bash Terminal icon=lucide:terminal
58
81
  aigne doc publish
@@ -60,48 +83,48 @@ aigne doc publish
60
83
 
61
84
  ### 2. 選擇您的平台
62
85
 
63
- 如果這是您第一次發布,系統會提示您選擇一個目標。請選擇符合您需求的選項。
86
+ 如果這是您第一次發佈,系統會提示您選擇一個目的地。請選擇符合您需求的選項。
64
87
 
65
- ![在官方平台或自行託管的實例之間選擇](https://docsmith.aigne.io/image-bin/uploads/9fd929060b5abe13d03cf5eb7aea85aa.png)
88
+ ![在官方平台或自行託管實例之間進行選擇](https://docsmith.aigne.io/image-bin/uploads/9fd929060b5abe13d0_3cf5eb7aea85aa.png)
66
89
 
67
- 如果您選擇自己的網站,系統會要求您輸入其 URL。
90
+ 如果您選擇自行託管的實例,系統會要求您輸入其 URL。
68
91
 
69
92
  ### 3. 驗證您的帳戶
70
93
 
71
- 首次連接到新平台時,會開啟一個瀏覽器視窗讓您登入並授權 CLI。每個平台只需執行此步驟一次;您的存取權杖會儲存在本地的 `~/.aigne/doc-smith-connected.yaml` 檔案中,以供未來使用。
94
+ 初次連線時,瀏覽器視窗會自動開啟,讓您登入並授權給 CLI。此步驟每個平台僅需執行一次。存取權杖會儲存在本機以供未來使用。
72
95
 
73
96
  ### 4. 確認
74
97
 
75
- 上傳完成後,您的終端機中會顯示一條成功訊息。
98
+ 上傳完成後,您的終端機中會出現一條成功訊息,確認文件已上線。
76
99
 
77
100
  ```
78
- 文件發布成功!
101
+ Documentation Published Successfully!
79
102
  ```
80
103
 
81
- ## 在 CI/CD 環境中發布
104
+ ## 在 CI/CD 環境中發佈
82
105
 
83
- 對於自動化工作流程,您可以提供參數和環境變數來繞過互動式提示。
106
+ 若要在 CI/CD 管線等自動化工作流程中使用發佈指令,您可以透過參數和環境變數提供必要的資訊,以繞過互動式提示。
84
107
 
85
108
  | 方法 | 名稱 | 說明 |
86
109
  |---|---|---|
87
- | **參數** | `--appUrl` | 直接指定您的 Discuss Kit 實例的 URL。 |
88
- | **環境變數** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | 提供存取權杖,跳過互動式登入。 |
110
+ | **參數** | `--appUrl` | 指定您的 Discuss Kit 實例的 URL。 |
111
+ | **環境變數** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | 提供存取權杖以跳過互動式登入過程。 |
89
112
 
90
- 以下是一個適合 CI/CD 管線的非互動式發布指令範例:
113
+ 以下是一個適用於 CI/CD 指令碼的非互動式發佈指令範例:
91
114
 
92
- ```bash CI/CD 範例 icon=lucide:workflow
115
+ ```bash CI/CD Example icon=lucide:workflow
93
116
  export DOC_DISCUSS_KIT_ACCESS_TOKEN="your_access_token_here"
94
117
  aigne doc publish --appUrl https://docs.mycompany.com
95
118
  ```
96
119
 
97
120
  ## 疑難排解
98
121
 
99
- 如果在發布過程中遇到問題,請檢查以下常見問題:
122
+ 如果您在發佈過程中遇到問題,可能是由以下常見問題之一所引起。
100
123
 
101
- - **連線錯誤**:您提供的自行託管實例的 URL 可能不正確,或者伺服器無法連線。請驗證 URL 和您的網路連線。
124
+ - **連線錯誤**:CLI 可能會返回類似 `Unable to connect to: <URL>` 的錯誤訊息。這可能是由網路問題、伺服器暫時無法使用或 URL 不正確所引起。請確認 URL 是否正確且伺服器是否可連線。
102
125
 
103
- - **無效的網站 URL**:該 URL 必須指向一個在 ArcBlock 平台上建立的有效網站。CLI 會顯示類似 `The provided URL is not a valid website on ArcBlock platform` 的錯誤。若要託管您的文件,您可以先從[商店取得 Discuss Kit 實例](https://store.blocklet.dev/blocklets/z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu)。
126
+ - **無效的網站 URL**:指令可能會失敗並顯示訊息 `The provided URL is not a valid website on ArcBlock platform`。目標 URL 必須是建立在 ArcBlock 平台上的網站。若要託管您的文件,您可以執行自己的 Discuss Kit 實例。
104
127
 
105
- - **缺少必要元件**:目標網站必須安裝 Discuss Kit 元件。如果缺少該元件,CLI 將返回類似 `This website does not have required components for publishing` 的錯誤。請參考 [Discuss Kit 文件](https://www.arcblock.io/docs/web3-kit/en/discuss-kit) 來新增必要的元件。
128
+ - **缺少必要元件**:一個錯誤訊息,內容為 `This website does not have required components for publishing` 表示目標網站未安裝 Discuss Kit 元件。請參閱 Discuss Kit 文件,將必要的元件新增到您的網站。
106
129
 
107
- 有關指令和選項的完整清單,請參考 [CLI 指令參考](./cli-reference.md)。
130
+ 有關指令和選項的完整列表,請參閱 [CLI 指令參考](./cli-reference.md)。
@@ -1,58 +1,81 @@
1
1
  # 发布您的文档
2
2
 
3
- 生成文档后,`aigne doc publish` 命令会将您的内容上传到 Discuss Kit 平台,使其可以在线访问。本指南将说明如何将您的文档发布到官方平台或您自己的自托管网站。
3
+ 生成文档后,`aigne doc publish` 命令会上传您的文件,并通过一个可共享的链接使其可访问。本指南提供了将文档发布到 AIGNE 官方平台或自托管实例的分步过程。
4
4
 
5
- ## 发布流程
5
+ ## 发布过程
6
6
 
7
- `aigne doc publish` 命令会启动一个交互式流程。首次发布到新目的地时,它将引导您完成身份验证。后续的发布将使用已保存的凭据。
7
+ `aigne doc publish` 命令会启动一个交互式工作流程。当您首次发布到某个目标时,CLI 将打开一个浏览器来引导您完成一次性身份验证过程。对于后续的发布,它将使用保存在 `~/.aigne/doc-smith-connected.yaml` 中的凭证。
8
8
 
9
- ```d2 发布流程 icon=lucide:upload-cloud
10
- direction: down
9
+ ```d2 The Publishing Workflow icon=lucide:upload-cloud
11
10
  shape: sequence_diagram
12
11
 
13
- User: { shape: c4-person }
14
- CLI: { label: "AIGNE CLI" }
15
- Browser: { label: "浏览器" }
16
- Platform: { label: "Discuss Kit 平台" }
17
-
18
- User -> CLI: "aigne doc publish"
19
-
20
- alt: "首次发布或缺少配置" {
21
- CLI -> User: "选择平台\n(官方 / 自托管)"
22
- User -> CLI: "提供选择"
23
- CLI -> Browser: "打开认证 URL"
24
- User -> Browser: "登录并授权"
25
- Browser -> Platform: "发送凭据"
26
- Platform -> CLI: "返回访问令牌"
27
- CLI -> CLI: "保存令牌以备将来使用"
12
+ User: {
13
+ label: "开发者 / CI-CD"
14
+ shape: c4-person
28
15
  }
29
16
 
30
- CLI -> Platform: "上传文档和媒体文件"
31
- Platform -> CLI: "成功响应"
32
- CLI -> User: "✅ 发布成功!"
17
+ CLI: {
18
+ label: "CLI\n(aigne doc publish)"
19
+ }
20
+
21
+ Local-Config: {
22
+ label: "本地配置\n(~/.aigne/...)"
23
+ shape: cylinder
24
+ }
33
25
 
26
+ Browser
27
+
28
+ Platform: {
29
+ label: "平台\n(官方或自托管)"
30
+ }
31
+
32
+ User -> CLI: "运行命令"
33
+
34
+ alt "交互模式" {
35
+ CLI -> Local-Config: "检查凭证"
36
+ opt "未找到凭证 (首次)" {
37
+ CLI -> User: "提示选择平台"
38
+ User -> CLI: "平台已选择"
39
+ CLI -> Browser: "打开认证 URL"
40
+ User -> Browser: "登录并授权"
41
+ Browser -> Platform: "请求令牌"
42
+ Platform -> Browser: "返回令牌"
43
+ Browser -> CLI: "发送令牌到 CLI"
44
+ CLI -> Local-Config: "保存凭证"
45
+ }
46
+ CLI -> Platform: "上传文档"
47
+ Platform -> CLI: "确认成功"
48
+ CLI -> User: "显示成功消息"
49
+ }
50
+
51
+ alt "CI/CD 模式" {
52
+ note over CLI: "从环境变量读取令牌"
53
+ CLI -> Platform: "上传文档"
54
+ Platform -> CLI: "确认成功"
55
+ CLI -> User: "返回成功状态"
56
+ }
34
57
  ```
35
58
 
36
59
  ## 发布选项
37
60
 
38
- 您有两个主要选项来托管您的文档:
61
+ 您可以选择两个主要的目标来托管您的文档:
39
62
 
40
63
  <x-cards data-columns="2">
41
64
  <x-card data-title="官方平台" data-icon="lucide:globe">
42
- 发布到 [docsmith.aigne.io](https://docsmith.aigne.io/app/),这是 AIGNE 提供的一个免费的公共托管平台。对于开源项目或希望快速分享文档的用户来说,这是一个不错的选择。
65
+ 发布到 docsmith.aigne.io,这是由 AIGNE 运营的服务。对于开源项目或希望快速公开分享文档的用户来说,这是一个直接的选择。
43
66
  </x-card>
44
- <x-card data-title="您自己的网站" data-icon="lucide:server">
45
- 发布到您自己的 Discuss Kit 实例,以完全控制访问和品牌。这适用于内部或私有文档。您可以从 [Blocklet 商店](https://store.blocklet.dev/blocklets/z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu) 获取 Discuss Kit 实例。
67
+ <x-card data-title="自托管实例" data-icon="lucide:server">
68
+ 发布到您自己的 Discuss Kit 实例,以完全控制品牌、访问权限和数据隐私。这是内部或私有文档的推荐选项。您可以按照官方文档中的说明运行自己的 Discuss Kit 实例。
46
69
  </x-card>
47
70
  </x-cards>
48
71
 
49
72
  ## 分步指南
50
73
 
51
- 请按照以下步骤首次发布您的文档。
74
+ 请按照以下步骤发布您的文档。
52
75
 
53
76
  ### 1. 运行发布命令
54
77
 
55
- 在您的项目根目录中,运行以下命令:
78
+ 导航到您项目的根目录并执行以下命令:
56
79
 
57
80
  ```bash Terminal icon=lucide:terminal
58
81
  aigne doc publish
@@ -60,19 +83,19 @@ aigne doc publish
60
83
 
61
84
  ### 2. 选择您的平台
62
85
 
63
- 如果这是您第一次发布,系统将提示您选择一个目的地。请选择适合您需求的选项。
86
+ 如果这是您第一次发布,系统会提示您选择一个目标。请选择符合您要求的选项。
64
87
 
65
- ![在官方平台或自托管实例之间选择](https://docsmith.aigne.io/image-bin/uploads/9fd929060b5abe13d03cf5eb7aea85aa.png)
88
+ ![在官方平台或自托管实例之间选择](https://docsmith.aigne.io/image-bin/uploads/9fd929060b5abe13d0_3cf5eb7aea85aa.png)
66
89
 
67
- 如果您选择自己的网站,系统将要求您输入其 URL。
90
+ 如果您选择自托管实例,系统会要求您输入其 URL。
68
91
 
69
92
  ### 3. 验证您的账户
70
93
 
71
- 首次连接到新平台时,将打开一个浏览器窗口供您登录并授权 CLI。每个平台只需执行一次此步骤;您的访问令牌将保存在本地的 `~/.aigne/doc-smith-connected.yaml` 文件中,以备将来使用。
94
+ 对于初次连接,浏览器窗口将自动打开,以便您登录并授权 CLI。此步骤每个平台只需执行一次。访问令牌会保存在本地以备将来使用。
72
95
 
73
96
  ### 4. 确认
74
97
 
75
- 上传完成后,您的终端将显示一条成功消息。
98
+ 上传完成后,您的终端将显示一条成功消息,确认文档已上线。
76
99
 
77
100
  ```
78
101
  ✅ 文档发布成功!
@@ -80,28 +103,28 @@ aigne doc publish
80
103
 
81
104
  ## 在 CI/CD 环境中发布
82
105
 
83
- 对于自动化工作流,您可以通过提供参数和环境变量来绕过交互式提示。
106
+ 要在 CI/CD 流水线等自动化工作流程中使用发布命令,您可以通过参数和环境变量提供必要信息来绕过交互式提示。
84
107
 
85
108
  | 方法 | 名称 | 描述 |
86
109
  |---|---|---|
87
- | **参数** | `--appUrl` | 直接指定您的 Discuss Kit 实例的 URL。 |
88
- | **环境变量** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | 提供访问令牌,跳过交互式登录。 |
110
+ | **参数** | `--appUrl` | 指定您的 Discuss Kit 实例的 URL。 |
111
+ | **环境变量** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | 提供访问令牌以跳过交互式登录过程。 |
89
112
 
90
- 以下是一个适用于 CI/CD 流程的非交互式发布命令示例:
113
+ 以下是一个适用于 CI/CD 脚本的非交互式发布命令示例:
91
114
 
92
- ```bash CI/CD Example icon=lucide:workflow
115
+ ```bash CI/CD 示例 icon=lucide:workflow
93
116
  export DOC_DISCUSS_KIT_ACCESS_TOKEN="your_access_token_here"
94
117
  aigne doc publish --appUrl https://docs.mycompany.com
95
118
  ```
96
119
 
97
- ## 问题排查
120
+ ## 故障排除
98
121
 
99
- 如果在发布过程中遇到问题,请检查以下常见问题:
122
+ 如果您在发布过程中遇到问题,可能是由以下常见问题之一引起的。
100
123
 
101
- - **连接错误**:您提供的自托管实例的 URL 可能不正确,或者服务器可能无法访问。请验证 URL 和您的网络连接。
124
+ - **连接错误**:CLI 可能会返回类似 `Unable to connect to: <URL>` 的错误消息。这可能是由网络问题、服务器暂时不可用或 URL 不正确引起的。请验证 URL 是否正确且服务器是否可达。
102
125
 
103
- - **无效的网站 URL**:该 URL 必须指向一个在 ArcBlock 平台上构建的有效网站。CLI 将显示类似 `The provided URL is not a valid website on ArcBlock platform` 的错误。要托管您的文档,您可以从[商店获取一个 Discuss Kit 实例](https://store.blocklet.dev/blocklets/z8ia1WEiBZ7hxURf6LwH21Wpg99vophFwSJdu)开始。
126
+ - **无效的网站 URL**:命令可能会失败并显示消息 `The provided URL is not a valid website on ArcBlock platform`。目标 URL 必须是基于 ArcBlock 平台构建的网站。要托管您的文档,您可以运行自己的 Discuss Kit 实例。
104
127
 
105
- - **缺少必需组件**:目标网站必须安装 Discuss Kit 组件。如果缺少该组件,CLI 将返回类似 `This website does not have required components for publishing` 的错误。请参阅 [Discuss Kit 文档](https://www.arcblock.io/docs/web3-kit/en/discuss-kit)以添加必要的组件。
128
+ - **缺少必需组件**:错误消息 `This website does not have required components for publishing` 表示目标网站没有安装 Discuss Kit 组件。请参阅 Discuss Kit 文档,将必要的组件添加到您的站点。
106
129
 
107
130
  有关命令和选项的完整列表,请参阅 [CLI 命令参考](./cli-reference.md)。