Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
feat(website): add version display in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
jftanner committed Dec 25, 2018
1 parent 772c63b commit 25b81f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ const path = require('path');
const router = express.Router();

// Load documentation and provide locals.
const version = require('../package.json').version;
const documentation = require('../helpers/loadDocumentation');
router.use((req, res, next) => {
res.locals.version = version;
res.locals.path = req.path;
res.locals.availableDocumentation = Object.keys(documentation).sort();
next();
Expand Down
1 change: 1 addition & 0 deletions client/views/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ html
div.footer
a(href='https://github.com/tanndev/maelstrom' target='__blank')
img(src='/images/octocat.png')
span=version ? `Version ${version}` : 'Development Version'
span Favicon provided by #[a(href='http://icons8.com/') Icons8]

0 comments on commit 25b81f7

Please sign in to comment.