Skip to content
This repository was archived by the owner on Jan 28, 2022. It is now read-only.

Commit 355d0fb

Browse files
g1eny0ungti-srebot
andauthored
refactor: website (#740)
* refactor: website Signed-off-by: Yue Yang <[email protected]> * fix: typo Signed-off-by: Yue Yang <[email protected]> Co-authored-by: ti-srebot <[email protected]>
1 parent 8198c73 commit 355d0fb

27 files changed

+2879
-1523
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"printWidth": 120
5+
}

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
# Website
1+
# Chaos Mesh Website
22

33
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
44

55
### Installation
66

7-
```
8-
$ yarn
7+
```sh
8+
yarn
99
```
1010

1111
### Local Development
1212

13-
```
14-
$ yarn start
13+
```sh
14+
yarn start
1515
```
1616

1717
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1818

1919
### Build
2020

21-
```
22-
$ yarn build
21+
```sh
22+
yarn build
2323
```
2424

2525
This command generates static content into the `build` directory and can be served using any static contents hosting service.
2626

2727
### Deployment
2828

29-
```
30-
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
29+
```sh
30+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
3131
```
3232

3333
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

blog/2020-04-20-simulating-clock-skew-in-k8s-without-affecting-other-containers-on-node.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: Cwen Yin
55
author_title: Maintainer of Chaos Mesh
66
author_url: https://github.com/cwen0
77
author_image_url: https://avatars1.githubusercontent.com/u/22956341?v=4
8-
tags: [Chaos Mesh, Chaos Engineering, Kubernetes, Distributed system]
8+
tags: [Chaos Mesh, Chaos Engineering, Kubernetes, Distributed System]
99
---
1010

1111
![Clock synchronization in distributed system](/img/clock-sync-chaos-engineering-k8s.jpg)

docs/installation/get_started_on_kind.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: get_started_on_kind
3-
title: Get started on kind
3+
title: Get started on Kind
44
---
55

66
This document describes how to deploy Chaos Mesh in Kubernetes on your laptop (Linux or macOS) using kind.

docusaurus.config.js

