awesome-cordova-plugins/scripts/docs/dgeni/processors/readmes.js
2021-09-27 22:09:05 +02:00

20 lines
570 B
JavaScript

'use strict';
module.exports = function readmes(renderDocsProcessor) {
return {
name: 'readmes',
description: 'Create jekyll includes',
$runAfter: ['paths-computed'],
$runBefore: ['rendering-docs'],
$process: (docs) => {
// pretty up and sort the docs object for menu generation
docs = docs.filter((doc) => (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page');
docs.forEach((doc) => {
doc.outputPath = doc.outputPath.replace('src/@awesome-cordova-plugins/', '');
});
return docs;
},
};
};