Skip to content

Commit 1a55a98

Browse files
committed
Updating status notes and demo IP address
1 parent 1c0bec3 commit 1a55a98

File tree

12 files changed

+1023
-61
lines changed

12 files changed

+1023
-61
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ node_modules/
33
bower_components/
44
build/
55
npm-debug.log
6-
yarn.lock
76
src/
87
static/assets/css/highlight.css

Makefile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
SHELL := bash
2-
PATH := bin:${PATH}
3-
DATE := `date '+%Y%m%d'`
4-
PWD :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
2+
PATH := bin:${PATH}
3+
DATE := `date '+%Y%m%d'`
4+
PWD := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
5+
.DEFAULT_GOAL := build
6+
7+
# https://www.gnu.org/software/make/manual/make.html
58

69

710
.PHONY: build
8-
build: src node_modules static/bower_components static/assets/css/highlight.css
11+
build: src/ \
12+
static/assets/css/highlight.css
913
time npm run build
1014

1115

12-
src:
16+
src/:
1317
@if [[ ! -d src ]]; then\
1418
git clone https://github.com/webplatform/docs.git src;\
1519
cd src;\
@@ -18,16 +22,16 @@ src:
1822
fi
1923

2024

21-
static/bower_components: node_modules
25+
static/bower_components/: node_modules/
2226
node_modules/.bin/bower install
2327

2428

25-
static/assets/css/highlight.css: node_modules
29+
static/assets/css/highlight.css: node_modules/
2630
cp node_modules/highlight.js/styles/solarized_dark.css static/assets/css/highlight.css
2731

2832

29-
node_modules: package.json
30-
npm install
33+
node_modules/: package.json
34+
yarn install
3135

3236

3337
.PHONY: package

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Any page you can see on *docs.webplatform.org* should be visible on the new vers
2727

2828
To test out the latest run, use the following static web server.
2929

30-
http://67.205.56.184/
30+
http://67.205.62.59/
3131

3232

