Updated footer for more info
This commit is contained in:
+1
-2
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"nodePort": 5000,
|
||||
"name": "gitblog.md",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "A static blog using Markdown pulled from your git repository.",
|
||||
"main": "src/server.js",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<hr>
|
||||
<footer>
|
||||
<small>@<%= new Date().getFullYear() %> - Made with <a href="https://github.com/klemek/gitblog.md">GitBlog.md</a>
|
||||
<small><a href="/rss">RSS feed</a> - @<%= new Date().getFullYear() %> - Made with <a
|
||||
href="https://github.com/klemek/gitblog.md">GitBlog.md</a> (v<%= info.version %>)
|
||||
</small>
|
||||
</footer>
|
||||
@@ -2,6 +2,7 @@ const express = require('express');
|
||||
const app = express();
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const pjson = require('../package.json');
|
||||
|
||||
app.enable('trust proxy');
|
||||
|
||||
@@ -71,6 +72,9 @@ module.exports = (config) => {
|
||||
* @param code - code to send along the page
|
||||
*/
|
||||
const render = (res, vPath, data, code = 200) => {
|
||||
data.info = {
|
||||
version: pjson.version
|
||||
};
|
||||
res.render(vPath, data, (err, html) => {
|
||||
if (err) {
|
||||
res.sendStatus(500);
|
||||
|
||||
Reference in New Issue
Block a user