diff options
Diffstat (limited to 'lib/api/encodePage.js')
-rw-r--r-- | lib/api/encodePage.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/api/encodePage.js b/lib/api/encodePage.js index 1f3a01b..b212c29 100644 --- a/lib/api/encodePage.js +++ b/lib/api/encodePage.js @@ -1,5 +1,6 @@ var JSONUtils = require('../json'); var deprecate = require('./deprecate'); +var encodeNavigation = require('./encodeNavigation'); /** Encode a page in a context to a JS API @@ -21,6 +22,14 @@ function encodePage(output, page) { result.path = file.getPath(); result.rawPath = fs.resolve(result.path); + // todo: (as deprecated) + // page.progress + // page.navigation + + // Deprecated properties + deprecate.field(output, 'page.navigation', result, 'sections', encodeNavigation(output), + '"navigation" property is deprecated'); + deprecate.field(output, 'page.sections', result, 'sections', [ { content: result.content, |