Merge pull request #16607 from adamdmharvey/adamdmharvey/fix-techdocs-custom-example

fix(docs): TechDocs grid sample code
This commit is contained in:
Fredrik Adelöw
2023-03-27 16:23:16 +02:00
committed by GitHub
+11 -7
View File
@@ -139,21 +139,25 @@ import { TechDocsCustomHome } from '@backstage/plugin-techdocs';
const techDocsTabsConfig = [
{
label: "Recommended Documentation",
label: 'Recommended Documentation',
panels: [
{
title: 'Golden Path',
description: 'Documentation about standards to follow',
panelType: 'DocsCardGrid',
filterPredicate: entity => entity?.metadata?.tags?.includes('recommended') ?? false,
}
]
}
]
filterPredicate: entity =>
entity?.metadata?.tags?.includes('recommended') ?? false,
},
],
},
];
const AppRoutes = () => {
<FlatRoutes>
<Route path="/docs" element={<TechDocsCustomHome tabsConfig={techDocsTabsConfig} />}>
<Route
path="/docs"
element={<TechDocsCustomHome tabsConfig={techDocsTabsConfig} />}
/>
</FlatRoutes>;
};
```