Skip to content

Commit 06f9c59

Browse files
committed
Merge pull request #152 from RedWolves/issue-146
Added a CONTRIBUTING.md
2 parents d8c7240 + 64fd0f3 commit 06f9c59

File tree

2 files changed

+70
-7
lines changed

2 files changed

+70
-7
lines changed

CONTRIBUTING.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
## Before you begin
2+
3+
You'll need to set up your development environment. Please follow the [README.md] for instructions on setting up WordPress, web-base-templates and the learn.jquery.com repo which contains the content.
4+
5+
## How Can I Help?
6+
7+
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/).
8+
9+
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.
10+
11+
Here are some shortcuts to getting set up:
12+
13+
1. Fork the [repository](https://github.com/jquery/learn.jquery.com)
14+
2. Clone the repo `git clone git@github.com:*<your username>*/learn.jquery.com.git`
15+
3. Set up an upstream remote back to the jQuery repo 'git remote add upstream git@github.com:jquery/learn.jquery.com.git'
16+
4. Branch master into a feature branch `git branch *<feature/issue name/number>*`
17+
5. Move into that branch `git checkout *<feature/issue name/number>*`
18+
6. Work on your awesome contribution.
19+
7. Stage the files to the index in preparation for commit `git add .`
20+
8. Commit the files to your local repo `git commit -m "*add a relevant message describing the change*"`
21+
9. Push the files to your github repo `git push origin *<feature/issue name/number>*`
22+
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).
23+
24+
## Where is the content?
25+
26+
The site files are organized in a way that you can find all the content in the site in the `page` folder.
27+
28+
## How to see changes you make?
29+
30+
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.
31+
32+
## How do I add a new article?
33+
34+
* Add the file to the right folder in the page folder.
35+
* Add the slug name (the filename without the extension) to the right area in order.yml
36+
* Run grunt
37+
* You should now be able to navigate to the file.
38+
39+
## What is the syntax used?
40+
41+
We are using the Github flavored Markdown.
42+
43+
## Article Header Metadata
44+
45+
Each article should have the following header (see below as some metatags are optional):
46+
47+
```
48+
---
49+
title: <article title>
50+
level: [beginner|intermediate|advance]
51+
source: <url of source of the material derived>
52+
attribution:
53+
- Ralph Whitbeck <ralph@email.com>
54+
- John Paul<john@email.com>
55+
---
56+
```
57+
58+
The `source` attibute is optional.
59+
If the article was pulled in from an outside source you also need to add an attribution tag to give credit to the original authors.
60+
61+
## How do I get credit for my contribution?
62+
63+
We will build the attribution of an article based on the git commit logs. Only use the attribution meta tag to give credit to authors outside of git for an article that was pulled in for instance.

README.md

Lines changed: 7 additions & 7 deletions
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)