Skip to content

Commit

Permalink
feat(dgeni): hardcode design link and remove nav list children (#2879)
Browse files Browse the repository at this point in the history
  • Loading branch information
griest024 committed Jun 15, 2024
1 parent 4df7eb9 commit 7659261
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@ export class GenerateGuideListProcessor implements Processor {
}

$process(docs: Document[]): Document[] {
// hardcode design path
const designDoc = docs.find((d) => d?.id === 'design');
if (designDoc) {
designDoc.path = 'design';
}
const docsWithoutDesignChildren = docs.filter((d) => !d.id?.startsWith('design/'));

docs.push({
docType: 'navigation-list',
template: 'guide-list.template.json',
path: this.config.outputFolder + '/guide-list.json',
outputPath: this.config.outputFolder + '/guide-list.json',
data: generateNavigationTrieFromDocuments(docs.map(transformGuideDoc)),
data: generateNavigationTrieFromDocuments(docsWithoutDesignChildren.map(transformGuideDoc)),
});

return docs;
Expand Down

0 comments on commit 7659261

Please sign in to comment.