Skip to content

Commit a9038cc

Browse files
committed
improve document css
1 parent 5ca9461 commit a9038cc

6 files changed

Lines changed: 132 additions & 128 deletions

File tree

docs/en/installation.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,25 @@ AgentJet supports multiple backbones, you can choose any of them depending on yo
126126
| vLLM Version | 0.10.0 | 0.10.0 |
127127

128128

129+
## Deploy with docker
129130

131+
The docker solution is recommanded when you are using **AgentJet Swarm** mode!
132+
133+
Simply run:
134+
135+
```bash
136+
docker run --rm -it \
137+
-v /path/to/host/Qwen/Qwen2.5-7B-Instruct:/Qwen/Qwen2.5-7B-Instruct \
138+
-v ./swarmlog:/workspace/log \
139+
-v ./swarmexp:/workspace/saved_experiments \
140+
-p 10086:10086 \
141+
--gpus=all \
142+
--shm-size=32GB \
143+
ghcr.io/modelscope/agentjet:main \
144+
bash -c "(ajet-swarm overwatch) & (NO_COLOR=1 LOGURU_COLORIZE=NO ajet-swarm start &>/workspace/log/swarm_server.log)"
145+
```
146+
147+
to start the swarm server. For more details and explainations, please refer to [this document](./ajet-swarm-docker.md).
130148

131149

132150
## Next Steps

docs/en/intro.md

Lines changed: 0 additions & 114 deletions
This file was deleted.

