Skip to content

Commit c9abea4

Browse files
authored
Improve layout and style (#1492)
* modify docusaurus.config.js file * small fix * Adjust the layout of the homepage and introduce the GitHub button style.
1 parent 2922aaf commit c9abea4

File tree

9 files changed

+626
-347
lines changed

9 files changed

+626
-347
lines changed

docs/docusaurus.config.js

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require("prism-react-renderer/themes/github");
5-
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
4+
const lightCodeTheme = require('prism-react-renderer/themes/github');
5+
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
66

77
/** @type {import('@docusaurus/types').Config} */
88
const config = {
9-
title: "Hippo4j",
10-
tagline: "动态可观测线程池框架,为业务系统提高线上运行保障能力",
11-
url: "https://hippo4j.cn",
12-
baseUrl: "/",
13-
onBrokenLinks: "throw",
14-
onBrokenMarkdownLinks: "warn",
15-
favicon: "img/hippo4j_favicon.ico",
9+
title: 'Hippo4j',
10+
tagline: '动态可观测线程池框架,为业务系统提高线上运行保障能力',
11+
url: 'https://hippo4j.cn',
12+
baseUrl: '/',
13+
onBrokenLinks: 'throw',
14+
onBrokenMarkdownLinks: 'warn',
15+
favicon: 'img/hippo4j_favicon.ico',
1616
// GitHub pages deployment config.
1717
// If you aren't using GitHub pages, you don't need these.
18-
organizationName: "hippo4j", // Usually your GitHub org/user name.
19-
projectName: "hippo4j.github.io", // Usually your repo name.
20-
deploymentBranch: "main",
18+
organizationName: 'hippo4j', // Usually your GitHub org/user name.
19+
projectName: 'hippo4j.github.io', // Usually your repo name.
20+
deploymentBranch: 'main',
2121

2222
// Even if you don't use internalization, you can use this field to set useful
2323
// metadata like html lang. For example, if your site is Chinese, you may want
2424
// to replace "en" with "zh-Hans".
2525
i18n: {
26-
defaultLocale: "zh",
27-
locales: ["en", "zh"],
26+
defaultLocale: 'zh',
27+
locales: ['en', 'zh'],
2828
localeConfigs: {
2929
en: {
30-
label: "English",
31-
direction: "ltr",
30+
label: 'English',
31+
direction: 'ltr',
3232
},
3333
zh: {
34-
label: "简体中文",
35-
direction: "ltr",
34+
label: '简体中文',
35+
direction: 'ltr',
3636
},
3737
},
3838
},
3939

4040
presets: [
4141
[
42-
"classic",
42+
'classic',
4343
/** @type {import('@docusaurus/preset-classic').Options} */
4444
({
4545
docs: {
46-
sidebarPath: require.resolve("./sidebars.js"),
46+
sidebarPath: require.resolve('./sidebars.js'),
4747
// Please change this to your repo.
4848
// Remove this to remove the "edit this page" links.
4949
// Do not automatically expand the menu
@@ -55,32 +55,32 @@ const config = {
5555
// Please change this to your repo.
5656
// Remove this to remove the "edit this page" links.
5757
editUrl:
58-
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
58+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
5959
},
6060
theme: {
61-
customCss: require.resolve("./src/css/custom.css"),
61+
customCss: require.resolve('./src/css/custom.css'),
6262
},
6363
}),
6464
],
6565
],
6666

6767
plugins: [
6868
[
69-
"@docusaurus/plugin-content-docs",
69+
'@docusaurus/plugin-content-docs',
7070
{
71-
id: "community",
72-
path: "community",
73-
routeBasePath: "community",
74-
sidebarPath: require.resolve("./sidebarsCommunity.js"),
71+
id: 'community',
72+
path: 'community',
73+
routeBasePath: 'community',
74+
sidebarPath: require.resolve('./sidebarsCommunity.js'),
7575
},
7676
],
7777
async function myPlugin(context, options) {
7878
return {
79-
name: "docusaurus-tailwindcss",
79+
name: 'docusaurus-tailwindcss',
8080
configurePostCss(postcssOptions) {
8181
// Appends TailwindCSS and AutoPrefixer.
82-
postcssOptions.plugins.push(require("tailwindcss"));
83-
postcssOptions.plugins.push(require("autoprefixer"));
82+
postcssOptions.plugins.push(require('tailwindcss'));
83+
postcssOptions.plugins.push(require('autoprefixer'));
8484
return postcssOptions;
8585
},
8686
};
@@ -92,64 +92,64 @@ const config = {
9292
({
9393
autoCollapseCategories: true,
9494
announcementBar: {
95-
id: "announcementBar-1", // Increment on change
95+
id: 'announcementBar-1', // Increment on change
9696
content:
9797
'⭐️ If you like hippo4j, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/opengoofy/hippo4j">GitHub</a> ⭐️',
98-
backgroundColor: "#fafbfc",
99-
textColor: "#091E42",
98+
backgroundColor: '#fafbfc',
99+
textColor: '#091E42',
100100
isCloseable: false,
101101
},
102102
navbar: {
103-
title: "",
103+
title: '',
104104
logo: {
105-
alt: "Hippo4j 动态可观测线程池框架",
106-
src: "img/hippo4j.png",
105+
alt: 'Hippo4j 动态可观测线程池框架',
106+
src: 'img/hippo4j.png',
107107
},
108108
items: [
109109
{
110-
type: "docSidebar",
111-
docId: "intro",
112-
position: "left",
113-
sidebarId: "user_docs",
114-
label: "文档",
110+
type: 'docSidebar',
111+
docId: 'intro',
112+
position: 'left',
113+
sidebarId: 'user_docs',
114+
label: '文档',
115115
},
116116
{
117-
to: "/community/contributor-guide",
118-
label: "社区",
119-
position: "left",
117+
to: '/community/contributor-guide',
118+
label: '社区',
119+
position: 'left',
120120
activeBaseRegex: `/community/`,
121121
},
122122
/*{ to: "/team", label: "团队", position: "left" },*/
123-
{ to: "/users", label: "采用公司", position: "left" },
124-
{ to: "/group", label: "加群沟通", position: "left" },
123+
{ to: '/users', label: '采用公司', position: 'left' },
124+
{ to: '/group', label: '加群沟通', position: 'left' },
125125
/*{to: '/blog', label: '博客', position: 'left'},*/
126126
{
127-
href: "http://console.hippo4j.cn/index.html",
128-
label: "控制台样例",
129-
position: "left",
127+
href: 'http://console.hippo4j.cn/index.html',
128+
label: '控制台样例',
129+
position: 'left',
130130
},
131131
{
132-
href: "https://magestack.cn",
133-
label: "🚀 拿个offer",
134-
position: "left",
132+
href: 'https://magestack.cn',
133+
label: '🚀 拿个offer',
134+
position: 'left',
135135
},
136136
{
137-
type: "docsVersionDropdown",
138-
position: "right",
137+
type: 'docsVersionDropdown',
138+
position: 'right',
139139
dropdownActiveClassDisabled: true,
140140
},
141141

142-
{ type: "localeDropdown", position: "right" },
142+
{ type: 'localeDropdown', position: 'right' },
143143
/*{
144144
href: 'https://gitee.com/mabaiwancn/hippo4j',
145145
label: 'Gitee',
146146
position: 'right',
147147
},*/
148148
{
149-
href: "https://github.com/opengoofy/hippo4j",
150-
className: "header-github-link",
151-
"aria-label": "GitHub repository",
152-
position: "right",
149+
href: 'https://github.com/opengoofy/hippo4j',
150+
className: 'header-github-link',
151+
'aria-label': 'GitHub repository',
152+
position: 'right',
153153
},
154154

155155
/*{
@@ -160,57 +160,57 @@ const config = {
160160
],
161161
},
162162
footer: {
163-
style: "dark",
163+
style: 'dark',
164164
links: [
165165
{
166-
title: "Docs",
166+
title: 'Docs',
167167
items: [
168168
{
169-
label: "Intro",
170-
to: "/docs/user_docs/intro",
169+
label: 'Intro',
170+
to: '/docs/user_docs/intro',
171171
},
172172
{
173-
label: "Config Mode",
174-
to: "/docs/user_docs/getting_started/config/hippo4j-config-start",
173+
label: 'Config Mode',
174+
to: '/docs/user_docs/getting_started/config/hippo4j-config-start',
175175
},
176176
{
177-
label: "Server Mode",
178-
to: "/docs/user_docs/getting_started/server/hippo4j-server-start",
177+
label: 'Server Mode',
178+
to: '/docs/user_docs/getting_started/server/hippo4j-server-start',
179179
},
180180
],
181181
},
182182
{
183-
title: "Community",
183+
title: 'Community',
184184
items: [
185185
{
186-
label: "Group",
187-
href: "https://hippo4j.cn/group",
186+
label: 'Group',
187+
href: 'https://hippo4j.cn/group',
188188
},
189189
{
190-
label: "WeChat",
191-
href: "https://mp.weixin.qq.com/s/diVHYvwiuYH9aWpZDPc27g",
190+
label: 'WeChat',
191+
href: 'https://mp.weixin.qq.com/s/diVHYvwiuYH9aWpZDPc27g',
192192
},
193193
],
194194
},
195195
{
196-
title: "More",
196+
title: 'More',
197197
items: [
198198
{
199-
label: "Gitee",
200-
href: "https://gitee.com/opengoofy/hippo4j",
199+
label: 'Gitee',
200+
href: 'https://gitee.com/opengoofy/hippo4j',
201201
},
202202
{
203-
label: "GitHub",
204-
href: "https://github.com/opengoofy/hippo4j",
203+
label: 'GitHub',
204+
href: 'https://github.com/opengoofy/hippo4j',
205205
},
206206
],
207207
},
208208
{
209-
title: "Links",
209+
title: 'Links',
210210
items: [
211211
{
212-
label: "推广合作",
213-
href: "https://hippo4j.cn/docs/user_docs/other/operation",
212+
label: '推广合作',
213+
href: 'https://hippo4j.cn/docs/user_docs/other/operation',
214214
},
215215
],
216216
},
@@ -221,7 +221,7 @@ const config = {
221221
prism: {
222222
theme: lightCodeTheme,
223223
darkTheme: darkCodeTheme,
224-
additionalLanguages: ["java"],
224+
additionalLanguages: ['java'],
225225
},
226226
}),
227227
};

docs/i18n/zh/code.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
"description": "The homepage title description"
263263
},
264264
"homepage.titleDescription2": {
265-
"message": "动态可观测线程池框架,为业务系统提高线上运行保障能力。",
265+
"message": "动态可观测Java线程池框架,为你的业务系统提高线上运行保障能力",
266266
"description": "The homepage title description"
267267
},
268268
"homepage.startButton": {
@@ -326,7 +326,7 @@
326326
"description": "The third desc for fristPart "
327327
},
328328
"homepage.introduction.secondPartDesc1": {
329-
"message": "应用程序线程池运行时点,提供四个告警维度。",
329+
"message": "应用程序线程池运行时点,提供四个告警维度,并支持自定义时间内不重复报警",
330330
"description": "The first desc for secondPart "
331331
},
332332
"homepage.introduction.secondPartDesc2": {
@@ -354,7 +354,11 @@
354354
"description": "The p1 for the secondTitle part"
355355
},
356356
"homepage.secondTitleDesc2": {
357-
"message": "提供了线程池动态调整、自定义警报和操作监控等功能,以帮助提高业务系统的运营支持能力。",
357+
"message": "提供了线程池动态调整、自定义警报和操作监控等功能。",
358+
"description": "The p1 for the secondTitle part"
359+
},
360+
"homepage.secondTitleDesc3": {
361+
"message": "帮助提高你的业务系统的运营支持能力。",
358362
"description": "The p2 for the secondTitle part"
359363
}
360364
}

0 commit comments

Comments
 (0)