This repo contains the website configuration and documentation powering the ChaosBlade website.
- Git.
- Node (version 16.14 or greater).
- Yarn (version 1.5 or greater).
- A fork of the repo (for any contributions).
- A clone of the
chaosblade-websiterepo.
cd chaosblade-websiteto go into the project root.- Run
yarnto install the website's workspace dependencies.
yarn run startto start the development server (powered by Docusaurus).- Open http://localhost:3000/ site in your favorite browser.
If you would like to contribute an edit or addition to the docs, read through our contributing guide before you write anything.
Almost all our content is generated from markdown files you can find in the docs, blog and i18n directories.
To edit the internals of how the site is built, you may want to get familiarized with how the site is built. The ChaosBlade website is a static site generated using Docusaurus.
The website configuration can be found in the docusaurus.config.js file. Visit the Docusaurus website to learn more about all the available configuration options.
The following is a high-level overview of relevant files and folders.
chaosblade-website
├── .github/
│ ├── [GITHUB CONFIG]
│ └── ...
├── docs/
│ ├── [BASE VERSIONED DOC FILES]
│ └── ...
├── blog/
│ ├── [BLOG POSTS]
│ └── ...
├── src/
│ ├── css/
│ │ ├── [CUSTOM STYLES]
│ │ └── ...
│ ├── pages/
│ │ ├── [STATIC PAGES]
│ │ └── ...
│ └── theme/
│ │ ├── [SWIZZLED COMPONENTS]
│ │ └── ...
│ └── data.js
├── static/
│ └── img/
├── docusaurus.config.js
├── package.json
└── sidebars.json
The main config file for the website can be found at docusaurus.config.js. This file tells Docusaurus how to build the website. Edits to this file are rarely necessary.
The src/pages subdirectory contains the React components that make up the non-documentation pages of the site, such as the homepage.
The src/theme subdirectory contains the swizzled React components from the Docusaurus theme.
The data.json file contains the users who use ChaosBlade.
-
First, make sure the current docs version (the
./docsdirectory) is ready to be frozen. -
Enter a new version number.
yarn docusaurus docs:version 1.1.0
When tagging a new version, the document versioning mechanism will:
- Copy the full
docs/folder contents into a newversioned_docs/version-[versionName]/folder. - Copy the full
i18n/zh/docusaurus-plugin-content-docs/currentfolder contents into a newi18n/zh/docusaurus-plugin-content-docs/version-[versionName]. - Copy
i18n/zh/docusaurus-plugin-content-docs/current.jsonfile contents into a newi18n/zh/docusaurus-plugin-content-docs/version-[versionName].json. - Create a versioned sidebars file based from your current sidebar configuration (if it exists) - saved as
versioned_sidebars/version-[versionName]-sidebars.json. - Append the new version number to
versions.json.
Fork the repository and clone it locally. Connect your local to the original “upstream” repository by adding it as a remote. Pull in changes from “upstream” often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. (See more detailed instructions here.)
git checkout mainfrom any folder in your localchaosblade-websiterepository.git pull origin mainto ensure you have the latest main code.git checkout -b the-name-of-my-branchto create a branch.replace
the-name-of-my-branchwith a suitable name, such asupdate-animations-page
- Follow the "Running locally" instructions.
- Save the files and check in the browser.
- Some changes may require a server restart to generate new files. (Pages in
docsalways do!) - Edits to pages in
docswill only be visible in the latest version of the documentation, called "Next", located under thedocs/nextpath.
Visit http://localhost:3000/docs/next/YOUR-DOCS-PAGE to see your work.
git add -A && git commit -m "My message"to stage and commit your changes.replace
My messagewith a commit message, such asFixed header logo on Androidgit push my-fork-name the-name-of-my-branch- Make a Pull Request.
When your Pull Request is created successfully, netlify will generate a preview page for you, please check your changes in the preview page.
ChaosBlade documentation is CC-BY-4.0 licensed.

