build(aio): fix paths to "index" pages
Content pages like `tutorial/index.md` were being mapped to `tutorial.index.json`, which meant that they could only be rendered if you browsed to `/tutorial/index`. This didn't sit well so now these pages are mapped to `tutorial.json`, which means that you browser to them via `/tutorial/` or just `/tutorial`. Fixed #15335
This commit is contained in:

committed by
Miško Hevery

parent
c9710d4fb5
commit
fc1f6efe0d
@ -266,7 +266,11 @@ module.exports =
|
||||
outputPathTemplate: '${moduleDoc.moduleFolder}/${name}.json',
|
||||
},
|
||||
{docTypes: ['example-region'], getOutputPath: function() {}},
|
||||
{docTypes: ['content'], pathTemplate: '${id}', outputPathTemplate: '${path}.json'},
|
||||
{
|
||||
docTypes: ['content'],
|
||||
getPath: (doc) => `${doc.id.replace(/\/index$/, '')}`,
|
||||
outputPathTemplate: '${path}.json'
|
||||
},
|
||||
{docTypes: ['navigation-map'], pathTemplate: '${id}', outputPathTemplate: '../${id}.json'}
|
||||
];
|
||||
})
|
||||
|
Reference in New Issue
Block a user