Skip to content

Commit 049e8ef

Browse files
committed
Remove files for pages that are no longer exposed
The URLs for these pages have redirected for a while, or have been unused or no longer relevant for some time. I've updated redirects.json so that more of this is testable locally and in stage rather than relying (only) on overrides at Cloudflare, which can mostly be removed once this is deployed. Ref #139 Closes #118
1 parent d6d5143 commit 049e8ef

38 files changed

+18
-1513
lines changed

Gruntfile.js

+1-100
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ module.exports = function( grunt ) {
33
grunt.loadNpmTasks( "grunt-jquery-content" );
44

55
grunt.initConfig({
6-
"copy-foundation-docs": {
7-
"board-members.md": "board-members.md",
8-
"bylaws.md": "bylaws.md",
9-
"mission.md": "mission.md",
10-
"team-members.md": "team-members.md",
11-
"trademark-policy.md": "trademark-policy.md",
12-
"travel-policy.md": "travel-policy.md"
13-
},
146
"build-posts": {
157
page: "pages/**"
168
},
@@ -24,98 +16,7 @@ grunt.initConfig({
2416
})()
2517
});
2618

27-
grunt.registerTask( "build-members-page", function() {
28-
var memberContent,
29-
members = require( "./data/members" ),
30-
path = grunt.config( "wordpress.dir" ) + "/posts/page/members.html",
31-
content = grunt.file.read( path );
32-
33-
memberContent = Object.keys( members.corporate ).map(function( level ) {
34-
var rowOpen,
35-
rowClose,
36-
memberCount = 1,
37-
memberLen = members.corporate[ level ].length,
38-
prettyLevel = level.replace( /^\w/, function( character ) {
39-
return character.toUpperCase();
40-
}) + " Members";
41-
42-
return "<h2 class='block'>" + prettyLevel + "</h2>\n" +
43-
members.corporate[ level ].map(function( member, index ) {
44-
var logoPath = "/resources/members/" +
45-
member.name.toLowerCase().replace( /[^a-z0-9]/g, "" ) + ".png";
46-
47-
if ( memberCount % 2 ) {
48-
rowOpen = "<div class='row'>\n";
49-
if ( index == memberLen - 1 ) {
50-
rowClose = "</div>";
51-
} else {
52-
rowClose = "";
53-
}
54-
} else {
55-
rowOpen = "";
56-
rowClose = "</div>";
57-
}
58-
59-
memberCount++;
60-
61-
return rowOpen + "<div class='six mobile columns corporatemembers'>\n" +
62-
"<div class='row'>\n" +
63-
"<div class='four mobile columns'>\n" +
64-
"<a href='" + member.url + "'>\n" +
65-
"<img src='" + logoPath + "'>\n" +
66-
"</a>\n" +
67-
"</div>\n" +
68-
"<div class='eight mobile columns'>\n" +
69-
member.description +
70-
"</div>\n" +
71-
"</div>\n</div>\n" + rowClose;
72-
}).join( "\n" );
73-
}).join( "\n" );
74-
75-
content = content.replace( "{{corporate-members}}", memberContent );
76-
grunt.file.write( path, content );
77-
});
78-
79-
grunt.registerMultiTask( "copy-foundation-docs", function() {
80-
var github = require( "github-request" ),
81-
done = this.async(),
82-
src = this.target,
83-
dest = "pages/" + this.data,
84-
token = grunt.config( "wordpress.githubToken" );
85-
86-
if ( !token ) {
87-
grunt.log.error( "Missing githubToken in config.json" );
88-
return done( false );
89-
}
90-
91-
github.request({
92-
headers: {
93-
Authorization: "token " + token
94-
},
95-
path: "/repos/jquery/foundation/contents/documents/" + src
96-
}, function( error, file ) {
97-
if ( error ) {
98-
grunt.log.error( error );
99-
return done( false );
100-
}
101-
102-
var content = new Buffer( file.content, file.encoding ).toString( "utf8" ),
103-
lines = content.split( "\n" ),
104-
title = lines.shift().substring( 2 );
105-
106-
content =
107-
"<script>" + JSON.stringify({
108-
title: title,
109-
pageTemplate: "page-fullwidth.php"
110-
}, null, "\t" ) + "</script>\n" +
111-
lines.join( "\n" );
112-
113-
grunt.file.write( dest, content );
114-
grunt.log.writeln( "Copied " + src + " from foundation repo." );
115-
done();
116-
});
117-
});
11819

119-
grunt.registerTask( "build", [ "build-posts", "build-members-page", "build-resources" ] );
20+
grunt.registerTask( "build", [ "build-posts", "build-resources" ] );
12021

12122
};

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33
## Building and Deploying
44

55
To build and deploy your changes for previewing in a [`jquery-wp-content`](https://github.com/jquery/jquery-wp-content) instance, follow the [workflow instructions](http://contribute.jquery.org/web-sites/#workflow) from our documentation on [contributing to jQuery Foundation web sites](http://contribute.jquery.org/web-sites/).
6-
7-
### Foundation Documents
8-
9-
Some of the pages for jquery.org come from jQuery Foundation documents stored in a separate repository. Whenever those documents are updated, they should be copied to this repo via `grunt copy-foundation-docs`. Newly created documents must be added to the list in the grunt file. After the grunt task runs, you should review, add, commit, and push the update. Running this task requires access to the foundation repository, as well as adding a `githubToken` property to your `config.json`. You can generate a personal access token at https://github.com/settings/applications.

data/members.js

-3
This file was deleted.

data/members/corporate.js

-17
This file was deleted.

data/members/descriptions/adobe.html

-1
This file was deleted.

data/members/descriptions/adzerk.html

-1
This file was deleted.

data/members/descriptions/browserstack.html

-1
This file was deleted.

data/members/descriptions/dequesystems.html

-1
This file was deleted.

data/members/descriptions/famous.html

-1
This file was deleted.

data/members/descriptions/ibm.html

-1
This file was deleted.

data/members/descriptions/intel.html

-1
This file was deleted.

data/members/descriptions/maxcdn.html

-1
This file was deleted.

data/members/descriptions/mozilla.html

-1
This file was deleted.

data/members/descriptions/neobux.html

-1
This file was deleted.

data/members/descriptions/syncfusion.html

-1
This file was deleted.

data/members/descriptions/wordpress.html

-1
This file was deleted.

data/members/diamond.json

-14
This file was deleted.

data/members/gold.json

-6
This file was deleted.

data/members/platinum.json

-6
This file was deleted.

data/members/silver.json

-30
This file was deleted.

package.json

+1-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
{
22
"name": "jquery.org",
3-
"title": "jQuery Foundation",
3+
"private": true,
44
"version": "1.6.21",
5-
"homepage": "https://github.com/jquery/jquery.org",
6-
"author": {
7-
"name": "jQuery Foundation and other contributors"
8-
},
9-
"repository": {
10-
"type": "git",
11-
"url": "git://github.com/jquery/jquery.org.git"
12-
},
13-
"bugs": {
14-
"url": "https://github.com/jquery/jquery.org/issues"
15-
},
16-
"licenses": [
17-
{
18-
"type": "MIT",
19-
"url": "https://github.com/jquery/jquery.org/blob/master/LICENSE.txt"
20-
}
21-
],
225
"dependencies": {
236
"github-request": "1.2.4",
247
"grunt": "1.5.3",

pages/board-members.md

-38
This file was deleted.

0 commit comments

Comments
 (0)