Skip to content

Commit 1d00151

Browse files
committed
贡献代码相关
1 parent 56ffca1 commit 1d00151

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

CONTRIBUTING.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing
2+
3+
- [Setup](#setup)
4+
- [Creating new themes](#creating-new-themes)
5+
- [Adding localizations](#adding-localizations)
6+
7+
Thanks for considering to contribute!
8+
9+
## Setup
10+
11+
To contribute to NotionNext, follow these steps:
12+
13+
1. [Fork][fork] the repository to your GitHub account.
14+
2. Clone the repository to your device (or use something like Codespaces).
15+
3. Create a new branch in the repository.
16+
4. Make your modifications.
17+
5. Commit your modifications and push the branch.
18+
6. [Create a PR][pr] from the branch in your fork to NotionNext' `main` branch.
19+
20+
This project is built with [Next.js][next.js] and `yarn` as the package manager.
21+
Here are some commands that you can use:
22+
23+
- `yarn`: install dependencies
24+
- `yarn dev`: compile and hot-reload for development
25+
- `yarn build`: compile and minify for production
26+
- `yarn start`: serve the compiled build in production mode
27+
28+
## Creating new themes
29+
30+
If you want to submit your custom theme to NotionNext, copy a new folder in
31+
[`themes`][themes-dir] from [`example`][example]. The folder name will be the
32+
theme's key.
33+
34+
## Adding localizations
35+
36+
If your language is not yet supported by NotionNext, please contribute a
37+
localization! Follow these steps to add a new localization:
38+
39+
1. Copy one of the [en-US.js][en-US.js] in [lang-dir][lang-dir] and rename the new
40+
directory into your language's code ( e.g. `zh-CN.js`).
41+
2. Start translating the strings.
42+
3. Add your language config to [lang.js][lang.js].
43+
4. [Create a PR][pr] with your localization updates.
44+
45+
[fork]: https://github.com/tangly1024/NotionNext/fork
46+
[pr]: https://github.com/tangly1024/NotionNext/compare
47+
[next.js]: https://github.com/vercel/next.js
48+
[themes-dir]: themes
49+
[example]: themes/example
50+
[lang-dir]: lib/lang
51+
[en-US.js]: lib/lang/en-US.js
52+
[lang.js]: lib/lang.js

0 commit comments

Comments
 (0)