We use JSCS and ESLint to maintain the code style. You can install linter plugins on your editor or check the status with the following commands:
$ npm run jscs
$ npm run eslint
# You can append `--fix` option to these commands to fix the code style automatically
$ npm run jscs -- --fix
$ npm run eslint -- --fix
-
Fork hexojs/hexo.
-
Clone the repository to your computer and install dependencies.
$ git clone https://github.com/<username>/hexo.git $ cd hexo $ npm install
-
Create a feature branch.
$ git checkout -b new_feature
-
Start hacking.
-
Push the branch.
$ git push origin new_feature
-
Create a pull request and describe the change.
Before you submitting the pull request. Please make sure your code is coveraged and passes the tests. Otherwise your pull request won't be merged.
$ npm test
The Hexo documentation is open source and you can find the source code on [hexojs/site].
-
Fork hexojs/site.
-
Clone the repository to your computer and install dependencies.
$ git clone https://github.com/<username>/site.git $ cd site $ npm install
-
Start editing the documentation. You can start the server for live previewing.
$ hexo server
-
Push the branch.
-
Create a pull request and describe the change.
- Add a new language folder in
source
folder. (all in lower case) - Copy Markdown and template files in
source
folder to the new language folder. - Add the new language to
source/_data/language.yml
. - Copy
en.yml
inthemes/navy/languages
and rename to the language name (all in lower case).
When you encounter some problems when using Hexo, you can find the solutions in Troubleshooting or ask me on GitHub or Google Group. If you can't find the answer, please report it on GitHub.
- Represent the problem in debug mode.
- Run
hexo version
and check the version info. - Post both debug message and version info on GitHub.