You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,73 @@ This command generates static content into the `build` directory and can be serv
37
37
38
38
Learn how to contribute to this website.
39
39
40
+
### Configs
41
+
42
+
All the configs can be found in `docusaurus.config.js`.
43
+
44
+
### Create a doc page
45
+
46
+
Create a Markdown file, `example.md`, and place it under the `docs` directory. Any markdown file will render into the site without needing any extra configuration. It will be displayed alphabetically on the sidebar.
47
+
48
+
```bash
49
+
/root # root directory
50
+
├── docs
51
+
│ └── example.md
52
+
├── docusaurus.config.js
53
+
├── ...
54
+
```
55
+
56
+
Markdown documents can use the Markdown front matter metadata fields, enclosed by a line `---` on either side. At the top of the file, you can optionally specify attributes in the front matter, so that Docusaurus will pick them up correctly when generating the site. Accepted fields can be found [here](https://docusaurus.io/docs/next/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter).
57
+
58
+
### Create a doc category
59
+
60
+
Creating a `example.md` in a sub folder will create a category in the sidebar.
61
+
62
+
```bash
63
+
/root # root directory
64
+
├── docs
65
+
│ ├── sub-folder
66
+
│ └── example.md
67
+
```
68
+
69
+
To change the category name or other category meta data, an optional file `_category_.json` can be created in the respective sub folder.
70
+
71
+
```json
72
+
{
73
+
"label": "Tutorial"
74
+
}
75
+
```
76
+
77
+
### Static Assets
78
+
79
+
The Static Assets can be found in the `static` folder. More [here](https://docusaurus.io/docs/next/static-assets).
80
+
81
+
### Change theme color
82
+
83
+
Generate the variables from [here](https://docusaurus.io/docs/next/styling-layout#styling-your-site-with-infima). Then replace the variables in `src/css/custom.css` with these new variables. Don't forget variables for dark mode.
84
+
85
+
### Change codeBlock theme
86
+
87
+
Docusaurus uses [Prism React Renderer](https://github.com/FormidableLabs/prism-react-renderer) to highlight code blocks. All configuration are in the `prism` object of `docusaurus.config.js`. You can specify a custom theme from the [list of available themes](https://github.com/FormidableLabs/prism-react-renderer/tree/master/src/themes).
88
+
89
+
### Change footer
90
+
91
+
You can add logo and a copyright to the footer via `themeConfig.footer`. More [here](https://docusaurus.io/docs/next/api/themes/configuration#footer-1).
92
+
93
+
### Blog
94
+
95
+
To set up blog, start by creating a `blog` directory. More [here](https://docusaurus.io/docs/next/blog).
96
+
97
+
### Admonitions
98
+
99
+
In addition to the basic Markdown syntax, Docusaurus use [remark-admonitions](https://github.com/elviswolcott/remark-admonitions) alongside MDX to add support for admonitions. Admonitions are wrapped by a set of 3 colons. More [here](https://docusaurus.io/docs/next/markdown-features/admonitions).
100
+
101
+
### Update Docusaurus version
102
+
103
+
To update Docusaurus version, manually change the version number in `package.json` to the desired version. Then run `npm run install`.
104
+
105
+
Any required change/depricated message will be shown on the terminal when running the command `npm run start`. More [here](https://docusaurus.io/docs/next/installation#updating-your-docusaurus-version).
106
+
40
107
## Status
41
108
42
109
The current status of the website is **under construction**. Please follow us on Twitter [@chkware](https://twitter.com/chkware) for update. Thank you for your patience.
0 commit comments