-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This updates the other libs content to the latest master
- includes minor editing Merge remote-tracking branch 'upstream/master' into 68-other-libs-new-PR * upstream/master: (96 commits) added alt text to pictures and themeroller logo minor correction to the themeroller text added a tutorial on how to use themeroller to create a jQuery Mobile custom theme Fixing syntax highlighting add deferreds content Revert "Changed /page/ to /pages/ for consistency with other content repos" Changed /page/ to /pages/ for consistency with other content repos Update CONTRIBUTING.md Update page/using-jquery-core/manipulating-elements.md Fixed 'MDN JavaScript Reference' link. Upgrade to grunt-jquery-content 0.7.0 and grunt-wordpress 1.0.5. Proper attribution for @scottgonzalez on jQuery UI Widget Factory article originally from his blog post Use _.uniq to get unique contributors array from git history instead of manually forEach'ing. Properly credit @jorydotcom for her work in creating the style guide before it was split into its own file Actually include the legacy contributor in the contributors list Initial implementation of parsing git file history and pushing git contributor/legacy attribution list into WordPress Upgrade to grunt-jquery-content 0.6.2. Fix attribution on Understanding Index article Remove unused exercise files - fixes #137 Remove "adding keyboard navigation" and "enabling the back button" articles for now ... Conflicts: order.yml page/using-jquery-core/avoid-conflicts-other-libraries.md
- Loading branch information
Showing
272 changed files
with
5,615 additions
and
40,746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,63 +1,188 @@ | |||
## Before you begin | --- | ||
title: Contributing | |||
customFields: | |||
- | |||
key: "is_chapter" | |||
value: 0 | |||
--- | |||
|
|||
Depending on your level of experience with some of the workflows common to many | |||
open source projects, e.g., git/Github, the command line, and setting up a | |||
local development environment, contributing to this site may be a breeze or | |||
come with a bit of a learning curve. If you fit into the former group, great! | |||
Jump ahead to learn how to get started. | |||
|
|||
But if you think you're part of the second group, and have had trouble | |||
participating in open source because of a lack of comfort with the tools, | |||
**you're still welcome**!. Beyond providing a resource for learning jQuery, a | |||
major goal of this site is to provide an encouraging environment for you to | |||
develop these skills, while still making a contribution that matters. Many | |||
people think that the only way to get involved with a programming project like | |||
jQuery is to solve intricate bugs that require a nuanced understanding of the | |||
codebase, or to propose enhancements that may or may not be in scope with the | |||
development team's plans. The fact is that there's way more: improving | |||
documentation, working on web properties, and supporting other users are | |||
crucial aspects where more help is always needed. If you're willing to share | |||
your time and expertise to help other developers, we're willing to [help you | |||
get up to speed with the tools](#getting-help) you'll need. | |||
|
|||
|
|||
## Why Contribute? | |||
|
|||
If you've ever looked for help with jQuery -- or with web development in | |||
general -- you know the hunt can sometimes be challenging. It's can be a | |||
process of wading through a number of different posts until you find that | |||
article that's the right combination of trustworthy, timely, and helpful for | |||
your particular problem. And if you're one of those authors -- thanks! -- then | |||
you are probably familiar with the frustrating feeling of putting a useful tip | |||
out there, and then wondering if it's actually making its way to the people who | |||
need it, and what to do with that old post years and versions down the road. | |||
You're invited to share that energy to help us bring that ecosystem together | |||
and grow it further! | |||
|
|||
|
|||
If you've ever helped anyone, colleague or stranger, with a particular problem, | |||
then you know the value of having a reference you can quickly link to that says | |||
"here's how you do it." This site is intended to be that compendium, but | |||
there's always more to refine and add, and we need your help too! | |||
|
|||
## How Does It Work? | |||
|
|||
### Content | |||
|
|||
The content in this site is maintained in | |||
[this GitHub repository](http://github.com/jquery/learn.jquery.com) as a collection of | |||
[Markdown](http://daringfireball.net/projects/markdown/) files in the `page` | |||
directory. The order in which chapters and articles are presented is controlled | |||
by the [order.yml](https://github.com/jquery/learn.jquery.com/blob/master/order.yml) | |||
file. | |||
|
|||
### Design | |||
|
|||
The site's layout and design is controlled by our | |||
[`web-base-template`](http://github.com/jquery/web-base-template), a custom | |||
[WordPress](http://wordpress.org) configuration that runs (or will run in the | |||
near future) all of the sites run by the jQuery Foundation. The [master | |||
theme](https://github.com/jquery/web-base-template/tree/master/themes/jquery) | |||
controls most of the layout for all of our sites, and there is a [child | |||
theme](https://github.com/jquery/web-base-template/tree/master/themes/learn.jquery.com) | |||
that controls the templates and styles specific to the learn site. | |||
|
|||
[`web-base-template`](http://github.com/jquery/web-base-template) powers our sites in | |||
production and staging environments, and can set up for local development relatively easily. | |||
|
|||
### Build | |||
|
|||
The static content in the `page` directory is deployed to a | |||
[`web-base-template`](http://github.com/jquery/web-base-template) instance | |||
using [grunt](http://gruntjs.com), specifically with two grunt plugins we've created: | |||
|
|||
* [grunt-jquery-content](http://github.com/jquery/grunt-jquery-content) - pre-processes content in a variety of formats (HTML, Markdown, XML) into HTML, applying syntax highlighting and some simple partial support, preparing it for processing by | |||
* [grunt-wordpress](http://github.com/scottgonzalez/grunt-wordpress) - syncs static content to WordPress using [XML-RPC](http://codex.wordpress.org/XML-RPC_Support) | |||
|
|
||
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. | |||
|
|
||
## How Can I Help? | ## How Can I Help? | ||
|
|
||
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/). | The simplest and least complicated way to help is to [file | ||
issues](http://github.com/jquery/learn.jquery.com/issues) if you notice | |||
mistakes that should be fixed, improvements that can be made, or if you have | |||
ideas for new articles. We'll use the issues to continue discussion and track | |||
progress on anything you point out. | |||
|
|||
If you'd like to go a step further and contribute new articles, make edits to | |||
existing ones, 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/). | |||
|
|||
*(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/) as soon as you can.)* | |||
|
|||
## Local Development | |||
|
|||
In order to preview your changes locally, work on design/layout issues, or work on | |||
other jQuery sites' content, and generally contribute most effectively, we | |||
recommend that you set up a local development environment. You'll need | |||
|
|||
* [git](http://git-scm.com) | |||
* [GitHub](http://github.com) account | |||
* Local PHP/MySQL environment, e.g., [MAMP](http://www.mamp.info/en/index.html), [XAMPP](http://www.apachefriends.org/en/xampp.html) | |||
* [node.js](http://nodejs.org) | |||
|
|||
### Initial Deploy | |||
|
|
||
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. | Once you've got these major pieces in place, you'll want to get WordPress and | ||
`web-base-template` running locally by following [these | |||
instructions](https://github.com/jquery/web-base-template/blob/master/README.md). | |||
|
|
||
Here are some shortcuts to getting set up: | If you're get everything working right, you should be able navigate to | ||
[local.learn.jquery.com](http://local.learn.jquery.com) in a browser, you | |||
should see a site that looks exactly like the [live | |||
site](http://learn.jquery.com), only without any actual articles. That's where | |||
your the `learn.jquery.com` content repo comes into play. | |||
|
|
||
1. Fork the [repository](https://github.com/jquery/learn.jquery.com) | 1. Fork the [repository](https://github.com/jquery/learn.jquery.com) | ||
2. Clone the repo `git clone git@github.com:*<your username>*/learn.jquery.com.git` | 2. Clone the repo -- `git clone git@github.com:<your username>/learn.jquery.com.git` | ||
3. Set up an upstream remote back to the jQuery repo 'git remote add upstream git@github.com:jquery/learn.jquery.com.git' | 3. Enter the directory where you cloned the repo -- `cd learn.jquery.com` | ||
4. Branch master into a feature branch `git branch *<feature/issue name/number>*` | 4. Set up an upstream remote back to the jQuery repo -- 'git remote add upstream git@github.com:jquery/learn.jquery.com.git' | ||
5. Move into that branch `git checkout *<feature/issue name/number>*` | 5. Install grunt (if you haven't already) -- `npm install -g grunt` | ||
6. Work on your awesome contribution. | 6. Install local build dependencies -- `npm install` | ||
7. Stage the files to the index in preparation for commit `git add .` | 7. Copy the `config-sample.json` file to `config.json` | ||
8. Commit the files to your local repo `git commit -m "*add a relevant message describing the change*"` | 8. Edit `config.json` to use the username and password for your local WordPress network | ||
9. Push the files to your github repo `git push origin *<feature/issue name/number>*` | 9. Build and deploy the files to your local WordPress -- `grunt` | ||
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). | |||
|
|
||
## Where is the content? | * **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.* | ||
|
|
||
The site files are organized in a way that you can find all the content in the site in the `page` folder. | ``` | ||
$ git config --global core.autocrlf true | |||
``` | |||
|
|
||
## How to see changes you make? | At this point, if you refresh your `local.learn.jquery.com`, your local | ||
instance should be populated with all of the site content. If it isn't, | |||
or you're having trouble with any of these steps, please come and | |||
[seek out some assistance](#getting-help). | |||
|
|
||
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. | ### Working With Content | ||
|
|
||
## How do I add a new article? | Once you've gotten your environment working, here are the general steps you should follow to make your changes: | ||
|
|
||
* Add the file to the right folder in the page folder. | 1. Create a new "feature" branch based on `master` -- `git branch <feature/issue name/number>` | ||
* Add the slug name (the filename without the extension) to the right area in order.yml | 2. Move onto that branch -- `git checkout <feature/issue name/number>` | ||
* Run grunt | 3. Work on your awesome contribution. | ||
* You should now be able to navigate to the file. | 4. As you work and want to preview your changes, use `grunt` to deploy them to the your site. You can also use `grunt watch` to have the site monitor the `page` directory for any changes and automatically have the changes deployed every time you save. | ||
5. When you're done, stage the new/modified preparation for commit -- `git add page/faq/how-do-i-add-a-new-article-to-the-learn-site.md` | |||
6. Commit the files to your local repo -- `git commit -m "add a relevant message describing the change"` | |||
7. Push the files to your GitHub remote -- `git push origin <feature/issue name/number>` | |||
8. Go to your fork on GitHub and submit a new [pull request](https://help.github.com/articles/using-pull-requests). | |||
|
|
||
## What is the syntax used? | ### Adding A New Article | ||
|
|
||
We are using the Github flavored Markdown. | 1. Add the file to the right folder in the page folder. | ||
2. Add the slug name (the filename without the extension) to the desired location `order.yml` | |||
3. Run `grunt` | |||
4. You should now be able to navigate to the file. | |||
|
|
||
## Article Header Metadata | ### Formatting Articles | ||
|
|
||
Each article should have the following header (see below as some metatags are optional): | Yes! Take a look at our [style guide](http://learn.jquery.com/style-guide) for | ||
more information on authoring and formatting conventions. | |||
|
|
||
``` | ## How Will My Contribution Be Acknowledged? | ||
--- |
|
||
title: <article title> | We will build the attribution of an article based on the git commit logs and present this information in the site. | ||
level: [beginner|intermediate|advance] |
|
||
source: <url of source of the material derived> | ## <a name="getting-help">Getting Help</a> | ||
attribution: |
|
||
- Ralph Whitbeck <ralph@email.com> | If you're struggling to get any part of the site working properly, or have any questions, we're here to help. | ||
- John Paul<john@email.com> | |||
--- | |||
``` | |||
|
|
||
The `source` attibute is optional. | The best place to get help is on [IRC](http://en.wikipedia.org/wiki/Internet_Relay_Chat), in the #jquery-content | ||
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. | channel on [Freenode](http://freenode.net). If you're unfamiliar with IRC, you can use the [webchat gateway](http://webchat.freenode.net/). | ||
|
|
||
## How do I get credit for my contribution? | In addition, the jQuery Content Team holds a [public, weekly | ||
meetings](http://jquery.org/meeting) on Freenode, at 1PM Eastern time in the #jquery-meeting channel. | |||
|
|
||
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. | If IRC is not your thing, but you still want or need to get in touch, please use the site's GitHub repo or send us an e-mail to `content at jquery dot org`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.