Skip to content

Commit

Permalink
Merge pull request #6 from TremblingV5/add_community_readme
Browse files Browse the repository at this point in the history
feat: add community readme
  • Loading branch information
xujiajun authored Jan 8, 2024
2 parents fc92295 + 80bfeff commit 7378434
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 37 deletions.
44 changes: 26 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
# NutsDB document (WIP)
# NutsDB Documents

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
> This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. This `README` file may not be detailed enough, so we can find more details on the doc site of Docusaurus. Certainly, welcome to submit a new issue.
### Installation
## How to run locally

```
$ yarn
```
This repo is using `node` and `docusaurus`. So we must install a node (`>= 18`) firstly.

### Local Development
1. Use `yarn install` to install all dependencies of this repo.
2. Use `yarn start` to start docs site locally

```
$ yarn start
```
## How to create a page of documents

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1. Create a `.md` file in `./docs` or in the child directories of `./docs`, name it with a related filename.
2. Open `./sidebar.ts`. This is a file used to define the sidebar structure. Now we use a manual sidebar configure. Find a correct position in `sidebars->tutorialSidebar` of `./sidebar.ts` and add the corresponding records.
3. Writing something in created file.

### Build
## How to create a blog

```
$ yarn build
```
1. Just like creating a page of documents. Create a `.md` file in `./blogs`.
2. No need to update `./sidebar.ts` and we can write something in the created file.

This command generates static content into the `build` directory and can be served using any static contents hosting service.
## How to create a document/blog in multi-language

### Deployment
Now we support Chinese and English. If we want to create a Chinese page, we can directly add it in `./docs` or `./blogs`.

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.
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.

## Something more

### Use `go` as the language block name

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
16 changes: 6 additions & 10 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,17 @@ const config: Config = {
label: 'Blog',
position: 'left'
},
{
to: '/about',
label: 'About',
position: 'left'
},
// It seems that we don't need this item temporarily
// {
// to: '/about',
// label: 'About',
// position: 'left'
// },
{
to: '/community',
label: 'Community',
position: 'left'
},
{
to: '/solutions',
label: 'Solutions',
position: 'left'
},
{
type: 'localeDropdown',
position: 'right',
Expand Down
1 change: 0 additions & 1 deletion src/pages/about.md

This file was deleted.

52 changes: 52 additions & 0 deletions src/pages/community.md
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
# NutsDB Community

## Contributors

<a href="https://github.com/nutsdb/nutsdb/graphs/contributors">
<img src="https://contrib.rocks/image?repo=nutsdb/nutsdb" />
</a>

## How to contribute

First off, thanks for taking the time to contribute!

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Contributing Documentation
- Contributing a Performance Improvement

By contributing to NutsDB, you agree to abide by the [code of conduct](https://github.com/xujiajun/nutsdb/blob/master/CODE_OF_CONDUCT.md).

### Getting Started
If you are looking to contribute to the NutsDB, the best place to start is the [GitHub "issues"](https://github.com/xujiajun/nutsdb/issues) tab. This is also a great place for filing bug reports and making suggestions for ways in which we can improve the code and documentation.

### Reporting bugs

See [reporting bugs](https://github.com/xujiajun/nutsdb/blob/master/.github/ISSUE_TEMPLATE/bug_report.md) for details about reporting any issues.

### Feature request

see [feature request](https://github.com/xujiajun/nutsdb/blob/master/.github/ISSUE_TEMPLATE/feature_request.md) for details about reporting any feature requests.

### Contribution flow

Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. Issue that pull request!

### Use a Consistent Coding Style

The coding style suggested by the Golang community is used in NutsDB. See the style [doc](https://github.com/golang/go/wiki/CodeReviewComments) for details.

Please follow this style to make NutsDB easy to review, maintain and develop.

### License
By contributing, you agree that your contributions will be licensed under its [Apache License 2.0](https://github.com/xujiajun/nutsdb/blob/master/LICENSE) License.
7 changes: 0 additions & 7 deletions src/pages/markdown-page.md

This file was deleted.

1 change: 0 additions & 1 deletion src/pages/solutions.md

This file was deleted.

0 comments on commit 7378434

Please sign in to comment.