diff --git a/packages/antwar/src/core/paths.js b/packages/antwar/src/core/paths.js index 818b784..f84dd1f 100644 --- a/packages/antwar/src/core/paths.js +++ b/packages/antwar/src/core/paths.js @@ -52,7 +52,8 @@ function allPages() { return [ { type: 'custom', - fileName: sectionName + fileName: sectionName, + section } ]; } @@ -187,7 +188,7 @@ function processPage({ return keywords; }, title({ file }) { - return file.attributes && file.attributes.title; + return (section && section.title) || (file.attributes && file.attributes.title); }, url({ sectionName = '', fileName = '' }) { return `${sectionName}/${fileName}`; diff --git a/smoketest/antwar.config.js b/smoketest/antwar.config.js index d21760d..e3d39b5 100644 --- a/smoketest/antwar.config.js +++ b/smoketest/antwar.config.js @@ -55,7 +55,7 @@ module.exports = function (env) { function section(contentCb) { return { - title: 'Smoke test', + title: 'Section test', path() { return contentCb(); },