Skip to content

Commit ac5cc00

Browse files
committed
Added contributing guidelines, closes jquery#146
1 parent 84b93af commit ac5cc00

File tree

2 files changed

+62
-7
lines changed

2 files changed

+62
-7
lines changed

CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
## How Can I Help?
2+
3+
The entire site is managed via [this Git repository](https://github.com/jquery/learn.jquery.com). If you'd like to contribute new articles, make edits to existing content, or work on the site itself, the first thing you'll need is a [fork](https://help.github.com/articles/fork-a-repo). When you have changes you'd like to have reviewed for integration into the site, submit a [pull request](http://help.github.com/send-pull-requests/).
4+
5+
If you're unfamiliar with Git, you can still contribute by editing files directly via [GitHub's in-browser editor](https://github.com/blog/905-edit-like-an-ace). But you won't be able to create new content, and you'll still need a GitHub account and a fork of this repository. So we encourage you to [learn how to use Git and GitHub](http://help.github.com/); it'll probably pretty useful no matter what.
6+
7+
Here are some shortcuts to getting set up:
8+
9+
1. Fork the [repository](https://github.com/jquery/learn.jquery.com)
10+
2. Clone the repo `git clone git@github.com:*<your username>*/learn.jquery.com.git`
11+
3. Set up an upstream remote back to the jQuery repo 'git remote add upstream git@github.com:jquery/learn.jquery.com.git'
12+
4. Branch master into a feature branch `git branch *<feature/issue name/number>*`
13+
5. Move into that branch `git checkout *<feature/issue name/number>*`
14+
6. Work on your awesome contribution.
15+
7. Stage the files to the index in preparation for commit `git add .`
16+
8. Commit the files to your local repo `git commit -m "*add a relevant message describing the change*"`
17+
9. Push the files to your github repo `git push origin *<feature/issue name/number>*`
18+
10. Go to github.com and go to the forked repo and submit a new [pull request](https://help.github.com/articles/using-pull-requests).
19+
20+
## Where is the content?
21+
22+
The site files are organized in a way that you can find all the content in the site in the `page` folder.
23+
24+
## How to see changes you make?
25+
26+
The site files are built using grunt. After making a change open up your terminal and run grunt. Tip you can run grunt watch and grunt will watch the files for changes so you don't need to continually rerun grunt after each change.
27+
28+
## How do I add a new article?
29+
30+
* Add the file to the right folder in the page folder.
31+
* Add the slug name (the filename without the extension) to the right area in order.yml
32+
* Run grunt
33+
* You should now be able to navigate to the file.
34+
35+
## What is the syntax used?
36+
37+
We are using the Github flavored Markdown.
38+
39+
## Article Header Metadata
40+
41+
Each article should have the following header:
42+
43+
```
44+
---
45+
title: <article title>
46+
level: [beginner|intermediate|advance]
47+
source: <url of source of the material derived>
48+
---
49+
```
50+
51+
The `source` attibute is optional.
52+
53+
## How do I get credit for my contribution?
54+
55+
We will build the attribution of an article based on the git commit logs.

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ Each of the articles on the site has some [YAML "Front Matter"](https://github.c
3737

3838
`level: advanced`
3939

40-
## How Can I Help?
41-
42-
The entire site is managed via [this Git repository](https://github.com/jquery/learn.jquery.com). If you'd like to contribute new articles, make edits to existing content, or work on the site itself, the first thing you'll need is a [fork](http://help.github.com/fork-a-repo/). When you have changes you'd like to have reviewed for integration into the site, submit a [pull request](http://help.github.com/send-pull-requests/).
43-
44-
If you're unfamiliar with Git, you can still contribute by editing files directly via [GitHub's in-browser editor](https://github.com/blog/905-edit-like-an-ace). But you won't be able to create new content, and you'll still need a GitHub account and a fork of this repository. So we encourage you to [learn how to use Git and GitHub](http://help.github.com/); it'll probably pretty useful no matter what.
45-
4640
## Building && Working Locally
4741

4842
As this site is part of the jQuery network of sites, its presentation is controlled by our [web base template](https://github.com/jquery/web-base-template). To preview the site locally, first follow the [instructions there](https://github.com/jquery/web-base-template) to set up a local version of the jQuery WordPress network. Then, clone this repo and run the following steps (node.js required).
@@ -53,8 +47,14 @@ As this site is part of the jQuery network of sites, its presentation is control
5347
3. Edit config.json to use the username and password for your local WordPress network
5448
4. `grunt`
5549

50+
5651
*Windows note: Line endings need to be Unix-style (line-feed only). Make sure your text editor creates new files with Unix-style line endings. In addition, the following setting to your git config will keep the Unix-style line endings when pulling from the repository.*
5752

5853
```
5954
$ git config --global core.autocrlf true
60-
```
55+
```
56+
57+
## How Can I Help?
58+
59+
We encourage contributions from anyone. We've set up a [CONTRIBUTING.md](contributing.md) page to help with contributing.
60+

0 commit comments

Comments
 (0)