3333
### Expected steps
@@ -38,11 +38,11 @@ Roughly [all issues described in **webplatform/mediawiki-conversion**](https://g
3838

3939
* [x] [Convert MediaWiki history into Git source-controlled text files](https://github.com/webplatform/mediawiki-conversion/issues/4)
4040
* [x] [Pass a filter to every page to make it suitable for a static site generator](https://github.com/webplatform/mediawiki-conversion/issues/9)
41-
* [ ] [Reproduce directory listing for pages without content](https://github.com/webplatform/mediawiki-conversion/issues/3)
41+
* [x] [Reproduce directory listing for pages without content](https://github.com/webplatform/mediawiki-conversion/issues/3)
4242
* [x] [Make sure all uploads are visible from generated site](https://github.com/webplatform/mediawiki-conversion/issues/5)
4343
* [ ] ~~[Reproduce search functionality](https://github.com/webplatform/mediawiki-conversion/issues/8)~~ (at least leave metadata to help making the feature)
44-
* [ ] [Ensure ALL URLs are kept with appropriate redirects](https://github.com/webplatform/mediawiki-conversion/issues/6) (almost there! **needs testing**)
45-
* [ ] [Get list of views the static site won’t be reproducing anymore so we can create appropriate "410 Gone" response #11](https://github.com/webplatform/mediawiki-conversion/issues/11)
44+
* [x] [Ensure ALL URLs are kept with appropriate redirects](https://github.com/webplatform/mediawiki-conversion/issues/6) (almost there! **needs testing**)
45+
* [x] [Get list of views the static site won’t be reproducing anymore so we can create appropriate "410 Gone" response #11](https://github.com/webplatform/mediawiki-conversion/issues/11)
4646

4747

4848

build.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@
33
* Build static HTML files using Metalsmith
44
*/
55

6-
var metalsmith = require("metalsmith")
7-
,changed = require("metalsmith-changed")
8-
,layouts = require("metalsmith-layouts")
9-
,assets = require("metalsmith-assets")
10-
,remarkable = require("metalsmith-markdown-remarkable")
11-
,remarkableHighlighter = require("./lib/remarkable/highlighter")
12-
,remarkableExtender = require("./lib/remarkable")
13-
,handlebarsExtender = require("./lib/handlebars")()
14-
,pkg = require("./package.json");
6+
var metalsmith = require("metalsmith")
7+
, changed = require("metalsmith-changed")
8+
, ignore = require("metalsmith-ignore")
9+
, layouts = require("metalsmith-layouts")
10+
, assets = require("metalsmith-assets")
11+
, remarkable = require("metalsmith-markdown-remarkable")
12+
, remarkableHighlighter = require("./lib/remarkable/highlighter")
13+
, remarkableExtender = require("./lib/remarkable")
14+
, handlebarsExtender = require("./lib/handlebars")()
15+
, pkg = require("./package.json");
1516

1617
metalsmith(__dirname)
1718
.clean(false)
1819
.use(changed())
20+
.use(ignore([
21+
".git"
22+
]))
1923
.source("./src")
2024
.destination("./build")
2125
//.concurrency(2024)

config/nginx/main.map

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@ location / {
3232
merge_slashes on;
3333
rewrite ^/wiki/(.*)$ /$1 permanent; # MUST be the first
3434
rewrite ^/$ /Main_Page permanent;
35-
rewrite /Meta\:(.*)$ /Meta/$1 permanent;
36-
rewrite /WPD\:(.*)$ /WPD/$1 permanent;
3735

38-
rewrite ^/WPD/Community$ /community permanent;
39-
rewrite ^/WPD/Contributors_Guide$ /contribute permanent;
36+
rewrite ^/WPD/Community$ /Community permanent;
37+
rewrite ^/WPD/Contributors_Guide$ /CONTRIBUTING.html permanent;
38+
rewrite ^/WPD/Contributing$ /CONTRIBUTING.html permanent;
39+
rewrite (?i)^/Contribut(e|ing)$ /CONTRIBUTING.html permanent;
40+
rewrite ^/WPD/Contribute$ /CONTRIBUTING.html permanent;
41+
42+
rewrite /Meta\:(.*)$ /Meta/$1 permanent;
43+
rewrite /WPD\:(.*)$ /WPD/$1 permanent;
4044

4145
## Images hardcoded in wiki source before we migrated to DreamObjects
4246
rewrite ^/w/images/(.*)$ /assets/$1;
4347

44-
rewrite ^/((Special|Template|Property|Form|Concept|UserWiki|User_profile).*)$ /disabled?r=$1 permanent;
45-
#rewrite ^/(w|t|test)/(.*)$ /disabled?r=$1 permanent;
46-
4748

4849

4950

layouts/default.hbs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@
2828
<div class="container">
2929
<ul class="links">
3030
<li><a href="/" class="active">THE DOCS</a></li>
31-
<li><a href="/Community">COMMUNITY</a></li>
31+
<li><a href="/Community">CONNECT</a></li>
3232
<li><a href="/Contributing">CONTRIBUTE</a></li>
3333
<li><a href="//www.webplatform.org/blog/">BLOG</a></li>
34-
<li><a href="https://github.com/webplatform/docs/issues">ISSUES</a></li>
3534
</ul>
3635
</div>
3736
</nav>
37+
38+
{{>notice}}
39+
3840
<div id="content" class="mw-body">
3941
<div class="container">
4042
<a id="top"></a>
@@ -51,7 +53,7 @@
5153
<div><a class="highlighted edit button" text="Edit" href="https://github.com/webplatform/docs/blob/master">Edit</a></div>
5254
<div class="dropdown"><a class="tools button">Tools</a>
5355
<ul>
54-
<li><a href="/_internal/history.html?path={{#urlencode}}{{uri}}{{/urlencode}}" rel="archives">History</a></li>
56+
<li><a href="/_internal/history.html?path={{#history_urlencode}}{{uri}}{{/history_urlencode}}" rel="archives">History</a></li>
5557
</ul>
5658
</div>
5759
{{/if}}
@@ -60,7 +62,6 @@
6062
<div id="page">
6163
<div id="page-content">
6264
<div id="main-content">
63-
{{>notice}}
6465

6566
<h1>{{title}}</h1>
6667
{{{ contents }}}

lib/handlebars/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ module.exports = function () {
1515
return new Handlebars.SafeString(text);
1616
});
1717

18-
Handlebars.registerHelper('urlencode', function urlencodeHelper (options) {
18+
Handlebars.registerHelper('history_urlencode', function urlencodeHelper (options) {
1919
var urlArg = options.fn(this) + '/'
20-
, out = urlArg.replace(/\s+/g, '_');
20+
, out = urlArg.replace(/\s+/g, '_').replace(/[\(\)]/g,'');
2121
return new Handlebars.SafeString(encodeURI(out));
2222
});
2323

@@ -27,7 +27,7 @@ module.exports = function () {
2727
, out = '';
2828

2929
fragments.forEach(function(str, index, full){
30-
subpath += `${str}/`;
30+
subpath += `${str}/`.replace(' ', '_');
3131
out += `<li><a href="${subpath}">${str}</a></li>`;
3232
});
3333

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"metalsmith-assets": "^0.1.0",
3434
"metalsmith-changed": "~0.2",
3535
"metalsmith-layouts": "~1.4",
36+
"metalsmith-ignore": "~0.1",
3637
"metalsmith-markdown-remarkable": "^0.1.1"
3738
}
3839
}

partials/breadcrumb.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
{{#if uri}}
44
{{#breadcrumbize}}{{uri}}{{/breadcrumbize}}
55
{{/if}}
6-
</ol>
6+
</ol>

partials/notice.hbs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<div id="siteNotice">
22
<div id="localNotice" dir="ltr" lang="en">
3-
<div class="warningbox">
4-
<p>
5-
<strong>Notice:</strong><br/>
6-
The WebPlatform project has been <b>discontinued</b> when the
7-
<a href="http://blog.webplatform.org/2012/10/one-small-step/">Stewards partnership</a>
8-
agreement ended in <i>September 2015</i>.
9-
This site has been frozen, and the assets we have created will remain.
10-
</p>
3+
4+
<div class="notice" style="margin:10px auto; position: relative; width: 90%; max-width: 950px;">
5+
<div style="padding: 10px; border-radius: 4px; background-color: rgb(249, 247, 243); box-shadow: 0px 0px 1px rgb(167, 169, 172);">
6+
<strong>Notice:</strong>&nbsp;The WebPlatform project has been <b>discontinued</b> when the <a href="//www.webplatform.org/blog/2012/10/one-small-step/">Stewards partnership</a> agreement ended in <i>September 2015</i>. This site has been frozen, and the assets we have created will remain.
7+
</div>
118
</div>
9+
1210
</div>
1311
</div>

static/_internal/header.html

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,20 @@
2525
<li><a href="/Community">CONNECT</a></li>
2626
<li><a href="/contribute">CONTRIBUTE</a></li>
2727
<li><a href="//www.webplatform.org/blog/">BLOG</a></li>
28-
<li><a href="https://github.com/webplatform/ops/issues">ISSUES</a></li>
2928
</ul>
3029
</div>
3130
</nav>
31+
32+
<div class="notice" style="position: relative; width: 90%; max-width: 950px; margin: auto; ">
33+
<div style="margin-bottom: 20px; padding: 10px; border-radius: 4px; background-color: rgb(249, 247, 243); box-shadow: 0px 0px 1px rgb(167, 169, 172);">
34+
<strong>Notice:</strong>&nbsp;The WebPlatform project has been <b>discontinued</b> when the <a href="//www.webplatform.org/blog/2012/10/one-small-step/">Stewards partnership</a> agreement ended in <i>September 2015</i>. This site has been frozen, and the assets we have created will remain.
35+
</div>
36+
</div>
37+
3238
<div id="content" class="mw-body">
3339
<div class="container">
3440
<div id="page">
3541
<div id="page-content">
3642
<div id="main-content">
37-
<div id="siteNotice">
38-
39-
<div id="localNotice" dir="ltr" lang="en">
40-
<div class="warningbox">
41-
<p>
42-
<strong>Notice:</strong><br/>
43-
The WebPlatform project has been <b>discontinued</b> when the
44-
<a href="http://www.webplatform.org/blog/2012/10/one-small-step/">Stewards partnership</a>
45-
agreement ended in <i>September 2015</i>.
46-
This site has been frozen, and the assets we have created will remain.
47-
</p>
48-
</div>
49-
</div>
50-
</div>
5143

5244
<h1><span>Sub pages of </span>

0 commit comments

Comments
 (0)