diff --git a/lib/create-tree.js b/lib/create-tree.js index 84940e5a3b..5b371d372f 100644 --- a/lib/create-tree.js +++ b/lib/create-tree.js @@ -3,6 +3,8 @@ const path = require('path') const Page = require('./page') module.exports = async function createTree (originalPath, langObj) { + // This basePath definition is needed both here and in lib/page-data.js because this + // function runs recursively, and the value for originalPath changes on recursive runs. const basePath = path.posix.join(__dirname, '..', langObj.dir, 'content') // On recursive runs, this is processing page.children items in `/` format.