Skip to content

Commit c7a4aec

Browse files
committed
improve code
1 parent 843a345 commit c7a4aec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+6554
-75
lines changed

src/.vuepress/navbar/zh.ts

Lines changed: 50 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,59 @@
11
import { navbar } from "vuepress-theme-hope";
22

33
export const zhNavbar = navbar([
4-
"/zh/",
5-
"/zh/portfolio",
6-
"/zh/demo/",
7-
"/zh/handbook/",
84
{
9-
text: "指南",
10-
icon: "lightbulb",
5+
text: "快速开始",
6+
icon: "signs-post",
117
prefix: "/zh/guide/",
12-
children: [
13-
{
14-
text: "Bar",
15-
icon: "lightbulb",
16-
prefix: "bar/",
17-
children: ["baz", { text: "...", icon: "ellipsis", link: "" }],
18-
},
19-
{
20-
text: "Foo",
21-
icon: "lightbulb",
22-
prefix: "foo/",
23-
children: ["ray", { text: "...", icon: "ellipsis", link: "" }],
24-
},
25-
],
8+
link: "/zh/guide/"
9+
},
10+
{
11+
text: "语法",
12+
icon: "code",
13+
prefix: "/zh/grammar/",
14+
link: "/zh/grammar/"
2615
},
2716
{
28-
text: "V2 文档",
29-
icon: "book",
30-
link: "https://theme-hope.vuejs.press/zh/",
17+
text: "蓝图",
18+
icon: "lightbulb",
19+
prefix: "/zh/blueprints/",
20+
link: "/zh/blueprints/"
21+
},
22+
"/zh/demos/",
23+
{
24+
text: "其他",
25+
icon: "circle-info",
26+
children: [
27+
{
28+
text: "项目",
29+
children: [
30+
{
31+
text: "常见问题",
32+
icon: "circle-question",
33+
link: "/others/faq"
34+
},
35+
{
36+
text: "路线图",
37+
icon: "map",
38+
link: "/others/roadmap",
39+
},
40+
{
41+
text: "变更日志",
42+
icon: "clock",
43+
link: "/others/changelog",
44+
},
45+
{
46+
text: "贡献指南",
47+
icon: "lightbulb",
48+
link: "/others/contribution",
49+
},
50+
{
51+
text: "协议",
52+
icon: "paperclip",
53+
link: "/others/license"
54+
}
55+
]
56+
}
57+
]
3158
},
3259
]);

src/.vuepress/sidebar/zh.ts

Lines changed: 132 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,143 @@ import { sidebar } from "vuepress-theme-hope";
22

