From 1d00151299e01cbf47a80d4238ee134d577ef3a4 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 29 Mar 2022 10:55:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E4=BB=A3=E7=A0=81=E7=9B=B8?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..5fffb37a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing + +- [Setup](#setup) +- [Creating new themes](#creating-new-themes) +- [Adding localizations](#adding-localizations) + +Thanks for considering to contribute! + +## Setup + +To contribute to NotionNext, follow these steps: + +1. [Fork][fork] the repository to your GitHub account. +2. Clone the repository to your device (or use something like Codespaces). +3. Create a new branch in the repository. +4. Make your modifications. +5. Commit your modifications and push the branch. +6. [Create a PR][pr] from the branch in your fork to NotionNext' `main` branch. + +This project is built with [Next.js][next.js] and `yarn` as the package manager. +Here are some commands that you can use: + +- `yarn`: install dependencies +- `yarn dev`: compile and hot-reload for development +- `yarn build`: compile and minify for production +- `yarn start`: serve the compiled build in production mode + +## Creating new themes + +If you want to submit your custom theme to NotionNext, copy a new folder in +[`themes`][themes-dir] from [`example`][example]. The folder name will be the +theme's key. + +## Adding localizations + +If your language is not yet supported by NotionNext, please contribute a +localization! Follow these steps to add a new localization: + +1. Copy one of the [en-US.js][en-US.js] in [lang-dir][lang-dir] and rename the new + directory into your language's code ( e.g. `zh-CN.js`). +2. Start translating the strings. +3. Add your language config to [lang.js][lang.js]. +4. [Create a PR][pr] with your localization updates. + +[fork]: https://github.com/tangly1024/NotionNext/fork +[pr]: https://github.com/tangly1024/NotionNext/compare +[next.js]: https://github.com/vercel/next.js +[themes-dir]: themes +[example]: themes/example +[lang-dir]: lib/lang +[en-US.js]: lib/lang/en-US.js +[lang.js]: lib/lang.js