This website is built using Docusaurus, a modern static website generator. This
READMEfile may not be detailed enough, so we can find more details on the doc site of Docusaurus. Certainly, welcome to submit a new issue.
This repo is using node and docusaurus. So we must install a node (>= 18) firstly.
- Use yarn installto install all dependencies of this repo.
- Use yarn startto start docs site locally
- Create a .mdfile in./docsor in the child directories of./docs, name it with a related filename.
- Open ./sidebar.ts. This is a file used to define the sidebar structure. Now we use a manual sidebar configure. Find a correct position insidebars->tutorialSidebarof./sidebar.tsand add the corresponding records.
- Writing something in created file.
- Just like creating a page of documents. Create a .mdfile in./blogs.
- No need to update ./sidebar.tsand we can write something in the created file.
Now we support Chinese and English. If we want to create a Chinese page, we can directly add it in ./docs or ./blogs.
If we want to add an English translation, we need add a new file to ./i18n/en/docusaurus-plugin-content-docs/current or ./i18n/en/docusaurus-plugin-content-blogs/current. We can keep the same directory structure with the ./docs and ./blogs in these English file directories.
If we want to display highlighted code, we need use go but golang as the language block name. Because Docusaurus seems only support go.
Just like:
```go