Skip to content

Commit c51784d

Browse files
committed
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 jquery#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
2 parents 5567cb6 + be21e32 commit c51784d

File tree

272 files changed

+5615
-40746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+5615
-40746
lines changed

CONTRIBUTING.md

+166-41
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,188 @@
1-
## Before you begin
1+
---
2+
title: Contributing
3+
customFields:
4+
-
5+
key: "is_chapter"
6+
value: 0
7+
---
8+
9+
Depending on your level of experience with some of the workflows common to many
10+
open source projects, e.g., git/Github, the command line, and setting up a
11+
local development environment, contributing to this site may be a breeze or
12+
come with a bit of a learning curve. If you fit into the former group, great!
13+
Jump ahead to learn how to get started.
14+
15+
But if you think you're part of the second group, and have had trouble
16+
participating in open source because of a lack of comfort with the tools,
17+
**you're still welcome**!. Beyond providing a resource for learning jQuery, a
18+
major goal of this site is to provide an encouraging environment for you to
19+
develop these skills, while still making a contribution that matters. Many
20+
people think that the only way to get involved with a programming project like
21+
jQuery is to solve intricate bugs that require a nuanced understanding of the
22+
codebase, or to propose enhancements that may or may not be in scope with the
23+
development team's plans. The fact is that there's way more: improving
24+
documentation, working on web properties, and supporting other users are
25+
crucial aspects where more help is always needed. If you're willing to share
26+
your time and expertise to help other developers, we're willing to [help you
27+
get up to speed with the tools](#getting-help) you'll need.
28+
29+
30+
## Why Contribute?
31+
32+
If you've ever looked for help with jQuery -- or with web development in
33+
general -- you know the hunt can sometimes be challenging. It's can be a
34+
process of wading through a number of different posts until you find that
35+
article that's the right combination of trustworthy, timely, and helpful for
36+
your particular problem. And if you're one of those authors -- thanks! -- then
37+
you are probably familiar with the frustrating feeling of putting a useful tip
38+
out there, and then wondering if it's actually making its way to the people who
39+
need it, and what to do with that old post years and versions down the road.
40+
You're invited to share that energy to help us bring that ecosystem together
41+
and grow it further!
42+
43+
44+
If you've ever helped anyone, colleague or stranger, with a particular problem,
45+
then you know the value of having a reference you can quickly link to that says
46+
"here's how you do it." This site is intended to be that compendium, but
47+
there's always more to refine and add, and we need your help too!
48+
49+
## How Does It Work?
50+
51+
### Content
52+
53+
The content in this site is maintained in
54+
[this GitHub repository](http://github.com/jquery/learn.jquery.com) as a collection of
55+
[Markdown](http://daringfireball.net/projects/markdown/) files in the `page`
56+
directory. The order in which chapters and articles are presented is controlled
57+
by the [order.yml](https://github.com/jquery/learn.jquery.com/blob/master/order.yml)
58+
file.
59+
60+
### Design
61+
62+
The site's layout and design is controlled by our
63+
[`web-base-template`](http://github.com/jquery/web-base-template), a custom
64+
[WordPress](http://wordpress.org) configuration that runs (or will run in the
65+
near future) all of the sites run by the jQuery Foundation. The [master
66+
theme](https://github.com/jquery/web-base-template/tree/master/themes/jquery)
67+
controls most of the layout for all of our sites, and there is a [child
68+
theme](https://github.com/jquery/web-base-template/tree/master/themes/learn.jquery.com)
69+
that controls the templates and styles specific to the learn site.
70+
71+
[`web-base-template`](http://github.com/jquery/web-base-template) powers our sites in
72+
production and staging environments, and can set up for local development relatively easily.
73+
74+
### Build
75+
76+
The static content in the `page` directory is deployed to a
77+
[`web-base-template`](http://github.com/jquery/web-base-template) instance
78+
using [grunt](http://gruntjs.com), specifically with two grunt plugins we've created:
79+
80+
* [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
81+
* [grunt-wordpress](http://github.com/scottgonzalez/grunt-wordpress) - syncs static content to WordPress using [XML-RPC](http://codex.wordpress.org/XML-RPC_Support)
282

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.
483

584
## How Can I Help?
685

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/).
86+
The simplest and least complicated way to help is to [file
87+
issues](http://github.com/jquery/learn.jquery.com/issues) if you notice
88+
mistakes that should be fixed, improvements that can be made, or if you have
89+
ideas for new articles. We'll use the issues to continue discussion and track
90+
progress on anything you point out.
91+
92+
If you'd like to go a step further and contribute new articles, make edits to
93+
existing ones, or work on the site itself, the first thing you'll need is a
94+
[fork](https://help.github.com/articles/fork-a-repo). When you have changes
95+
you'd like to have reviewed for integration into the site, submit a [pull
96+
request](http://help.github.com/send-pull-requests/).
97+
98+
*(If you're unfamiliar with Git, you can still contribute by editing files
99+
directly via [GitHub's in-browser
100+
editor](https://github.com/blog/905-edit-like-an-ace). But you won't be able to
101+
create new content, and you'll still need a GitHub account and a fork of this
102+
repository. So we encourage you to [learn how to use Git and
103+
GitHub](http://help.github.com/) as soon as you can.)*
104+
105+
## Local Development
106+
107+
In order to preview your changes locally, work on design/layout issues, or work on
108+
other jQuery sites' content, and generally contribute most effectively, we
109+
recommend that you set up a local development environment. You'll need
110+
111+
* [git](http://git-scm.com)
112+
* [GitHub](http://github.com) account
113+
* Local PHP/MySQL environment, e.g., [MAMP](http://www.mamp.info/en/index.html), [XAMPP](http://www.apachefriends.org/en/xampp.html)
114+
* [node.js](http://nodejs.org)
115+
116+
### Initial Deploy
8117

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.
118+
Once you've got these major pieces in place, you'll want to get WordPress and
119+
`web-base-template` running locally by following [these
120+
instructions](https://github.com/jquery/web-base-template/blob/master/README.md).
10121

11-
Here are some shortcuts to getting set up:
122+
If you're get everything working right, you should be able navigate to
123+
[local.learn.jquery.com](http://local.learn.jquery.com) in a browser, you
124+
should see a site that looks exactly like the [live
125+
site](http://learn.jquery.com), only without any actual articles. That's where
126+
your the `learn.jquery.com` content repo comes into play.
12127

13128
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).
129+
2. Clone the repo -- `git clone git@github.com:<your username>/learn.jquery.com.git`
130+
3. Enter the directory where you cloned the repo -- `cd learn.jquery.com`
131+
4. Set up an upstream remote back to the jQuery repo -- 'git remote add upstream git@github.com:jquery/learn.jquery.com.git'
132+
5. Install grunt (if you haven't already) -- `npm install -g grunt`
133+
6. Install local build dependencies -- `npm install`
134+
7. Copy the `config-sample.json` file to `config.json`
135+
8. Edit `config.json` to use the username and password for your local WordPress network
136+
9. Build and deploy the files to your local WordPress -- `grunt`
23137

24-
## Where is the content?
138+
* **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.*
25139

26-
The site files are organized in a way that you can find all the content in the site in the `page` folder.
140+
```
141+
$ git config --global core.autocrlf true
142+
```
27143

28-
## How to see changes you make?
144+
At this point, if you refresh your `local.learn.jquery.com`, your local
145+
instance should be populated with all of the site content. If it isn't,
146+
or you're having trouble with any of these steps, please come and
147+
[seek out some assistance](#getting-help).
29148

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.
149+
### Working With Content
31150

32-
## How do I add a new article?
151+
Once you've gotten your environment working, here are the general steps you should follow to make your changes:
33152

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.
153+
1. Create a new "feature" branch based on `master` -- `git branch <feature/issue name/number>`
154+
2. Move onto that branch -- `git checkout <feature/issue name/number>`
155+
3. Work on your awesome contribution.
156+
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.
157+
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`
158+
6. Commit the files to your local repo -- `git commit -m "add a relevant message describing the change"`
159+
7. Push the files to your GitHub remote -- `git push origin <feature/issue name/number>`
160+
8. Go to your fork on GitHub and submit a new [pull request](https://help.github.com/articles/using-pull-requests).
38161

39-
## What is the syntax used?
162+
### Adding A New Article
40163

41-
We are using the Github flavored Markdown.
164+
1. Add the file to the right folder in the page folder.
165+
2. Add the slug name (the filename without the extension) to the desired location `order.yml`
166+
3. Run `grunt`
167+
4. You should now be able to navigate to the file.
42168

43-
## Article Header Metadata
169+
### Formatting Articles
44170

45-
Each article should have the following header (see below as some metatags are optional):
171+
Yes! Take a look at our [style guide](http://learn.jquery.com/style-guide) for
172+
more information on authoring and formatting conventions.
46173

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-
```
174+
## How Will My Contribution Be Acknowledged?
175+
176+
We will build the attribution of an article based on the git commit logs and present this information in the site.
177+
178+
## <a name="getting-help">Getting Help</a>
179+
180+
If you're struggling to get any part of the site working properly, or have any questions, we're here to help.
57181

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.
182+
The best place to get help is on [IRC](http://en.wikipedia.org/wiki/Internet_Relay_Chat), in the #jquery-content
183+
channel on [Freenode](http://freenode.net). If you're unfamiliar with IRC, you can use the [webchat gateway](http://webchat.freenode.net/).
60184

61-
## How do I get credit for my contribution?
185+
In addition, the jQuery Content Team holds a [public, weekly
186+
meetings](http://jquery.org/meeting) on Freenode, at 1PM Eastern time in the #jquery-meeting channel.
62187

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.
188+
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`.

README.md

+23-10
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,21 @@
88
The goal of this site is twofold:
99

1010
1. To serve as a central, trustworthy, narrative compendium of information about how to use jQuery and JavaScript.
11-
2. To remain a timely, vibrant, and community-driven reference with a low barrier to contribution.
11+
2. To remain a timely, vibrant, and community-driven reference with a relatively low barrier to contribution.
1212

13-
Much of the initial content - and spirit - comes from [jQuery Fundamentals](https://github.com/rmurphey/jqfundamentals), an open-source book about jQuery, originally written by [Rebecca Murphey](http://www.rmurphey.com/) and released in 2010. In 2011, Rebecca [bequeathed the book](http://rmurphey.com/blog/2011/03/17/the-future-of-jquery-fundamentals-and-a-confession/) unto the jQuery Project to serve as the foundation for this site.
13+
Much of the initial content - and spirit - comes from [jQuery Fundamentals](https://github.com/rmurphey/jqfundamentals), an open-source book about jQuery, originally written by [Rebecca Murphey](http://www.rmurphey.com/) and released in 2010. In 2011, Rebecca [bequeathed the book](http://rmurphey.com/blog/2011/03/17/the-future-of-jquery-fundamentals-and-a-confession/) unto the jQuery Foundation to serve as the basis for this site.
1414

1515

1616
## How This Site Works
1717

18-
This site's core content consists of [Markdown](http://daringfireball.net/projects/markdown/) files. We use [nanoc](http://nanoc.stoneship.org/), a Ruby-based [static site generator](http://www.mickgardner.com/2011/04/27/An-Introduction-To-Static-Site-Generators.html), to process these files for previewing. For production on [learn.jquery.com](http://learn.jquery.com), a node.js script post-processes the nanoc results and puts them into the learning section of the jQuery Wordpress network.
19-
20-
The template that controls the site's appearance is a [child theme](https://github.com/jquery/web-base-template/tree/master/themes/learn-jquery-com) of the jQuery [web base template](https://github.com/jquery/web-base-template), and any issues with the presentation should be directed to [that repository](https://github.com/jquery/web-base-template).
18+
This site's core content consists of [Markdown](http://daringfireball.net/projects/markdown/) files. The template that controls the site's appearance is a [child theme](https://github.com/jquery/web-base-template/tree/master/themes/learn-jquery-com) of the jQuery [web base template](https://github.com/jquery/web-base-template), and any issues with the presentation should be directed to [that repository](https://github.com/jquery/web-base-template).
2119

2220
### Site Organization
2321

24-
All of the content lives inside of the subdirectories of the `content` directory. Each of these subdirectories is considered a **category**, and contains one or more **articles**. Each category also contains a `dex.md` file that contains the category's human-readable title and an overview, which will appear on the category's landing page.
22+
All of the content lives inside of the subdirectories of the `page` directory. Each of these subdirectories is considered a **chapter**, and contains one or more **articles**, and there is also a top level file that corresponds to each chapter, which contains the chapter's human-readable title and an overview, which will appear on the chapter's landing page.
23+
24+
The [`order.yml`](https://github.com/jquery/learn.jquery.com/blob/master/order.yml) file controls the order that chapters and articles appear in the site.
2525

26-
An [`order.yml`](https://github.com/jquery/learn.jquery.com/blob/master/order.yml) file controls the order that categories and articles appear in the site. Categories or articles that do not appear in this file will not be published in the production site.
2726

2827
### YAML Conventions
2928

@@ -47,7 +46,6 @@ As this site is part of the jQuery network of sites, its presentation is control
4746
3. Edit config.json to use the username and password for your local WordPress network
4847
4. `grunt`
4948

50-
5149
*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.*
5250

5351
```
@@ -56,5 +54,20 @@ $ git config --global core.autocrlf true
5654

5755
## How Can I Help?
5856

59-
We encourage contributions from anyone. We've set up a [CONTRIBUTING.md](contributing.md) page to help with contributing.
60-
57+
We encourage contribution from anyone. For more comprehensive documentation on how to get involved, please read our [contributing guide](http://learn.jquery.com/contributing).
58+
59+
# Copyright & Licensing
60+
61+
This material is Copyright &copy;2011 The jQuery Foundation and licensed under
62+
the [Creative Commons Attribution-Share Alike 3.0 United States
63+
license](http://creativecommons.org/licenses/by-sa/3.0/us/). You are free to
64+
copy, distribute, transmit, and remix this work, provided you attribute the
65+
work to The jQuery Foundation as the original author and reference [this
66+
repository](http://github.com/jquery/learn.jquery.com). If you alter,
67+
transform, or build upon this work, you may distribute the resulting work only
68+
under the same, similar or a compatible license. Any of the above conditions
69+
can be waived if you get permission from the copyright holder. For any reuse or
70+
distribution, you must make clear to others the license terms of this work. The
71+
best way to do this is with a link to the [Creative Commons Attribution-Share
72+
Alike 3.0 United States
73+
license](http://creativecommons.org/licenses/by-sa/3.0/us/).

code/exercises/ajax.html

-22
This file was deleted.

0 commit comments

Comments
 (0)