-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchart_item.js
39 lines (32 loc) · 1.05 KB
/
chart_item.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var path = require('path');
var long_lists = require('./l/lists.json');
var real_lists = require('./r/lists.json');
var partial_arr = ["./include/partials/header.js", "./include/partials/start.js", "./include/partials/end.js", "./include/partials/footer.js", "./include/partials/head.js"];
var post_arr = [];
post_arr.push(long_lists);
post_arr.push(real_lists);
long_lists.data.page.forEach(function(p) {
post_arr.push({
"data": {
"chart_description": p,
"prefix": "l",
"domain": "https://www.taiwanstat.com/global/"
},
"partials": './include/partials.js',
"layout": path.join('l', p.url, "index.hbs"),
"filename": path.join('l', p.url, "index.html")
})
})
real_lists.data.page.forEach(function(p) {
post_arr.push({
"data": {
"chart_description": p,
"prefix": "r",
"domain": "https://www.taiwanstat.com/global/"
},
"partials": './include/partials.js',
"layout": path.join('r', p.url, "index.hbs"),
"filename": path.join('r', p.url, "index.html")
})
})
module.exports = post_arr;