33
export const zhSidebar = sidebar({
44
"/zh/": [
5-
"",
6-
"portfolio",
75
{
8-
text: "案例",
9-
icon: "laptop-code",
10-
prefix: "demo/",
11-
link: "demo/",
12-
children: "structure",
6+
text: "快速开始",
7+
icon: "lightbulb",
8+
prefix: "guide/",
9+
collapsible: false,
10+
link: "guide/",
11+
children: ["install", "usage"],
1312
},
1413
{
15-
text: "文档",
16-
icon: "book",
17-
prefix: "guide/",
18-
children: "structure",
14+
text: "语法",
15+
icon: "code",
16+
prefix: "grammar/",
17+
link: "grammar/",
18+
collapsible: true,
19+
children: [
20+
"spec",
21+
"pkg",
22+
"type",
23+
"cmd",
24+
"expr",
25+
"stmt",
26+
"flow",
27+
"func",
28+
"trait",
29+
"generics",
30+
"comptime",
31+
"annotation",
32+
"unsafe",
33+
"async",
34+
"test",
35+
],
36+
},
37+
{
38+
text: "标准库",
39+
prefix: "libs/",
40+
icon: "fas fa-coins",
41+
link: "libs/",
42+
collapsible: true,
43+
children: [
44+
"builtin",
45+
"time",
46+
"math",
47+
"fs",
48+
"assert",
49+
"reflect",
50+
"bash",
51+
"powershell",
52+
"batch",
53+
"vbs",
54+
"amber",
55+
],
56+
},
57+
{
58+
text: "工具链",
59+
icon: "hammer",
60+
prefix: "toolchain/",
61+
collapsible: false,
62+
link: "toolchain/",
63+
children: ["compiler", "pm", "editor_plugin", "tui", "devops"]
64+
},
65+
{
66+
text: "设计模式",
67+
icon: "compass-drafting",
68+
prefix: "design/",
69+
collapsible: true,
70+
link: "design/",
71+
children: []
72+
},
73+
{
74+
text: "反馈",
75+
icon: "rss",
76+
link: "https://ecosystem.vuejs.press/plugins/markdown/revealjs/demo.html",
77+
},
78+
],
79+
"/zh/blueprints/": [
80+
"architecture",
81+
"hcr",
82+
{
83+
text: "Bash",
84+
icon: "fa-brands fa-linux",
85+
prefix: "/zh/blueprints/bash/",
86+
collapsible: true,
87+
children: [
88+
"type",
89+
"expr",
90+
"branch",
91+
"loop",
92+
"func",
93+
]
94+
},
95+
{
96+
text: "Powershell",
97+
icon: "fa-brands fa-windows",
98+
prefix: "/zh/blueprints/powershell/",
99+
collapsible: true,
100+
children: []
19101
},
20102
{
21-
text: "幻灯片",
22-
icon: "person-chalkboard",
23-
link: "https://ecosystem.vuejs.press/zh/plugins/markdown/revealjs/demo.html",
103+
text: "Batch",
104+
icon: "fa-brands fa-windows",
105+
prefix: "/zh/blueprints/batch/",
106+
collapsible: true,
107+
children: ["type"]
108+
},
109+
{
110+
text: "VBScript",
111+
icon: "fa-solid fa-v",
112+
prefix: "/zh/blueprints/vbs/",
113+
collapsible: true,
114+
children: ["branch"]
115+
},
116+
{
117+
text: "Amber",
118+
icon: "fa-solid fa-diamond",
119+
prefix: "/zh/blueprints/amber/",
120+
collapsible: true,
121+
children: [
122+
"type",
123+
"expr",
124+
"branch",
125+
"loop",
126+
"func",
127+
]
24128
},
25129
],
130+
"/zh/demos": "structure",
131+
"/zh/others/": [
132+
{
133+
text: "项目",
134+
icon: "circle-info",
135+
children: [
136+
"faq",
137+
"roadmap",
138+
"changelog",
139+
"contribution",
140+
"license"
141+
]
142+
}
143+
]
26144
});

src/zh/blueprints/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Blueprints
3+
icon: lightbulb
4+
---
5+
6+
<div class="catalog-display-container">
7+
<Catalog base='/blueprints' />
8+
</div>

src/zh/blueprints/amber/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Amber
3+
icon: fa-solid fa-diamond
4+
date: 2025-04-19
5+
category: blueprint
6+
tag:
7+
- amber
8+
license: MIT
9+
---
10+
11+
[Amber](https://amber-lang.com/) is a programming language that compiles to Bash. It's a high level programming language that makes it easy to create shell scripts. It's particularly well suited for cloud services.
12+
13+
Hulo can compile hulo script to amber, and thereby you can get bash from amber script using its compiler.
14+
15+
根据 amber 的命名规范,Hulo 编译器将会把源代码中的变量、函数全部翻译成 snake_case 命名法的风格。
16+
17+
## 编译
18+
19+
```sh
20+
hlpm build . --lang amber
21+
```
22+
23+
## 运行
24+
25+
```sh
26+
hlpm run . --lang amber
27+
```
File renamed without changes.

src/zh/blueprints/amber/branch.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Conditional branch
3+
icon: fas fa-code-branch
4+
date: 2025-04-19
5+
category: blueprint
6+
tag:
7+
- amber
8+
- branch
9+
license: MIT
10+
---

src/zh/blueprints/amber/expr.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Expression
3+
icon: fas fa-puzzle-piece
4+
date: 2025-04-19
5+
category: blueprint
6+
tag:
7+
- amber
8+
- expr
9+
license: MIT
10+
---

src/zh/blueprints/amber/func.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Function
3+
icon: fas fa-superscript
4+
date: 2025-04-19
5+
category: blueprint
6+
tag:
7+
- amber
8+
- func
9+
license: MIT
10+
---

src/zh/blueprints/amber/generics.md

Whitespace-only changes.

src/zh/blueprints/amber/loop.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Loop
3+
icon: fas fa-repeat
4+
date: 2025-04-19
5+
category: blueprint
6+
tag:
7+
- amber
8+
- loop
9+
license: MIT
10+
---

0 commit comments

Comments
 (0)