@aigne/doc-smith 0.8.11-beta.6 → 0.8.11
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.
- package/.aigne/doc-smith/config.yaml +2 -0
- package/.aigne/doc-smith/output/structure-plan.json +2 -2
- package/.aigne/doc-smith/preferences.yml +28 -20
- package/.aigne/doc-smith/upload-cache.yaml +702 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/agents/generate/document-structure-tools/add-document.mjs +35 -10
- package/agents/generate/document-structure-tools/delete-document.mjs +35 -12
- package/agents/generate/document-structure-tools/move-document.mjs +43 -17
- package/agents/generate/document-structure-tools/update-document.mjs +37 -10
- package/agents/generate/update-document-structure.yaml +1 -7
- package/agents/generate/user-review-document-structure.mjs +5 -4
- package/agents/translate/translate-document.yaml +1 -9
- package/agents/update/check-update-is-single.mjs +2 -1
- package/agents/update/document-tools/update-document-content.mjs +24 -14
- package/agents/update/fs-tools/glob.mjs +184 -0
- package/agents/update/fs-tools/grep.mjs +317 -0
- package/agents/update/fs-tools/read-file.mjs +307 -0
- package/agents/update/generate-document.yaml +4 -7
- package/agents/update/update-document-detail.yaml +6 -10
- package/agents/update/user-review-document.mjs +13 -13
- package/assets/screenshots/doc-complete-setup.png +0 -0
- package/assets/screenshots/doc-generate-docs.png +0 -0
- package/assets/screenshots/doc-generate.png +0 -0
- package/assets/screenshots/doc-generated-successfully.png +0 -0
- package/assets/screenshots/doc-publish.png +0 -0
- package/assets/screenshots/doc-regenerate.png +0 -0
- package/assets/screenshots/doc-translate-langs.png +0 -0
- package/assets/screenshots/doc-translate.png +0 -0
- package/assets/screenshots/doc-update.png +0 -0
- package/docs/advanced-how-it-works.ja.md +31 -31
- package/docs/advanced-how-it-works.md +9 -9
- package/docs/advanced-how-it-works.zh-TW.md +24 -24
- package/docs/advanced-how-it-works.zh.md +20 -20
- package/docs/advanced-quality-assurance.ja.md +57 -61
- package/docs/advanced-quality-assurance.md +57 -61
- package/docs/advanced-quality-assurance.zh-TW.md +57 -61
- package/docs/advanced-quality-assurance.zh.md +57 -61
- package/docs/advanced.ja.md +8 -4
- package/docs/advanced.md +7 -3
- package/docs/advanced.zh-TW.md +9 -5
- package/docs/advanced.zh.md +9 -5
- package/docs/changelog.ja.md +206 -29
- package/docs/changelog.md +177 -0
- package/docs/changelog.zh-TW.md +229 -52
- package/docs/changelog.zh.md +204 -27
- package/docs/cli-reference.ja.md +82 -52
- package/docs/cli-reference.md +56 -26
- package/docs/cli-reference.zh-TW.md +82 -52
- package/docs/cli-reference.zh.md +70 -40
- package/docs/configuration-interactive-setup.ja.md +45 -42
- package/docs/configuration-interactive-setup.md +8 -5
- package/docs/configuration-interactive-setup.zh-TW.md +26 -23
- package/docs/configuration-interactive-setup.zh.md +25 -22
- package/docs/configuration-language-support.ja.md +33 -63
- package/docs/configuration-language-support.md +32 -62
- package/docs/configuration-language-support.zh-TW.md +35 -65
- package/docs/configuration-language-support.zh.md +32 -62
- package/docs/configuration-llm-setup.ja.md +25 -23
- package/docs/configuration-llm-setup.md +20 -18
- package/docs/configuration-llm-setup.zh-TW.md +21 -19
- package/docs/configuration-llm-setup.zh.md +20 -18
- package/docs/configuration-preferences.ja.md +67 -52
- package/docs/configuration-preferences.md +56 -41
- package/docs/configuration-preferences.zh-TW.md +69 -54
- package/docs/configuration-preferences.zh.md +68 -53
- package/docs/configuration.ja.md +65 -81
- package/docs/configuration.md +19 -35
- package/docs/configuration.zh-TW.md +62 -79
- package/docs/configuration.zh.md +50 -67
- package/docs/features-generate-documentation.ja.md +44 -69
- package/docs/features-generate-documentation.md +36 -61
- package/docs/features-generate-documentation.zh-TW.md +42 -67
- package/docs/features-generate-documentation.zh.md +41 -67
- package/docs/features-publish-your-docs.ja.md +36 -36
- package/docs/features-publish-your-docs.md +2 -2
- package/docs/features-publish-your-docs.zh-TW.md +21 -21
- package/docs/features-publish-your-docs.zh.md +23 -23
- package/docs/features-translate-documentation.ja.md +40 -31
- package/docs/features-translate-documentation.md +15 -6
- package/docs/features-translate-documentation.zh-TW.md +37 -28
- package/docs/features-translate-documentation.zh.md +23 -14
- package/docs/features-update-and-refine.ja.md +68 -118
- package/docs/features-update-and-refine.md +58 -108
- package/docs/features-update-and-refine.zh-TW.md +67 -116
- package/docs/features-update-and-refine.zh.md +64 -114
- package/docs/features.ja.md +29 -19
- package/docs/features.md +25 -15
- package/docs/features.zh-TW.md +28 -18
- package/docs/features.zh.md +31 -21
- package/docs/getting-started.ja.md +40 -43
- package/docs/getting-started.md +36 -39
- package/docs/getting-started.zh-TW.md +38 -41
- package/docs/getting-started.zh.md +45 -48
- package/docs/overview.ja.md +63 -11
- package/docs/overview.md +60 -8
- package/docs/overview.zh-TW.md +67 -15
- package/docs/overview.zh.md +62 -10
- package/media.md +9 -9
- package/package.json +1 -1
- package/prompts/detail/custom/custom-components.md +304 -188
- package/prompts/detail/document-rules.md +4 -4
- package/prompts/detail/generate-document.md +21 -8
- package/prompts/detail/update-document.md +8 -12
- package/prompts/structure/update-document-structure.md +12 -8
- package/prompts/utils/feedback-refiner.md +3 -3
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +9 -9
- package/tests/agents/generate/user-review-document-structure.test.mjs +29 -8
- package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
- package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
- package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
- package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
- package/tests/agents/update/user-review-document.test.mjs +48 -27
- package/types/document-schema.mjs +5 -6
- package/types/document-structure-schema.mjs +20 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# ドキュメントを公開する
|
|
2
2
|
|
|
3
|
-
|
|
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
9
|
```d2 公開ワークフロー icon=lucide:upload-cloud
|
|
10
10
|
shape: sequence_diagram
|
|
@@ -26,21 +26,21 @@ Local-Config: {
|
|
|
26
26
|
Browser
|
|
27
27
|
|
|
28
28
|
Platform: {
|
|
29
|
-
label: "プラットフォーム\n(
|
|
29
|
+
label: "プラットフォーム\n(公式または自己ホスト型)"
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
User -> CLI: "
|
|
32
|
+
User -> CLI: "コマンドを実行"
|
|
33
33
|
|
|
34
|
-
alt "
|
|
34
|
+
alt "対話モード" {
|
|
35
35
|
CLI -> Local-Config: "認証情報を確認"
|
|
36
|
-
opt "
|
|
37
|
-
CLI -> User: "
|
|
38
|
-
User -> CLI: "
|
|
39
|
-
CLI -> Browser: "認証URLを開く"
|
|
36
|
+
opt "認証情報が見つからない (初回)" {
|
|
37
|
+
CLI -> User: "プラットフォームの選択を促す"
|
|
38
|
+
User -> CLI: "プラットフォームを選択"
|
|
39
|
+
CLI -> Browser: "認証 URL を開く"
|
|
40
40
|
User -> Browser: "ログイン & 承認"
|
|
41
41
|
Browser -> Platform: "トークンを要求"
|
|
42
42
|
Platform -> Browser: "トークンを返す"
|
|
43
|
-
Browser -> CLI: "CLI
|
|
43
|
+
Browser -> CLI: "トークンを CLI に送信"
|
|
44
44
|
CLI -> Local-Config: "認証情報を保存"
|
|
45
45
|
}
|
|
46
46
|
CLI -> Platform: "ドキュメントをアップロード"
|
|
@@ -48,8 +48,8 @@ alt "インタラクティブモード" {
|
|
|
48
48
|
CLI -> User: "成功メッセージを表示"
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
alt "CI/CDモード" {
|
|
52
|
-
note over CLI: "ENV VARからトークンを読み取る"
|
|
51
|
+
alt "CI/CD モード" {
|
|
52
|
+
note over CLI: "ENV VAR からトークンを読み取る"
|
|
53
53
|
CLI -> Platform: "ドキュメントをアップロード"
|
|
54
54
|
Platform -> CLI: "成功を確認"
|
|
55
55
|
CLI -> User: "成功ステータスを返す"
|
|
@@ -58,14 +58,14 @@ alt "CI/CDモード" {
|
|
|
58
58
|
|
|
59
59
|
## 公開オプション
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
ドキュメントをホストするために、2つの主要な宛先から選択できます。
|
|
62
62
|
|
|
63
63
|
<x-cards data-columns="2">
|
|
64
64
|
<x-card data-title="公式プラットフォーム" data-icon="lucide:globe">
|
|
65
|
-
AIGNEが運営するサービスであるdocsmith.aigne.ioに公開します。これは、オープンソースプロジェクトやドキュメントを迅速に公開共有するための簡単なオプションです。
|
|
65
|
+
AIGNE が運営するサービスである docsmith.aigne.io に公開します。これは、オープンソースプロジェクトやドキュメントを迅速に公開共有するための簡単なオプションです。
|
|
66
66
|
</x-card>
|
|
67
|
-
<x-card data-title="
|
|
68
|
-
ブランディング、アクセス、データプライバシーを完全に制御するために、独自のDiscuss Kitインスタンスに公開します。これは、内部またはプライベートなドキュメントに推奨されるオプションです。公式ドキュメントにある指示に従って、独自のDiscuss Kitインスタンスを実行できます。
|
|
67
|
+
<x-card data-title="自己ホスト型インスタンス" data-icon="lucide:server">
|
|
68
|
+
ブランディング、アクセス、データプライバシーを完全に制御するために、独自の Discuss Kit インスタンスに公開します。これは、内部またはプライベートなドキュメントに推奨されるオプションです。公式ドキュメントにある指示に従って、独自の Discuss Kit インスタンスを実行できます。
|
|
69
69
|
</x-card>
|
|
70
70
|
</x-cards>
|
|
71
71
|
|
|
@@ -73,58 +73,58 @@ alt "CI/CDモード" {
|
|
|
73
73
|
|
|
74
74
|
以下の手順に従ってドキュメントを公開してください。
|
|
75
75
|
|
|
76
|
-
### 1.
|
|
76
|
+
### 1. 公開コマンドを実行する
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
プロジェクトのルートディレクトリに移動し、次のコマンドを実行します。
|
|
79
79
|
|
|
80
|
-
```bash
|
|
80
|
+
```bash Terminal icon=lucide:terminal
|
|
81
81
|
aigne doc publish
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
### 2.
|
|
84
|
+
### 2. プラットフォームを選択する
|
|
85
85
|
|
|
86
86
|
初めて公開する場合、宛先を選択するよう求められます。要件に合ったオプションを選択してください。
|
|
87
87
|
|
|
88
|
-

|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
自己ホスト型のインスタンスを選択した場合、その URL を入力するよう求められます。
|
|
91
91
|
|
|
92
|
-
### 3.
|
|
92
|
+
### 3. アカウントを認証する
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
最初の接続では、ブラウザウィンドウが自動的に開き、ログインして CLI を承認します。このステップはプラットフォームごとに一度だけ必要です。アクセストークンは将来の使用のためにローカルに保存されます。
|
|
95
95
|
|
|
96
96
|
### 4. 確認
|
|
97
97
|
|
|
98
98
|
アップロードが完了すると、ターミナルに成功メッセージが表示され、ドキュメントが公開されたことを確認します。
|
|
99
99
|
|
|
100
100
|
```
|
|
101
|
-
✅
|
|
101
|
+
✅ Documentation Published Successfully!
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
## CI/CD環境での公開
|
|
104
|
+
## CI/CD 環境での公開
|
|
105
105
|
|
|
106
|
-
CI/CD
|
|
106
|
+
CI/CD パイプラインのような自動化されたワークフローで公開コマンドを使用するには、引数と環境変数を通じて必要な情報を提供することで、対話型のプロンプトをバイパスできます。
|
|
107
107
|
|
|
108
108
|
| 方法 | 名前 | 説明 |
|
|
109
109
|
|---|---|---|
|
|
110
|
-
| **引数** | `--appUrl` | Discuss KitインスタンスのURLを指定します。 |
|
|
111
|
-
| **環境変数** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` |
|
|
110
|
+
| **引数** | `--appUrl` | Discuss Kit インスタンスの URL を指定します。 |
|
|
111
|
+
| **環境変数** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | 対話型のログインプロセスをスキップするためのアクセストークンを提供します。 |
|
|
112
112
|
|
|
113
|
-
以下は、CI/CD
|
|
113
|
+
以下は、CI/CD スクリプトに適した非対話型の公開コマンドの例です。
|
|
114
114
|
|
|
115
|
-
```bash CI/CDの例 icon=lucide:workflow
|
|
115
|
+
```bash CI/CD の例 icon=lucide:workflow
|
|
116
116
|
export DOC_DISCUSS_KIT_ACCESS_TOKEN="your_access_token_here"
|
|
117
117
|
aigne doc publish --appUrl https://docs.mycompany.com
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
## トラブルシューティング
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
公開プロセス中に問題が発生した場合、それは以下の一般的な問題のいずれかが原因である可能性があります。
|
|
123
123
|
|
|
124
|
-
- **接続エラー**: CLI
|
|
124
|
+
- **接続エラー**: CLI は `Unable to connect to: <URL>` のようなエラーメッセージを返すことがあります。これは、ネットワークの問題、サーバーが一時的に利用できない、または URL が間違っていることが原因である可能性があります。URL が正しく、サーバーに到達可能であることを確認してください。
|
|
125
125
|
|
|
126
|
-
- **無効なウェブサイトURL**:
|
|
126
|
+
- **無効なウェブサイト URL**: コマンドは `The provided URL is not a valid website on ArcBlock platform` というメッセージで失敗することがあります。宛先 URL は ArcBlock プラットフォーム上に構築されたウェブサイトでなければなりません。ドキュメントをホストするには、独自の Discuss Kit インスタンスを実行できます。
|
|
127
127
|
|
|
128
|
-
-
|
|
128
|
+
- **必要なコンポーネントの欠落**: `This website does not have required components for publishing` というエラーは、宛先のウェブサイトに Discuss Kit コンポーネントがインストールされていないことを示します。サイトに必要なコンポーネントを追加するには、Discuss Kit のドキュメントを参照してください。
|
|
129
129
|
|
|
130
|
-
コマンドとオプションの完全なリストについては、[CLIコマンドリファレンス](./cli-reference.md)を参照してください。
|
|
130
|
+
コマンドとオプションの完全なリストについては、[CLI コマンドリファレンス](./cli-reference.md) を参照してください。
|
|
@@ -4,7 +4,7 @@ After generating your documentation, the `aigne doc publish` command uploads you
|
|
|
4
4
|
|
|
5
5
|
## The Publishing Process
|
|
6
6
|
|
|
7
|
-
The `aigne doc publish` command
|
|
7
|
+
The `aigne doc publish` command initiates an interactive workflow. The first time you publish to a specific 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
9
|
```d2 The Publishing Workflow icon=lucide:upload-cloud
|
|
10
10
|
shape: sequence_diagram
|
|
@@ -85,7 +85,7 @@ aigne doc publish
|
|
|
85
85
|
|
|
86
86
|
If this is your first time publishing, you will be prompted to select a destination. Choose the option that fits your requirements.
|
|
87
87
|
|
|
88
|
-