+20-28
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
module.exports = {
22
title: 'Chaos Mesh®',
33
tagline: 'A Powerful Chaos Engineering Platform for Kubernetes',
4-
url: 'https://chaos-mesh.github.io',
4+
url: 'https://chaos-mesh.org',
55
baseUrl: '/',
66
favicon: 'img/favicon.ico',
77
organizationName: 'chaos-mesh', // Usually your GitHub org/user name.
88
projectName: 'chaos-mesh.github.io', // Usually your repo name.
99
themeConfig: {
10-
defaultDarkMode: false,
1110
algolia: {
1211
apiKey: '49739571d4f89670b12f39d5ad135f5a',
1312
indexName: 'chaos-mesh',
@@ -16,19 +15,19 @@ module.exports = {
1615
trackingID: 'UA-90760217-2',
1716
},
1817
navbar: {
18+
hideOnScroll: true,
19+
title: 'Chaos Mesh®',
1920
logo: {
2021
alt: 'Chaos Mesh Logo',
21-
src: 'img/logo.svg',
22-
srcDark: 'img/logo_dark.svg'
22+
src: 'img/logos/logo-mini.svg',
2323
},
24-
links: [
24+
items: [
2525
{
26-
to: 'docs/',
26+
to: 'docs',
2727
activeBasePath: 'docs',
28-
label: 'Docs',
29-
position: 'left',
28+
label: 'Documentation',
3029
},
31-
{to: 'blog', label: 'Blog', position: 'left'},
30+
{ to: 'blog', activeBasePath: 'blog', label: 'Blog' },
3231
{
3332
href: 'https://github.com/chaos-mesh/chaos-mesh',
3433
label: 'GitHub',
@@ -37,17 +36,16 @@ module.exports = {
3736
],
3837
},
3938
footer: {
40-
style: 'dark',
4139
links: [
4240
{
43-
title: 'Docs',
41+
title: 'Documentation',
4442
items: [
4543
{
46-
label: 'Getting started',
44+
label: 'Getting Started',
4745
to: 'docs/installation/installation',
4846
},
4947
{
50-
label: 'User Guide',
48+
label: 'User Guides',
5149
to: 'docs/user_guides/run_chaos_experiment',
5250
},
5351
],
@@ -59,14 +57,6 @@ module.exports = {
5957
label: 'Twitter',
6058
href: 'https://twitter.com/chaos_mesh',
6159
},
62-
{
63-
label: 'Slack',
64-
href: 'https://chaos-mesh.org/tidbslack',
65-
},
66-
{
67-
label: 'Stack Overflow',
68-
href: 'https://stackoverflow.com/questions/tagged/chaos-mesh',
69-
},
7060
],
7161
},
7262
{
@@ -83,9 +73,13 @@ module.exports = {
8373
],
8474
},
8575
],
86-
copyright: `<strong>© Chaos Mesh® Authors ${new Date().getFullYear()} | Documentation Distributed under CC-BY-4.0 </strong> <br> <br> © ${new Date().getFullYear()} The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage/"> Trademark Usage page</a>.`,
76+
copyright: `<br /><strong>© Chaos Mesh® Authors ${new Date().getFullYear()} | Documentation Distributed under CC-BY-4.0 </strong><br /><br />© ${new Date().getFullYear()} The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage/"> Trademark Usage</a> page.`,
77+
},
78+
prism: {
79+
theme: require('prism-react-renderer/themes/dracula'),
8780
},
8881
},
82+
plugins: ['docusaurus-plugin-sass'],
8983
presets: [
9084
[
9185
'@docusaurus/preset-classic',
@@ -95,19 +89,17 @@ module.exports = {
9589
homePageId: 'overview',
9690
sidebarPath: require.resolve('./sidebars.js'),
9791
// Please change this to your repo.
98-
editUrl:
99-
'https://github.com/chaos-mesh/chaos-mesh/edit/master/website/',
92+
editUrl: 'https://github.com/chaos-mesh/chaos-mesh/edit/master/website/',
10093
},
10194
blog: {
10295
showReadingTime: true,
10396
// Please change this to your repo.
104-
editUrl:
105-
'https://github.com/chaos-mesh/chaos-mesh/edit/master/website/blog/',
97+
editUrl: 'https://github.com/chaos-mesh/chaos-mesh/edit/master/website/',
10698
},
10799
theme: {
108-
customCss: require.resolve('./src/css/custom.css'),
100+
customCss: require.resolve('./src/styles/custom.scss'),
109101
},
110102
},
111103
],
112104
],
113-
};
105+
}

package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "chaos-mesh",
3-
"version": "0.0.0",
2+
"name": "chaos-mesh-website",
3+
"version": "0.8.0",
44
"private": true,
55
"scripts": {
66
"start": "docusaurus start",
@@ -9,9 +9,10 @@
99
"deploy": "docusaurus deploy"
1010
},
1111
"dependencies": {
12-
"@docusaurus/core": "^2.0.0-alpha.56",
13-
"@docusaurus/preset-classic": "^2.0.0-alpha.56",
14-
"classnames": "^2.2.6",
12+
"@docusaurus/core": "^2.0.0-alpha.58",
13+
"@docusaurus/preset-classic": "^2.0.0-alpha.58",
14+
"clsx": "^1.1.1",
15+
"docusaurus-plugin-sass": "^0.1.9",
1516
"react": "^16.8.4",
1617
"react-dom": "^16.8.4"
1718
},
@@ -27,4 +28,4 @@
2728
"last 1 safari version"
2829
]
2930
}
30-
}
31+
}

sidebars.js

+5-11
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ module.exports = {
77
{
88
type: 'category',
99
label: 'Getting Started',
10-
items: [
11-
'installation/installation',
12-
'installation/get_started_on_kind',
13-
'installation/get_started_on_minikube'
14-
],
10+
items: ['installation/installation', 'installation/get_started_on_kind', 'installation/get_started_on_minikube'],
1511
},
1612
{
1713
type: 'category',
@@ -37,11 +33,9 @@ module.exports = {
3733
],
3834
},
3935
{
40-
type: "category",
41-
label: "Use Cases",
42-
items: [
43-
"use_cases/multi_data_centers",
44-
]
36+
type: 'category',
37+
label: 'Use Cases',
38+
items: ['use_cases/multi_data_centers'],
4539
},
4640
{
4741
type: 'category',
@@ -50,7 +44,7 @@ module.exports = {
5044
'development_guides/development_overview',
5145
'development_guides/set_up_the_development_environment',
5246
'development_guides/develop_a_new_chaos',
53-
]
47+
],
5448
},
5549
{
5650
type: 'doc',

0 commit comments

Comments
 (0)