Skip to content

Commit fe63cab

Browse files
committed
Add package.json information into page context
1 parent 3bb8053 commit fe63cab

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

build/tasks/app-pages.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,12 @@ function setFrontMatter(file) {
152152

153153
function getPageContextExternal(file) {
154154

155+
// Initial context
155156
var context = {};
156157

158+
// Package data
159+
context.pkg = require('../../package.json');
160+
157161
var rootDir = path.resolve(config.srcDir);
158162
var pageDir = path.dirname(file.path);
159163

0 commit comments

Comments
 (0)