From: Dan Allen Date: Sat, 23 Jun 2018 23:02:33 +0000 (-0600) Subject: add env key to UI model to preview X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3b92dbeabfbdb9fc7713bd4f476c6ad8af419e54;p=eg-antora.git add env key to UI model to preview --- diff --git a/tasks/build-preview.js b/tasks/build-preview.js index 53c7272..77c8411 100644 --- a/tasks/build-preview.js +++ b/tasks/build-preview.js @@ -23,6 +23,7 @@ module.exports = async (src, dest, siteSrc, siteDest, sink) => { map((file, next) => { const compiledLayout = layouts[file.stem === '404' ? '404.hbs' : 'default.hbs'] const siteRootPath = path.relative(path.dirname(file.path), path.resolve(siteSrc)) + uiModel.env = process.env uiModel.siteRootPath = siteRootPath uiModel.siteRootUrl = path.join(siteRootPath, 'index.html') uiModel.uiRootPath = path.join(siteRootPath, '_')