Skip to content

Commit 969ad20

Browse files
committed
update config info of sidebar
1 parent a3cb2f9 commit 969ad20

40 files changed

+809
-1130
lines changed

package-lock.json

+654-415
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hackorg.com",
33
"version": "1.0.0",
4-
"description": "Hack Org is a non-profit organization about hacking, join us !",
4+
"description": "HackOrg.com",
55
"license": "MIT",
66
"type": "module",
77
"scripts": {
@@ -12,9 +12,9 @@
1212
},
1313
"devDependencies": {
1414
"@vuepress/bundler-vite": "2.0.0-rc.9",
15-
"vue": "^3.4.21",
15+
"vue": "^3.4.23",
1616
"vuepress": "2.0.0-rc.9",
17-
"vuepress-plugin-search-pro": "^2.0.0-rc.36",
18-
"vuepress-theme-hope": "2.0.0-rc.36"
17+
"vuepress-plugin-search-pro": "^2.0.0-rc.37",
18+
"vuepress-theme-hope": "2.0.0-rc.37"
1919
}
2020
}

src/.vuepress/config.ts

+3-18
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,9 @@ import theme from "./theme.js";
44
export default defineUserConfig({
55
base: "/",
66

7-
locales: {
8-
// "/": {
9-
// lang: "en-US",
10-
// title: "Docs Demo",
11-
// description: "A docs demo for vuepress-theme-hope",
12-
// },
13-
// "/zh/": {
14-
// lang: "zh-CN",
15-
// title: "文档演示",
16-
// description: "vuepress-theme-hope 的文档演示",
17-
// },
18-
19-
"/": {
20-
lang: "zh-CN",
21-
title: "HackOrg",
22-
description: "一个关于黑客技术的开源非营利组织",
23-
},
24-
},
7+
lang: "zh-CN",
8+
title: "HackOrg",
9+
description: "一个热衷于黑客技术的开源非营利组织",
2510

2611
theme,
2712

Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
import { navbar } from "vuepress-theme-hope";
22

3-
export const zhNavbar = navbar([
4-
"/zh/",
5-
"/zh/demo/",
3+
export default navbar([
4+
"/",
5+
"/demo/",
66
{
7-
text: "指南",
7+
text: "Guide",
88
icon: "lightbulb",
9-
prefix: "/zh/guide/",
9+
prefix: "/guide/",
1010
children: [
1111
{
1212
text: "Bar",
1313
icon: "lightbulb",
1414
prefix: "bar/",
15-
children: ["baz", { text: "...", icon: "ellipsis", link: "" }],
15+
children: ["baz", { text: "...", icon: "ellipsis", link: "#" }],
1616
},
1717
{
1818
text: "Foo",
1919
icon: "lightbulb",
2020
prefix: "foo/",
21-
children: ["ray", { text: "...", icon: "ellipsis", link: "" }],
21+
children: ["ray", { text: "...", icon: "ellipsis", link: "#" }],
2222
},
2323
],
2424
},
2525
{
26-
text: "V2 文档",
26+
text: "V2 Docs",
2727
icon: "book",
28-
link: "https://theme-hope.vuejs.press/zh/",
28+
link: "https://theme-hope.vuejs.press/",
2929
},
3030
]);

src/.vuepress/navbar/en.ts

-30
This file was deleted.

src/.vuepress/navbar/index.ts

-2
This file was deleted.
Loading
4.62 KB
Loading
12.9 KB
Loading
Loading
Loading
3.57 KB
Loading

src/.vuepress/public/logo.png

92 KB
Loading

src/.vuepress/public/logo.svg

+1
Loading

src/.vuepress/sidebar.ts

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { sidebar } from "vuepress-theme-hope";
2+
3+
export default sidebar({
4+
"/": [
5+
"",
6+
// 注意:已经在 theme.ts 中配置了 sidebar: "structure",
7+
// 故程序会通过文件结构自动生成侧边栏,所以后续无需再配置文件路径...
8+
// https://theme-hope.vuejs.press/zh/guide/layout/sidebar.html
9+
10+
// {
11+
// text: "Demo",
12+
// icon: "laptop-code",
13+
// prefix: "demo/",
14+
// link: "demo/",
15+
// children: "structure",
16+
// },
17+
// {
18+
// text: "Docs",
19+
// icon: "book",
20+
// prefix: "guide/",
21+
// children: "structure",
22+
// },
23+
// {
24+
// text: "Slides",
25+
// icon: "person-chalkboard",
26+
// link: "https://plugin-md-enhance.vuejs.press/guide/content/revealjs/demo.html",
27+
// },
28+
],
29+
});

src/.vuepress/sidebar/en.ts

-25
This file was deleted.

src/.vuepress/sidebar/index.ts

-2
This file was deleted.

src/.vuepress/sidebar/zh.ts

-25
This file was deleted.

src/.vuepress/styles/palette.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// you can change colors here
22
// $theme-color: #096dd9;
3-
$theme-color: #ef5a9d;
3+
$theme-color: #ef5a9d;

src/.vuepress/theme.ts

+27-48
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { hopeTheme } from "vuepress-theme-hope";
2-
import { enNavbar, zhNavbar } from "./navbar/index.js";
3-
import { enSidebar, zhSidebar } from "./sidebar/index.js";
2+
import navbar from "./navbar.js";
3+
import sidebar from "./sidebar.js";
44

55
export default hopeTheme({
66

@@ -22,53 +22,32 @@ export default hopeTheme({
2222

2323
docsDir: "src",
2424

25-
locales: {
26-
"/": {
27-
// navbar
28-
navbar: enNavbar,
25+
// navbar
26+
// navbar,
27+
// 禁用导航栏
28+
navbar: false,
2929

30-
// sidebar
31-
sidebar: enSidebar,
30+
// sidebar
31+
// sidebar,
32+
// 通过文件结构自动生成侧边栏
33+
// https://theme-hope.vuejs.press/zh/guide/layout/sidebar.html
34+
sidebar: "structure",
3235

33-
footer: "",
36+
footer: "",
3437

35-
displayFooter: true,
36-
37-
metaLocales: {
38-
editLink: "在 GitHub 上编辑此页",
39-
},
40-
},
41-
42-
/**
43-
* Chinese locale config
44-
*/
45-
"/zh/": {
46-
// navbar
47-
navbar: zhNavbar,
48-
49-
// sidebar
50-
sidebar: zhSidebar,
51-
52-
footer: "默认页脚",
53-
54-
displayFooter: true,
55-
56-
// page meta
57-
metaLocales: {
58-
editLink: "在 GitHub 上编辑此页",
59-
},
60-
},
61-
},
38+
displayFooter: true,
6239

6340
encrypt: {
6441
config: {
6542
"/demo/encrypt.html": ["hackorg.com"],
66-
"/zh/demo/encrypt.html": ["hackorg.com"],
6743
},
6844
},
6945

70-
plugins: {
46+
metaLocales: {
47+
editLink: "在 GitHub 上编辑此页",
48+
},
7149

50+
plugins: {
7251
// add search plugin
7352
searchPro: true,
7453
// searchPro: {
@@ -125,46 +104,46 @@ export default hopeTheme({
125104
tasklist: true,
126105
vPre: true,
127106

128-
// Install chart.js before enabling it
107+
// install chart.js before enabling it
129108
// chart: true,
130109

131110
// insert component easily
132111

133-
// Install echarts before enabling it
112+
// install echarts before enabling it
134113
// echarts: true,
135114

136-
// Install flowchart.ts before enabling it
115+
// install flowchart.ts before enabling it
137116
// flowchart: true,
138117

139118
// gfm requires mathjax-full to provide tex support
140119
// gfm: true,
141120

142-
// Install katex before enabling it
121+
// install katex before enabling it
143122
// katex: true,
144123

145-
// Install mathjax-full before enabling it
124+
// install mathjax-full before enabling it
146125
// mathjax: true,
147126

148-
// Install mermaid before enabling it
127+
// install mermaid before enabling it
149128
// mermaid: true,
150129

151130
// playground: {
152131
// presets: ["ts", "vue"],
153132
// },
154133

155-
// Install reveal.js before enabling it
134+
// install reveal.js before enabling it
156135
// revealJs: {
157136
// plugins: ["highlight", "math", "search", "notes", "zoom"],
158137
// },
159138

160-
// Install @vue/repl before enabling it
139+
// install @vue/repl before enabling it
161140
// vuePlayground: true,
162141

163-
// Install sandpack-vue3 before enabling it
142+
// install sandpack-vue3 before enabling it
164143
// sandpack: true,
165144
},
166145

167-
// Install @vuepress/plugin-pwa and uncomment these if you want a PWA
146+
// install @vuepress/plugin-pwa and uncomment these if you want a PWA
168147
// pwa: {
169148
// favicon: "/favicon.ico",
170149
// cacheHTML: true,

src/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
home: true
33
icon: home
4-
title: 主页
4+
title: Home
55
heroFullScreen: true
66
heroImage: https://hackorg.com/hackorg-github-logo-black-transparent-mini.png
77
bgImage:
88
bgImageDark: https://theme-hope-assets.vuejs.press/bg/1-dark.svg
99
bgImageStyle:
1010
background-attachment: fixed
1111
heroText: Hack Organization
12-
tagline: 一个关于黑客技术的开源非营利组织
12+
tagline: 一个热衷于黑客技术的开源非营利组织
1313
actions:
14-
- text: 技术分享
14+
- text: 关于我们
1515
icon: lightbulb
16-
link: ./demo/
16+
link: ./about
1717
type: primary
1818

19-
- text: 关于我们
20-
link: ./guide/
19+
- text: 赞助我们
20+
link: ./sponsor
2121

2222
copyright: false
2323
footer: 版权所有 © 2024 GoogTech & Powered by VuePress-Theme-Hope

src/about.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: About
3+
icon: user
4+
# 指定当前页面在侧边栏或目录中的排序
5+
# 当填写正数的时候,页面将排在靠前的位置,数字越小出现的位置越前
6+
# https://theme-hope.vuejs.press/zh/config/frontmatter/layout.html
7+
order: 1
8+
---
9+
10+
嘿姐妹,时刻欢迎你的加入!

0 commit comments

Comments
 (0)