comma dangle
This commit is contained in:
+4
-4
@@ -93,7 +93,7 @@ module.exports = (config) => {
|
||||
host: host,
|
||||
version: pjson.version,
|
||||
request: req,
|
||||
config: config
|
||||
config: config,
|
||||
};
|
||||
res.render(vPath, data, (err, html) => {
|
||||
if (err && vPath !== path.join(config['data_dir'], config['home']['error'])) {
|
||||
@@ -130,7 +130,7 @@ module.exports = (config) => {
|
||||
//rate limit for safer server
|
||||
const limiter = rateLimit({
|
||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||
max: config['rate_limit']
|
||||
max: config['rate_limit'],
|
||||
});
|
||||
app.use(limiter);
|
||||
|
||||
@@ -174,7 +174,7 @@ module.exports = (config) => {
|
||||
'title': config['rss']['title'],
|
||||
'description': config['rss']['description'],
|
||||
'feed_url': host + req.url,
|
||||
'site_url': host
|
||||
'site_url': host,
|
||||
});
|
||||
Object.values(articles)
|
||||
.slice(0, config['rss']['length'])
|
||||
@@ -182,7 +182,7 @@ module.exports = (config) => {
|
||||
feed.item({
|
||||
title: article.title,
|
||||
url: host + article.url,
|
||||
date: article.date
|
||||
date: article.date,
|
||||
});
|
||||
});
|
||||
lastRSS = feed.xml();
|
||||
|
||||
+2
-2
@@ -92,7 +92,7 @@ module.exports = (config) => {
|
||||
realPath: path.join(config['data_dir'], p[0], p[1], p[2], p[3]),
|
||||
year: parseInt(p[0]),
|
||||
month: parseInt(p[1]),
|
||||
day: parseInt(p[2])
|
||||
day: parseInt(p[2]),
|
||||
};
|
||||
article.date = new Date(article.year, article.month, article.day);
|
||||
article.date.setUTCHours(0);
|
||||
@@ -116,6 +116,6 @@ module.exports = (config) => {
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
+5
-5
@@ -112,9 +112,9 @@ module.exports = (config) => {
|
||||
MathJax: {
|
||||
tex2jax: {
|
||||
inlineMath: [['$', '$']],
|
||||
displayMath: [['$$', '$$']]
|
||||
}
|
||||
}
|
||||
displayMath: [['$$', '$$']],
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ module.exports = (config) => {
|
||||
const mjConf = {
|
||||
math: eq,
|
||||
format: format,
|
||||
speakText: config['mathjax']['speak_text']
|
||||
speakText: config['mathjax']['speak_text'],
|
||||
};
|
||||
mjConf[output] = true;
|
||||
mjAPI.typeset(mjConf, (res) => {
|
||||
@@ -222,7 +222,7 @@ module.exports = (config) => {
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user