Skip to content

Commit c636c55

Browse files
arthurvrscottgonzalez
authored andcommitted
Attributions: Replace contributor list by link in /about
Fixes jquerygh-602 Closes jquerygh-603
1 parent 6ba9e1c commit c636c55

File tree

4 files changed

+6
-85
lines changed

4 files changed

+6
-85
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ For more advice on managing your fork and submitting pull requests to the jQuery
8383

8484
Yes! Take a look at our [style guide](http://learn.jquery.com/style-guide) for more information on authoring and formatting conventions.
8585

86-
## How Will My Contribution Be Acknowledged?
87-
88-
We will build the attribution of an article based on the git commit logs and present this information on the site.
89-
9086
<h2 id="getting-help">Getting Help</h2>
9187

9288
If you're struggling to get any part of the site working properly, or have any questions, we're here to help.

Gruntfile.js

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -40,85 +40,6 @@ function getOrderMap() {
4040
return map;
4141
}
4242

43-
function contributorAttribution( post, fileName, callback ) {
44-
var contribs,
45-
parseRE = /^(.*)<(.*)>$/;
46-
47-
// Read contributors from git file information
48-
spawnback( "git", [
49-
"log",
50-
"--follow", // Trace history through file rename operations
51-
"--diff-filter=AM", // Only consider "Add" and "Modify" operations
52-
"--format=%aN <%aE>",
53-
fileName
54-
], function( error, result ) {
55-
if ( error ) {
56-
return callback( error );
57-
}
58-
59-
contribs = result.trimRight().split( /\r?\n/g )
60-
61-
// Reduce to a unique list of contributors
62-
.filter(function( value, index, array ) {
63-
64-
// Check for a value in case this is a new file and there is no git log
65-
return value && array.indexOf( value ) === index;
66-
})
67-
68-
// Convert to structured objects
69-
.map(function( contributor ) {
70-
var matches = parseRE.exec( contributor );
71-
return {
72-
name: matches[ 1 ].trim(),
73-
email: matches[ 2 ]
74-
};
75-
})
76-
77-
// Alphabetize by 'last name' (relatively crude)
78-
.sort(function( a, b ) {
79-
return a.name.split( " " ).pop().toLowerCase() <
80-
b.name.split( " " ).pop().toLowerCase() ?
81-
-1 : 1;
82-
});
83-
84-
// Handle "legacy" content - content authored outside of the learn site
85-
// and attributed with metadata in the file,
86-
// push those contributors to the front of the list
87-
if ( post.attribution ) {
88-
post.attribution.forEach(function( contributor ) {
89-
var contrib, matches;
90-
91-
if ( contributor === "jQuery Fundamentals" ) {
92-
contrib = {
93-
name: "jQuery Fundamentals",
94-
email: "github@jquery.com"
95-
};
96-
} else {
97-
matches = parseRE.exec( contributor );
98-
contrib = {
99-
name: matches[ 1 ].trim(),
100-
email: matches[ 2 ]
101-
};
102-
}
103-
104-
if ( post.source ) {
105-
contrib.source = post.source;
106-
}
107-
108-
contribs.unshift( contrib );
109-
});
110-
}
111-
112-
post.customFields = post.customFields || [];
113-
post.customFields.push({
114-
key: "contributors",
115-
value: JSON.stringify( contribs )
116-
});
117-
118-
callback( null, post );
119-
});
120-
}
121-
12243
jqueryContent.postPreprocessors.page = (function() {
12344
var orderMap = getOrderMap();
12445

@@ -130,7 +51,7 @@ jqueryContent.postPreprocessors.page = (function() {
13051
post.menuOrder = menuOrder;
13152
}
13253

133-
contributorAttribution( post, postPath, callback );
54+
callback( null, post );
13455
};
13556
})();
13657

page/about.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ The first is Rebecca Murphey's [jQuery Fundamentals](http://jqfundamentals.com/l
2828

2929
The second is [docs.jquery.com](http://docs.jquery.com), that erstwhile chestnut still living out its final days before it will be shut down in early 2013. Since we've moved the API documentation for jQuery Core off that domain, we needed a place that could serve a similar need – documentation (that anyone can contribute to) that gets into the "how-to" and FAQs – without clumsy barriers to entry like finding the right person to set you up with a special wiki account and forcing all authoring into a `<textarea>`.
3030

31+
## Contributing
32+
33+
This project wouldn't have been possible without all our [awesome contributors](https://github.com/jquery/learn.jquery.com/graphs/contributors?type=a). If you feel like something on the site is open for improvements, you can contribute [on GitHub](https://github.com/jquery/learn.jquery.com). Feel free to check out [the contributing guide](contributing/) for more in-depth information.
34+
3135
<h2 id="beta">About the Beta</h2>
3236

3337
Though this resource will never truly be "done," the current version of this site should still be considered something of a preview. We still have a number of improvements we want to make to the content, user experience, and site build before we're ready to call it a "final release." At the same time, however, it's important for us to open the doors now so we can begin providing better docs to people who need them right away and spread the word about this effort. If you're interested in helping us reach the finish line, we invite you to please read more about how [you can get involved with contributing](/contributing/)!

page/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Each article should have the following header (see below as some metatags are op
2929
}</script>
3030
```
3131

32-
The `source` and `attribution` properties are optional, and should be used primarily if you are importing an article from an outside source where it was published before being donated for inclusion in the learn site. You should **not** include these properties if you are adding a new article or editing an existing one, as your contribution will be acknowledged via the git commit logs.
32+
The `source` and `attribution` properties are optional, and should be used primarily if you are importing an article from an outside source where it was published before being donated for inclusion in the learn site. You should **not** include these properties if you are writing a new article or editing an existing one.
3333

3434
### Code Blocks
3535

0 commit comments

Comments
 (0)