docs/stylesheets/responsive.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ article ul>li {
3030
a[data-sidebar="menu-button"] {
3131
font-size: 17px;
3232
font-weight: 300;
33-
margin-bottom: 12px;
33+
margin-bottom: 6px;
3434
}
3535

3636
.pr-2 {
3737
font-size: 20px;
3838
}
3939

4040
.text-muted-foreground {
41-
font-size: 15px;
41+
font-size: 17px;
4242
color: var(--color-muted-foreground);
43+
margin-bottom: 12px;
4344
}
4445

4546
article .typography h2 {
@@ -60,6 +61,12 @@ article .typography h2 {
6061
white-space: nowrap !important;
6162
}
6263

64+
/* 如果你可以添加自定义类 */
65+
[data-slot="sidebar-menu"] {
66+
padding-left: 10px;
67+
}
68+
69+
6370
/* 方法3:如果上面不生效,使用更具体的选择器 */
6471
div[data-slot="sidebar-content"].no-scrollbar {
6572
scrollbar-width: thin !important;

docs/stylesheets/table-enhancements.css

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
article table,
1919
.prose table,
20-
.md-typeset table:not([class]) {
20+
.md-typeset table:not([class]),
21+
table {
2122
width: 100%;
2223
border-collapse: separate;
2324
border-spacing: 0;
@@ -27,6 +28,7 @@ article table,
2728
overflow: hidden;
2829
border: 1px solid var(--border, #e5e7eb);
2930
border-radius: var(--radius-lg, 0.5rem);
31+
table-layout: auto;
3032
}
3133

3234
/* ========================================
@@ -48,7 +50,11 @@ article table th,
4850
text-align: left;
4951
color: var(--foreground, #111827);
5052
border-bottom: 1px solid var(--border, #e5e7eb);
51-
white-space: nowrap;
53+
white-space: normal !important;
54+
word-wrap: break-word !important;
55+
word-break: break-word !important;
56+
max-width: 400px;
57+
overflow-wrap: break-word;
5258
}
5359

5460
/* First header cell - round top-left corner */
@@ -77,6 +83,11 @@ article table td,
7783
color: var(--foreground, #374151);
7884
border-bottom: 1px solid var(--border, #e5e7eb);
7985
line-height: 1.5;
86+
white-space: normal !important;
87+
word-wrap: break-word !important;
88+
word-break: break-word !important;
89+
max-width: 400px;
90+
overflow-wrap: break-word;
8091
}
8192

8293
/* Remove border from last row */
@@ -310,7 +321,6 @@ article table.wide,
310321
.md-typeset table:not([class]) th,
311322
.md-typeset table:not([class]) td {
312323
padding: 0.625rem 0.75rem;
313-
white-space: nowrap;
314324
}
315325

316326
article table th,
@@ -319,3 +329,28 @@ article table.wide,
319329
font-size: 0.8125rem;
320330
}
321331
}
332+
333+
/* ========================================
334+
强制文本换行 - 覆盖所有可能的样式
335+
======================================== */
336+
337+
table th,
338+
table td {
339+
white-space: normal !important;
340+
word-wrap: break-word !important;
341+
word-break: break-word !important;
342+
overflow-wrap: break-word !important;
343+
}
344+
345+
/* 为中文长文本优化 */
346+
table td {
347+
max-width: 400px;
348+
min-width: 120px;
349+
}
350+
351+
/* 第一列(特性列)可以窄一些 */
352+
table td:first-child,
353+
table th:first-child {
354+
max-width: 150px;
355+
min-width: 100px;
356+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* 表格文本自动换行
3+
* 此文件专门解决表格单元格文本溢出问题
4+
* 使用最高优先级确保生效
5+
*/
6+
7+
/* 全局表格设置 */
8+
table {
9+
table-layout: auto !important;
10+
width: 100% !important;
11+
}
12+
13+
/* 所有表格单元格强制换行 */
14+
table th,
15+
table thead th,
16+
table tbody th,
17+
table td,
18+
table tbody td,
19+
article table th,
20+
article table td,
21+
.prose table th,
22+
.prose table td,
23+
.md-typeset table th,
24+
.md-typeset table td,
25+
.md-content table th,
26+
.md-content table td,
27+
div[class*="prose"] table th,
28+
div[class*="prose"] table td {
29+
white-space: normal !important;
30+
word-wrap: break-word !important;
31+
word-break: break-word !important;
32+
overflow-wrap: break-word !important;
33+
hyphens: auto !important;
34+
max-width: 400px !important;
35+
}
36+
37+
/* 第一列可以窄一些 */
38+
table th:first-child,
39+
table td:first-child {
40+
max-width: 150px !important;
41+
min-width: 100px !important;
42+
}
43+
44+
/* 确保表格容器不溢出 */
45+
.md-content__inner,
46+
.prose,
47+
article {
48+
overflow-x: auto !important;
49+
}
50+
51+
/* 移动端优化 */
52+
@media (max-width: 768px) {
53+
table th,
54+
table td {
55+
max-width: 200px !important;
56+
font-size: 0.875rem !important;
57+
}
58+
}

mkdocs.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,37 @@ theme:
2424
nav:
2525
- Overview: index.md
2626

27-
- Tutorial:
28-
- Introduction: en/intro.md
27+
- • Tutorial:
2928
- Installation: en/installation.md
3029
- Quick Start: en/quickstart.md
3130
- Tune Your First Agent: en/tune_your_first_agent.md
3231
- Agentic Frameworks: en/agent_framework_support.md
3332
- Swarm Training: en/swarm_intro_blog_english.md
3433

35-
- Examples:
34+
- • Classic Examples:
3635
- Math Agent: en/example_math_agent.md
3736
- AppWorld Agent: en/example_app_world.md
3837
- Werewolves Game: en/example_werewolves.md
3938
- Learning to Ask: en/example_learning_to_ask.md
4039
- Frozen Lake: en/example_frozenlake.md
4140
- Countdown Game: en/example_countdown.md
4241

43-
- Swarm Examples:
42+
- Swarm Examples:
4443
- Best Practice: en/swarm_best_practice.md
4544
- Swarm Vibe Coding: en/swarm_vibe_coding.md
4645

47-
- Components:
46+
- Components:
4847
- Workflow: en/workflow.md
4948
- Data Pipeline: en/data_pipeline.md
5049
- Task Judger: en/task_judger.md
5150

52-
- Supported Frameworks:
51+
- • With Frameworks:
52+
- OpenAI SDK: en/support_oaisdk.md
5353
- AgentScope: en/support_agentscope.md
5454
- Langchain: en/support_langchain.md
55-
- OpenAI SDK: en/support_oaisdk.md
5655
- Raw HTTP: en/support_http.md
5756

58-
- Deep Dive:
57+
- Deep Dive:
5958
- Configuration: en/configuration.md
6059
- Visualization: en/visualization.md
6160
- Beast Logger: en/beast_logger.md
@@ -64,7 +63,7 @@ nav:
6463
- Timeline Processing: en/context_timeline.md
6564
- Platform Comparison: en/platform_comparison.md
6665

67-
- Blogs:
66+
- Blogs:
6867
- Swarm Intro (ZH): en/swarm_intro_blog_zh.md
6968
- Swarm Intro (EN): en/swarm_intro_blog_en.md
7069

@@ -125,6 +124,7 @@ extra_css:
125124
- stylesheets/mermaid.css
126125
- stylesheets/mkdocstrings.css
127126
- stylesheets/responsive.css
127+
- stylesheets/table-word-wrap.css
128128

129129
extra_javascript:
130130
- javascripts/tabbed-code.js

0 commit comments

Comments
 (0)