Skip to content

Commit b2b00f2

Browse files
author
Cong Liu
committed
Migrate to metalsmith
1 parent f6057b7 commit b2b00f2

Some content is hidden

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

50 files changed

+874
-199
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
22
lib/
33
node_modules/
4-
npm-debug.log
4+
npm-debug.log
5+
build/*

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
=====================
1+
# README
2+
---
3+
4+
## Build Website in Local
5+
6+
Run:
7+
8+
```bash
9+
npm install
10+
npm run serve
11+
```
12+
13+
Then open http://localhost:3000/ with your browser.
14+
15+
If you just want to build the website, run
16+
17+
```bash
18+
npm run build
19+
```
20+
21+
And you will get generated website in `build` directory.
22+
23+
## Add New Blog
24+
25+
Just write a new markdown in `src/blog` and it will automatically generate the pages. Then you have to **reload your browser** to see the changes.
26+
27+
## Add New Downloads
28+
29+
Edit `src/versions.json` and append your new versions of downloads and switch `stable` or `latest` to your new version number. Then reload your browser to see the changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

server.js renamed to archived/server.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ var express = require('express'),
99
marked = require('marked'),
1010
app = express();
1111

12+
var port = process.env.PORT || 8080;
13+
1214
// Express uses
1315
app.use(compression()); // Compression (Gzip)
1416
app.use(express.static(__dirname + '/public'));
@@ -45,5 +47,5 @@ app.get('/docs', function(req, res) {
4547
res.render('pages/docs', config);
4648
});
4749

48-
app.listen(80);
49-
console.log('Express.js server is listening on http://localhost:80');
50+
app.listen(port);
51+
console.log('Express.js server is listening on http://localhost:' + port);
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)