Skip to content

Commit 5c91834

Browse files
author
Ryan A. Johnson
committed
docs(version): show version in footer
1 parent 5906c33 commit 5c91834

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/_templates/partials/footer_nav.njk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@
88
{{ page.updated.format(site.dateFormat) }}
99
</small>
1010
{% endif %}
11+
12+
<small>(v{{VERSION}})</small>
1113
</div>

lib/context.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
'use strict';
22

33
const CONFIG = require('../_config');
4+
const JSON5 = require('json5');
5+
const PKG = require('../package.json');
46
const _ = require('lodash');
57
const fm = require('front-matter');
68
const fs = require('fs');
79
const globby = require('globby');
810
const moment = require('moment');
911
const path = require('path');
10-
const JSON5 = require('json5');
1112

1213
// Fetch data from {CONFIG.docsDir}/_data
1314
function _getDataContext () {
@@ -66,6 +67,7 @@ function forFile (relPath) {
6667
site: CONFIG.site,
6768
data: _getDataContext(),
6869
page: _getPageContext(relPath),
70+
VERSION: PKG.version,
6971
};
7072
}//forFile
7173

0 commit comments

Comments
 (0)