Contribute
This guide is a comprehensive resource for contribute to weshare - for both new and experienced contributors. If you got any good ideas, I welcome your contributions to weshare.
Quick Reference
Here are the basic steps needed to get set up and contribute a patch. This is meant as a checklist, once you know the basics. For complete instructions please see the about page.
Install and set up
git
and other dependencies (see the about page for detailed information).Fork the weshare repository to your GitHub account and get the source code using.
1
2$ git clone https://github.com/<your_username>/weshare
$ cd weshareInstall project node denpendencies:
1
$ npm install
Run:
1
$ npm run start
Browser the website
http://localhost:4000/weshare
to check the blog.
Create Your Post
I recommend to use markdown to write the post, and all the site’s posts are using markdown. Next, I will show you how to create your post. Let’s dive into the details.
Use
hexo
command to create post:1
$ hexo new <your_post_title_name>
After the command executed sucessfully, you can see
.md and the same name folder under the path `/source/_posts/‘. Edit your post content in the markdown file, .md, and once image or other file needed, put them under the same name folder as the post. Create commit and push it.
1
2$ git add . && git commit -m 'Add a new post, <your_post_title_name>'
$ git push -u origin master # make sure that the current branch is the lastest.Create pull request to the origin repository. This is a basic usage of GitHub, I will not show the details.
I wish you do sync step to make your repository is the latest to the origin repository.
Good Luck!