|
|
89
89
|
|
|
90
90
|
If you select a self-hosted instance, you will be asked to enter its URL.
|
|
91
91
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# 發佈您的文件
|
|
2
2
|
|
|
3
|
-
|
|
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
9
|
```d2 The Publishing Workflow icon=lucide:upload-cloud
|
|
10
10
|
shape: sequence_diagram
|
|
@@ -19,29 +19,29 @@ CLI: {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
Local-Config: {
|
|
22
|
-
label: "
|
|
22
|
+
label: "本機設定\n(~/.aigne/...)"
|
|
23
23
|
shape: cylinder
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
Browser
|
|
27
27
|
|
|
28
28
|
Platform: {
|
|
29
|
-
label: "平台\n(
|
|
29
|
+
label: "平台\n(官方或自架)"
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
User -> CLI: "執行指令"
|
|
33
33
|
|
|
34
34
|
alt "互動模式" {
|
|
35
|
-
CLI -> Local-Config: "
|
|
36
|
-
opt "
|
|
35
|
+
CLI -> Local-Config: "檢查認證資訊"
|
|
36
|
+
opt "未找到認證資訊 (首次)" {
|
|
37
37
|
CLI -> User: "提示選擇平台"
|
|
38
38
|
User -> CLI: "已選擇平台"
|
|
39
39
|
CLI -> Browser: "開啟驗證 URL"
|
|
40
40
|
User -> Browser: "登入並授權"
|
|
41
41
|
Browser -> Platform: "請求權杖"
|
|
42
42
|
Platform -> Browser: "返回權杖"
|
|
43
|
-
Browser -> CLI: "
|
|
44
|
-
CLI -> Local-Config: "
|
|
43
|
+
Browser -> CLI: "將權杖傳送至 CLI"
|
|
44
|
+
CLI -> Local-Config: "儲存認證資訊"
|
|
45
45
|
}
|
|
46
46
|
CLI -> Platform: "上傳文件"
|
|
47
47
|
Platform -> CLI: "確認成功"
|
|
@@ -62,10 +62,10 @@ alt "CI/CD 模式" {
|
|
|
62
62
|
|
|
63
63
|
<x-cards data-columns="2">
|
|
64
64
|
<x-card data-title="官方平台" data-icon="lucide:globe">
|
|
65
|
-
|
|
65
|
+
發佈到 docsmith.aigne.io,這是由 AIGNE 營運的服務。對於開源專案或希望快速公開分享文件的使用者來說,這是一個直接的選項。
|
|
66
66
|
</x-card>
|
|
67
|
-
<x-card data-title="
|
|
68
|
-
發佈到您自己的 Discuss Kit
|
|
67
|
+
<x-card data-title="自架實例" data-icon="lucide:server">
|
|
68
|
+
發佈到您自己的 Discuss Kit 實例,以完全控制品牌、存取權限和資料隱私。對於內部或私有文件,這是建議的選項。您可以按照官方文件中提供的說明來運行您自己的 Discuss Kit 實例。
|
|
69
69
|
</x-card>
|
|
70
70
|
</x-cards>
|
|
71
71
|
|
|
@@ -83,29 +83,29 @@ aigne doc publish
|
|
|
83
83
|
|
|
84
84
|
### 2. 選擇您的平台
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
如果這是您第一次發佈,系統將提示您選擇一個目的地。請選擇符合您需求的選項。
|
|
87
87
|
|
|
88
|
-

|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
如果您選擇自架實例,系統會要求您輸入其 URL。
|
|
91
91
|
|
|
92
92
|
### 3. 驗證您的帳戶
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
對於初次連線,瀏覽器視窗將自動開啟,讓您登入並授權 CLI。此步驟每個平台僅需執行一次。存取權杖會儲存在本機以供未來使用。
|
|
95
95
|
|
|
96
96
|
### 4. 確認
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
上傳完成後,您的終端機中將會出現一條成功訊息,確認文件已上線。
|
|
99
99
|
|
|
100
100
|
```
|
|
101
|
-
✅
|
|
101
|
+
✅ 文件發佈成功!
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
## 在 CI/CD 環境中發佈
|
|
105
105
|
|
|
106
106
|
若要在 CI/CD 管線等自動化工作流程中使用發佈指令,您可以透過參數和環境變數提供必要的資訊,以繞過互動式提示。
|
|
107
107
|
|
|
108
|
-
| 方法 | 名稱 |
|
|
108
|
+
| 方法 | 名稱 | 描述 |
|
|
109
109
|
|---|---|---|
|
|
110
110
|
| **參數** | `--appUrl` | 指定您的 Discuss Kit 實例的 URL。 |
|
|
111
111
|
| **環境變數** | `DOC_DISCUSS_KIT_ACCESS_TOKEN` | 提供存取權杖以跳過互動式登入過程。 |
|
|
@@ -123,8 +123,8 @@ aigne doc publish --appUrl https://docs.mycompany.com
|
|
|
123
123
|
|
|
124
124
|
- **連線錯誤**:CLI 可能會返回類似 `Unable to connect to: <URL>` 的錯誤訊息。這可能是由網路問題、伺服器暫時無法使用或 URL 不正確所引起。請確認 URL 是否正確且伺服器是否可連線。
|
|
125
125
|
|
|
126
|
-
- **無效的網站 URL**:指令可能會失敗並顯示訊息 `The provided URL is not a valid website on ArcBlock platform
|
|
126
|
+
- **無效的網站 URL**:指令可能會失敗並顯示訊息 `The provided URL is not a valid website on ArcBlock platform`。目的地 URL 必須是建立在 ArcBlock 平台上的網站。若要託管您的文件,您可以運行自己的 Discuss Kit 實例。
|
|
127
127
|
|
|
128
|
-
-
|
|
128
|
+
- **缺少必要元件**:出現 `This website does not have required components for publishing` 的錯誤訊息表示目的地網站未安裝 Discuss Kit 元件。請參考 Discuss Kit 文件,將必要的元件新增至您的網站。
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
有關完整的指令和選項列表,請參閱 [CLI 指令參考](./cli-reference.md)。
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# 发布您的文档
|
|
2
2
|
|
|
3
|
-
生成文档后,`aigne doc publish` 命令会上传您的文件,并通过一个可共享的链接使其可访问。本指南提供了将文档发布到 AIGNE
|
|
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
|
|
9
|
+
```d2 发布工作流程 icon=lucide:upload-cloud
|
|
10
10
|
shape: sequence_diagram
|
|
11
11
|
|
|
12
12
|
User: {
|
|
@@ -32,16 +32,16 @@ Platform: {
|
|
|
32
32
|
User -> CLI: "运行命令"
|
|
33
33
|
|
|
34
34
|
alt "交互模式" {
|
|
35
|
-
CLI -> Local-Config: "
|
|
36
|
-
opt "
|
|
35
|
+
CLI -> Local-Config: "检查凭据"
|
|
36
|
+
opt "未找到凭据(首次)" {
|
|
37
37
|
CLI -> User: "提示选择平台"
|
|
38
|
-
User -> CLI: "
|
|
38
|
+
User -> CLI: "已选择平台"
|
|
39
39
|
CLI -> Browser: "打开认证 URL"
|
|
40
40
|
User -> Browser: "登录并授权"
|
|
41
41
|
Browser -> Platform: "请求令牌"
|
|
42
42
|
Platform -> Browser: "返回令牌"
|
|
43
|
-
Browser -> CLI: "
|
|
44
|
-
CLI -> Local-Config: "
|
|
43
|
+
Browser -> CLI: "发送令牌至 CLI"
|
|
44
|
+
CLI -> Local-Config: "保存凭据"
|
|
45
45
|
}
|
|
46
46
|
CLI -> Platform: "上传文档"
|
|
47
47
|
Platform -> CLI: "确认成功"
|
|
@@ -58,11 +58,11 @@ alt "CI/CD 模式" {
|
|
|
58
58
|
|
|
59
59
|
## 发布选项
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
您可以选择以下两个主要目标之一来托管您的文档:
|
|
62
62
|
|
|
63
63
|
<x-cards data-columns="2">
|
|
64
64
|
<x-card data-title="官方平台" data-icon="lucide:globe">
|
|
65
|
-
|
|
65
|
+
发布到由 AIGNE 运营的服务 docsmith.aigne.io。对于开源项目或希望快速公开分享文档的用户来说,这是一个简单直接的选择。
|
|
66
66
|
</x-card>
|
|
67
67
|
<x-card data-title="自托管实例" data-icon="lucide:server">
|
|
68
68
|
发布到您自己的 Discuss Kit 实例,以完全控制品牌、访问权限和数据隐私。这是内部或私有文档的推荐选项。您可以按照官方文档中的说明运行自己的 Discuss Kit 实例。
|
|
@@ -77,33 +77,33 @@ alt "CI/CD 模式" {
|
|
|
77
77
|
|
|
78
78
|
导航到您项目的根目录并执行以下命令:
|
|
79
79
|
|
|
80
|
-
```bash
|
|
80
|
+
```bash 终端 icon=lucide:terminal
|
|
81
81
|
aigne doc publish
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
### 2. 选择您的平台
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
如果这是您第一次发布,系统将提示您选择一个目标。请选择符合您需求的选项。
|
|
87
87
|
|
|
88
|
-

|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
如果您选择自托管实例,系统将要求您输入其 URL。
|
|
91
91
|
|
|
92
92
|
### 3. 验证您的账户
|
|
93
93
|
|
|
94
|
-
对于初次连接,浏览器窗口将自动打开,以便您登录并授权 CLI
|
|
94
|
+
对于初次连接,浏览器窗口将自动打开,以便您登录并授权 CLI。此步骤每个平台仅需执行一次。访问令牌将保存在本地以供将来使用。
|
|
95
95
|
|
|
96
96
|
### 4. 确认
|
|
97
97
|
|
|
98
98
|
上传完成后,您的终端将显示一条成功消息,确认文档已上线。
|
|
99
99
|
|
|
100
100
|
```
|
|
101
|
-
✅
|
|
101
|
+
✅ Documentation Published Successfully!
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
## 在 CI/CD 环境中发布
|
|
105
105
|
|
|
106
|
-
要在 CI/CD
|
|
106
|
+
要在 CI/CD 流水线等自动化工作流程中使用发布命令,您可以通过参数和环境变量提供必要信息,以绕过交互式提示。
|
|
107
107
|
|
|
108
108
|
| 方法 | 名称 | 描述 |
|
|
109
109
|
|---|---|---|
|
|
@@ -117,14 +117,14 @@ export DOC_DISCUSS_KIT_ACCESS_TOKEN="your_access_token_here"
|
|
|
117
117
|
aigne doc publish --appUrl https://docs.mycompany.com
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
##
|
|
120
|
+
## 问题排查
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
如果在发布过程中遇到问题,可能是由以下常见问题之一引起的。
|
|
123
123
|
|
|
124
|
-
- **连接错误**:CLI 可能会返回类似 `Unable to connect to: <URL>` 的错误消息。这可能是由网络问题、服务器暂时不可用或 URL
|
|
124
|
+
- **连接错误**:CLI 可能会返回类似 `Unable to connect to: <URL>` 的错误消息。这可能是由网络问题、服务器暂时不可用或 URL不正确引起的。请验证 URL 是否正确以及服务器是否可达。
|
|
125
125
|
|
|
126
|
-
- **无效的网站 URL
|
|
126
|
+
- **无效的网站 URL**:该命令可能会失败,并显示消息 `The provided URL is not a valid website on ArcBlock platform`。目标 URL 必须是构建在 ArcBlock 平台上的网站。要托管您的文档,您可以运行自己的 Discuss Kit 实例。
|
|
127
127
|
|
|
128
|
-
- **缺少必需组件**:错误消息 `This website does not have required components for publishing`
|
|
128
|
+
- **缺少必需组件**:错误消息 `This website does not have required components for publishing` 表明目标网站未安装 Discuss Kit 组件。请参考 Discuss Kit 文档,为您的站点添加必要的组件。
|
|
129
129
|
|
|
130
130
|
有关命令和选项的完整列表,请参阅 [CLI 命令参考](./cli-reference.md)。
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
# ドキュメントの翻訳
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmithは、ドキュメントを英語、中国語、スペイン語など12
|
|
3
|
+
AIGNE DocSmithは、ドキュメントを英語、中国語、スペイン語など12の異なる言語に翻訳でき、プロジェクトを世界中のオーディエンスにアクセス可能にします。このツールは、ガイド付きセットアップのための対話モードと、正確な制御と自動化のためのコマンドライン引数の2つの方法で翻訳を管理します。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 対話型翻訳
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
ガイド付きの体験をしたい場合は、引数なしで `translate` コマンドを実行してください。この方法は、ステップバイステップのプロセスを好むユーザーに最適です。
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
aigne doc translate
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
このコマンドは対話型ウィザードを起動し、プロセスをガイドします:
|
|
14
14
|
|
|
15
|
-
1.
|
|
15
|
+
1. **翻訳するドキュメントの選択:** 既存のドキュメントのリストが表示されます。スペースバーを使用して翻訳したいものを選択します。
|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
|
-
2.
|
|
19
|
+
2. **ターゲット言語の選択:** ドキュメントを選択した後、サポートされているオプションのリストから1つ以上のターゲット言語を選びます。
|
|
20
20
|
|
|
21
|
-

|
|
22
22
|
|
|
23
|
-
3.
|
|
23
|
+
3. **確認と実行:** DocSmithは翻訳を処理し、選択した各言語に対して選択されたファイルの新しいバージョンを生成します。
|
|
24
24
|
|
|
25
25
|
## コマンドライン翻訳
|
|
26
26
|
|
|
27
|
-
スクリプトやCI/CD
|
|
27
|
+
スクリプトやCI/CDパイプラインでの自動化のために、コマンドラインフラグを使用して翻訳プロセスを制御します。この方法は、開発者や上級ユーザーにとってより高い柔軟性を提供します。
|
|
28
28
|
|
|
29
29
|
### コマンドパラメータ
|
|
30
30
|
|
|
31
31
|
<x-field-group>
|
|
32
|
-
<x-field data-name="--langs" data-type="string" data-required="false" data-desc="ターゲット言語を1
|
|
32
|
+
<x-field data-name="--langs" data-type="string" data-required="false" data-desc="ターゲット言語を1つ指定します。このフラグは複数回使用して、複数の言語を含めることができます(例:--langs zh --langs ja)。"></x-field>
|
|
33
33
|
<x-field data-name="--docs" data-type="string" data-required="false" data-desc="翻訳するドキュメントのパスを指定します。これもバッチ翻訳のために複数回使用できます。"></x-field>
|
|
34
|
-
<x-field data-name="--feedback" data-type="string" data-required="false" data-desc="
|
|
35
|
-
<x-field data-name="--glossary" data-type="string" data-required="false" data-desc="Markdown
|
|
34
|
+
<x-field data-name="--feedback" data-type="string" data-required="false" data-desc="AIに提案を提供して翻訳品質をガイドします(例:--feedback "フォーマルなトーンを使用してください")。"></x-field>
|
|
35
|
+
<x-field data-name="--glossary" data-type="string" data-required="false" data-desc="Markdown形式の用語集ファイルを使用して、特定の用語の一貫性を確保します(例:--glossary @path/to/glossary.md)。"></x-field>
|
|
36
|
+
<x-field data-name="--model" data-type="string" data-required="false" data-desc="使用する翻訳モデルを指定します。例:'openai:gpt-4o' または 'google:gemini-2.5-pro'。"></x-field>
|
|
36
37
|
</x-field-group>
|
|
37
38
|
|
|
38
39
|
### 例
|
|
39
40
|
|
|
40
41
|
#### 特定のドキュメントの翻訳
|
|
41
42
|
|
|
42
|
-
`overview.md
|
|
43
|
+
`overview.md` と `examples.md` を中国語と日本語に翻訳するには、次のコマンドを実行します:
|
|
43
44
|
|
|
44
45
|
```bash
|
|
45
46
|
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
@@ -47,35 +48,43 @@ aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
|
47
48
|
|
|
48
49
|
#### 用語集とフィードバックの使用
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
ブランド名や技術用語が正しく翻訳されるように、用語集ファイルを提供できます。また、翻訳スタイルを洗練させるためのフィードバックも提供できます。
|
|
51
52
|
|
|
52
53
|
```bash
|
|
53
54
|
aigne doc translate --glossary @path/to/glossary.md --feedback "Use technical terminology consistently" --docs overview.md --langs de
|
|
54
55
|
```
|
|
55
56
|
|
|
57
|
+
#### 翻訳モデルの指定
|
|
58
|
+
|
|
59
|
+
翻訳タスクに特定のAIモデルを使用するには、`--model` フラグを使用します。
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
aigne doc translate --docs overview.md --langs fr --model openai:gpt-4o
|
|
63
|
+
```
|
|
64
|
+
|
|
56
65
|
## サポートされている言語
|
|
57
66
|
|
|
58
|
-
DocSmithは、以下の12
|
|
67
|
+
DocSmithは、以下の12言語の自動翻訳をサポートしています:
|
|
59
68
|
|
|
60
|
-
| 言語
|
|
69
|
+
| 言語 | コード |
|
|
61
70
|
| -------------------- | ------- |
|
|
62
|
-
| 英語
|
|
63
|
-
| 簡体字中国語
|
|
64
|
-
| 繁体字中国語
|
|
71
|
+
| 英語 | `en` |
|
|
72
|
+
| 簡体字中国語 | `zh-CN` |
|
|
73
|
+
| 繁体字中国語 | `zh-TW` |
|
|
65
74
|
| 日本語 | `ja` |
|
|
66
|
-
| 韓国語
|
|
67
|
-
| スペイン語
|
|
68
|
-
| フランス語
|
|
69
|
-
| ドイツ語
|
|
70
|
-
| ポルトガル語
|
|
71
|
-
| ロシア語
|
|
72
|
-
| イタリア語
|
|
73
|
-
| アラビア語
|
|
75
|
+
| 韓国語 | `ko` |
|
|
76
|
+
| スペイン語 | `es` |
|
|
77
|
+
| フランス語 | `fr` |
|
|
78
|
+
| ドイツ語 | `de` |
|
|
79
|
+
| ポルトガル語 | `pt-BR` |
|
|
80
|
+
| ロシア語 | `ru` |
|
|
81
|
+
| イタリア語 | `it` |
|
|
82
|
+
| アラビア語 | `ar` |
|
|
74
83
|
|
|
75
84
|
---
|
|
76
85
|
|
|
77
|
-
|
|
86
|
+
ドキュメントが翻訳されたら、世界と共有する準備が整いました。
|
|
78
87
|
|
|
79
|
-
<x-card data-title="
|
|
80
|
-
|
|
88
|
+
<x-card data-title="次へ:ドキュメントの公開" data-icon="lucide:upload-cloud" data-href="/features/publish-your-docs" data-cta="続きを読む">
|
|
89
|
+
ドキュメントを公開プラットフォームや独自のプライベートウェブサイトに簡単に公開する方法についてのガイド。
|
|
81
90
|
</x-card>
|
|
@@ -4,7 +4,7 @@ AIGNE DocSmith can translate your documentation into 12 different languages, inc
|
|
|
4
4
|
|
|
5
5
|
## Interactive Translation
|
|
6
6
|
|
|
7
|
-
For a guided experience, run the `translate` command without any arguments. This is ideal for users who prefer a step-by-step process.
|
|
7
|
+
For a guided experience, run the `translate` command without any arguments. This method is ideal for users who prefer a step-by-step process.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
aigne doc translate
|
|
@@ -14,17 +14,17 @@ This command launches an interactive wizard that guides you through the process:
|
|
|
14
14
|
|
|
15
15
|
1. **Select Documents to Translate:** You will be presented with a list of your existing documents. Use the spacebar to select the ones you want to translate.
|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
19
|
2. **Choose Target Languages:** After selecting your documents, pick one or more target languages from the list of supported options.
|
|
20
20
|
|
|
21
|
-

|
|
22
22
|
|
|
23
23
|
3. **Confirm and Run:** DocSmith will then process the translation, generating new versions of your selected files for each chosen language.
|
|
24
24
|
|
|
25
25
|
## Command-Line Translation
|
|
26
26
|
|
|
27
|
-
For automation in scripts or CI/CD pipelines, use command-line flags to control the translation process. This method
|
|
27
|
+
For automation in scripts or CI/CD pipelines, use command-line flags to control the translation process. This method provides greater flexibility for developers and advanced users.
|
|
28
28
|
|
|
29
29
|
### Command Parameters
|
|
30
30
|
|
|
@@ -33,13 +33,14 @@ For automation in scripts or CI/CD pipelines, use command-line flags to control
|
|
|
33
33
|
<x-field data-name="--docs" data-type="string" data-required="false" data-desc="Specify the path of a document to translate. This can also be used multiple times for batch translation."></x-field>
|
|
34
34
|
<x-field data-name="--feedback" data-type="string" data-required="false" data-desc="Provide suggestions to the AI to guide the translation quality (e.g., --feedback "Use a formal tone")."></x-field>
|
|
35
35
|
<x-field data-name="--glossary" data-type="string" data-required="false" data-desc="Use a glossary file in Markdown format to ensure consistent terminology for specific terms (e.g., --glossary @path/to/glossary.md)."></x-field>
|
|
36
|
+
<x-field data-name="--model" data-type="string" data-required="false" data-desc="Specify the translation model to use, for example, 'openai:gpt-4o' or 'google:gemini-2.5-pro'."></x-field>
|
|
36
37
|
</x-field-group>
|
|
37
38
|
|
|
38
39
|
### Examples
|
|
39
40
|
|
|
40
41
|
#### Translating Specific Documents
|
|
41
42
|
|
|
42
|
-
To translate `overview.md` and `examples.md` into Chinese and Japanese, run:
|
|
43
|
+
To translate `overview.md` and `examples.md` into Chinese and Japanese, run the following command:
|
|
43
44
|
|
|
44
45
|
```bash
|
|
45
46
|
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
@@ -53,6 +54,14 @@ To ensure brand names and technical terms are translated correctly, you can prov
|
|
|
53
54
|
aigne doc translate --glossary @path/to/glossary.md --feedback "Use technical terminology consistently" --docs overview.md --langs de
|
|
54
55
|
```
|
|
55
56
|
|
|
57
|
+
#### Specifying a Translation Model
|
|
58
|
+
|
|
59
|
+
To use a specific AI model for the translation task, use the `--model` flag.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
aigne doc translate --docs overview.md --langs fr --model openai:gpt-4o
|
|
63
|
+
```
|
|
64
|
+
|
|
56
65
|
## Supported Languages
|
|
57
66
|
|
|
58
67
|
DocSmith supports automatic translation for the following 12 languages:
|
|
@@ -77,5 +86,5 @@ DocSmith supports automatic translation for the following 12 languages:
|
|
|
77
86
|
Once your documentation is translated, you are ready to share it with the world.
|
|
78
87
|
|
|
79
88
|
<x-card data-title="Next: Publish Your Docs" data-icon="lucide:upload-cloud" data-href="/features/publish-your-docs" data-cta="Read More">
|
|
80
|
-
A guide on how to publish your documentation to a public platform or your own private website.
|
|
89
|
+
A guide on how to easily publish your documentation to a public platform or your own private website.
|
|
81
90
|
</x-card>
|