Skip to content

Commit 1b91777

Browse files
authored
feat(docs): add right menu and optimize (alibaba#2224) alibaba#2161
1 parent d776a93 commit 1b91777

24 files changed

+7243
-491
lines changed

Diff for: README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Arthas
22

3-
![arthas](site/src/site/sphinx/arthas.png)
3+
![arthas](site/docs/.vuepress/public/images/arthas.png)
44

55
[![Build Status](https://github.com/alibaba/arthas/workflows/JavaCI/badge.svg)](https://github.com/alibaba/arthas/actions)
66
[![codecov](https://codecov.io/gh/alibaba/arthas/branch/master/graph/badge.svg)](https://codecov.io/gh/alibaba/arthas)
@@ -101,7 +101,7 @@ You can enter its interactive interface by executing `as.sh`, or execute `as.sh
101101

102102
* https://arthas.aliyun.com/doc/en/dashboard
103103

104-
![dashboard](site/src/site/sphinx/_static/dashboard.png)
104+
![dashboard](site/docs/.vuepress/public/images/dashboard.png)
105105

106106
#### Thread
107107

@@ -301,7 +301,7 @@ ts=2018-09-18 10:11:45;thread_name=http-bio-8080-exec-10;id=d9;is_daemon=true;pr
301301

302302
See what is slowing down your method invocation with trace command:
303303

304-
![trace](site/src/site/sphinx/_static/trace.png)
304+
![trace](site/docs/.vuepress/public/images/trace.png)
305305

306306
#### Watch
307307

@@ -388,7 +388,7 @@ $ classloader
388388

389389
* https://arthas.aliyun.com/doc/en/web-console
390390

391-
![web console](site/src/site/sphinx/_static/web-console-local.png)
391+
![web console](site/docs/.vuepress/public/images/web-console-local.png)
392392

393393

394394
#### Profiler/FlameGraph
@@ -408,7 +408,7 @@ OK
408408

409409
View profiler results under arthas-output via browser:
410410

411-
![](site/src/site/sphinx/_static/arthas-output-svg.jpg)
411+
![](site/docs/.vuepress/public/images/arthas-output-svg.jpg)
412412

413413
#### Arthas Spring Boot Starter
414414

Diff for: README_CN.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Arthas
44

5-
![arthas](site/src/site/sphinx/arthas.png)
5+
![arthas](site/docs/.vuepress/public/images/arthas.png)
66

77
[![Build Status](https://github.com/alibaba/arthas/workflows/JavaCI/badge.svg)](https://github.com/alibaba/arthas/actions)
88
[![codecov](https://codecov.io/gh/alibaba/arthas/branch/master/graph/badge.svg)](https://codecov.io/gh/alibaba/arthas)
@@ -91,7 +91,7 @@ curl -L https://arthas.aliyun.com/install.sh | sh
9191

9292
* https://arthas.aliyun.com/doc/dashboard
9393

94-
![dashboard](site/src/site/sphinx/_static/dashboard.png)
94+
![dashboard](site/docs/.vuepress/public/images/dashboard.png)
9595

9696
#### Thread
9797

@@ -287,7 +287,7 @@ ts=2018-09-18 10:11:45;thread_name=http-bio-8080-exec-10;id=d9;is_daemon=true;pr
287287

288288
观察方法执行的时候哪个子调用比较慢:
289289

290-
![trace](site/src/site/sphinx/_static/trace.png)
290+
![trace](site/docs/.vuepress/public/images/trace.png)
291291

292292
#### Watch
293293

@@ -377,7 +377,7 @@ $ classloader
377377

378378
* https://arthas.aliyun.com/doc/web-console
379379

380-
![web console](site/src/site/sphinx/_static/web-console-local.png)
380+
![web console](site/docs/.vuepress/public/images/web-console-local.png)
381381

382382
#### Profiler/FlameGraph/火焰图
383383

@@ -396,7 +396,7 @@ OK
396396

397397
通过浏览器查看profiler结果:
398398

399-
![](site/src/site/sphinx/_static/arthas-output-svg.jpg)
399+
![](site/docs/.vuepress/public/images/arthas-output-svg.jpg)
400400

401401
#### Arthas Spring Boot Starter
402402

Diff for: site/docs/.vuepress/config.js

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
const { localTheme } = require("./theme/index");
22

3+
const {
4+
activeHeaderLinksPlugin,
5+
} = require("@vuepress/plugin-active-header-links");
36
const { copyCodePlugin } = require("vuepress-plugin-copy-code2");
47
const { redirectPlugin } = require("vuepress-plugin-redirect");
58
const { searchPlugin } = require("@vuepress/plugin-search");
@@ -35,6 +38,7 @@ module.exports = {
3538
lastUpdated: "上次更新",
3639
contributorsText: "贡献者",
3740
backToHome: "回到首页",
41+
rightMenuText: "目录",
3842
warning: "注意",
3943
tip: "提示",
4044
danger: "警告",
@@ -105,5 +109,9 @@ module.exports = {
105109
return redirects;
106110
},
107111
}),
112+
activeHeaderLinksPlugin({
113+
headerLinkSelector: "div.right-menu-item > a",
114+
delay: 100,
115+
}),
108116
],
109117
};

Diff for: site/docs/.vuepress/configs/head.js

+32
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,38 @@ module.exports = [
44
"meta",
55
{ name: "viewport", content: "width=device-width, initial-scale=1.0" },
66
],
7+
["meta", { property: "og:title", content: "Arthas" }],
8+
[
9+
"meta",
10+
{
11+
property: "og:image:alt",
12+
content:
13+
"Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - Fatpandac/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas",
14+
},
15+
],
16+
["meta", { property: "og:image", content: "/images/arthas_mate_image.png" }],
17+
[
18+
"meta",
19+
{
20+
property: "og:description",
21+
content:
22+
"Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - Fatpandac/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas",
23+
},
24+
],
25+
["meta", { property: "og:image:width", content: "1200" }],
26+
["meta", { property: "og:image:height", content: "600" }],
27+
[
28+
"meta",
29+
{ property: "twitter:image:src", content: "/images/arthas_mate_image.png" },
30+
],
31+
[
32+
"meta",
33+
{
34+
property: "twitter:image:alt",
35+
content:
36+
"Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - Fatpandac/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas",
37+
},
38+
],
739
[
840
"script",
941
{},

Diff for: site/docs/.vuepress/configs/navbar/en.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = [
4646
link: "/en/doc/download.md",
4747
},
4848
{
49-
text: "COMMUNITY",
50-
link: "https://github.com/alibaba/arthas/issues",
49+
text: "COMMANDS",
50+
link: "/en/doc/commands.md",
5151
},
5252
];

Diff for: site/docs/.vuepress/configs/navbar/zh.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = [
4646
link: "/doc/download.md",
4747
},
4848
{
49-
text: "社区",
50-
link: "https://github.com/alibaba/arthas/issues",
49+
text: "命令列表",
50+
link: "/doc/commands.md",
5151
},
5252
];

Diff for: site/docs/.vuepress/configs/sidebar/en.js

+1-84
Original file line numberDiff line numberDiff line change
@@ -31,90 +31,7 @@ module.exports = {
3131
},
3232
],
3333
},
34-
{
35-
text: "Commands",
36-
collapsible: true,
37-
link: "/en/doc/commands.md",
38-
children: [
39-
{
40-
text: "jvm",
41-
collapsible: false,
42-
children: [
43-
"/en/doc/dashboard.md",
44-
"/en/doc/thread.md",
45-
"/en/doc/jvm.md",
46-
"/en/doc/memory.md",
47-
"/en/doc/sysprop.md",
48-
"/en/doc/sysenv.md",
49-
"/en/doc/vmoption.md",
50-
"/en/doc/perfcounter.md",
51-
"/en/doc/logger.md",
52-
"/en/doc/mbean.md",
53-
"/en/doc/getstatic.md",
54-
"/en/doc/ognl.md",
55-
"/en/doc/heapdump.md",
56-
"/en/doc/vmtool.md",
57-
],
58-
},
59-
{
60-
text: "class/classloader",
61-
collapsible: false,
62-
children: [
63-
"/en/doc/sc.md",
64-
"/en/doc/sm.md",
65-
"/en/doc/jad.md",
66-
"/en/doc/classloader.md",
67-
"/en/doc/mc.md",
68-
"/en/doc/dump.md",
69-
"/en/doc/retransform.md",
70-
"/en/doc/redefine.md",
71-
],
72-
},
73-
{
74-
text: "monitor/watch/trace - related",
75-
collapsible: false,
76-
children: [
77-
"/en/doc/monitor.md",
78-
"/en/doc/watch.md",
79-
"/en/doc/trace.md",
80-
"/en/doc/stack.md",
81-
"/en/doc/tt.md",
82-
],
83-
},
84-
{
85-
text: "other",
86-
collapsible: false,
87-
children: [
88-
"/en/doc/profiler.md",
89-
"/en/doc/cat.md",
90-
"/en/doc/echo.md",
91-
"/en/doc/grep.md",
92-
"/en/doc/base64.md",
93-
"/en/doc/tee.md",
94-
"/en/doc/pwd.md",
95-
"/en/doc/auth.md",
96-
"/en/doc/options.md",
97-
],
98-
},
99-
{
100-
text: "Basic",
101-
collapsible: false,
102-
children: [
103-
"/en/doc/help.md",
104-
"/en/doc/cls.md",
105-
"/en/doc/session.md",
106-
"/en/doc/reset.md",
107-
"/en/doc/history.md",
108-
"/en/doc/quit.md",
109-
"/en/doc/stop.md",
110-
{
111-
text: "keymap",
112-
link: "/en/doc/keymap.md",
113-
},
114-
],
115-
},
116-
],
117-
},
34+
"/en/doc/commands.md",
11835
"/en/doc/web-console.md",
11936
"/en/doc/tunnel.md",
12037
"/en/doc/http-api.md",

Diff for: site/docs/.vuepress/configs/sidebar/zh.js

+1-84
Original file line numberDiff line numberDiff line change
@@ -35,90 +35,7 @@ module.exports = {
3535
},
3636
],
3737
},
38-
{
39-
text: "命令列表",
40-
collapsible: true,
41-
link: "/doc/commands.md",
42-
children: [
43-
{
44-
text: "jvm相关",
45-
collapsible: false,
46-
children: [
47-
"/doc/dashboard.md",
48-
"/doc/thread.md",
49-
"/doc/jvm.md",
50-
"/doc/memory.md",
51-
"/doc/sysprop.md",
52-
"/doc/sysenv.md",
53-
"/doc/vmoption.md",
54-
"/doc/perfcounter.md",
55-
"/doc/logger.md",
56-
"/doc/mbean.md",
57-
"/doc/getstatic.md",
58-
"/doc/ognl.md",
59-
"/doc/heapdump.md",
60-
"/doc/vmtool.md",
61-
],
62-
},
63-
{
64-
text: "class/classloader相关",
65-
collapsible: false,
66-
children: [
67-
"/doc/sc.md",
68-
"/doc/sm.md",
69-
"/doc/jad.md",
70-
"/doc/classloader.md",
71-
"/doc/mc.md",
72-
"/doc/dump.md",
73-
"/doc/retransform.md",
74-
"/doc/redefine.md",
75-
],
76-
},
77-
{
78-
text: "monitor/watch/trace相关",
79-
collapsible: false,
80-
children: [
81-
"/doc/monitor.md",
82-
"/doc/watch.md",
83-
"/doc/trace.md",
84-
"/doc/stack.md",
85-
"/doc/tt.md",
86-
],
87-
},
88-
{
89-
text: "其他",
90-
collapsible: false,
91-
children: [
92-
"/doc/profiler.md",
93-
"/doc/cat.md",
94-
"/doc/echo.md",
95-
"/doc/grep.md",
96-
"/doc/base64.md",
97-
"/doc/tee.md",
98-
"/doc/pwd.md",
99-
"/doc/auth.md",
100-
"/doc/options.md",
101-
],
102-
},
103-
{
104-
text: "基础命令",
105-
collapsible: false,
106-
children: [
107-
"/doc/help.md",
108-
"/doc/cls.md",
109-
"/doc/session.md",
110-
"/doc/reset.md",
111-
"/doc/history.md",
112-
"/doc/quit.md",
113-
"/doc/stop.md",
114-
{
115-
text: "keymap",
116-
link: "/doc/keymap.md",
117-
},
118-
],
119-
},
120-
],
121-
},
38+
"/doc/commands.md",
12239
"/doc/web-console.md",
12340
"/doc/tunnel.md",
12441
"/doc/http-api.md",
98.1 KB
Loading

Diff for: site/docs/.vuepress/styles/index.scss

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
:root {
2+
--sidebar-width: 17rem;
3+
}
4+
15
.site-name.can-hide {
26
display: none;
37
}

0 commit comments

Comments
 (0)