Add ADR type to search page and result cast
Signed-off-by: Stephen Cprek <steve.cprek@favordelivery.com>
This commit is contained in:
committed by
Steve Cprek
parent
feb1cb63b5
commit
1263b9cc42
+18
-2
@@ -71,16 +71,32 @@ Afterwards, add the following code snippet to use `AdrSearchResultListItem` when
|
||||
import { AdrSearchResultListItem } from '@backstage/plugin-adr';
|
||||
|
||||
...
|
||||
<SearchType.Accordion
|
||||
name="Result Type"
|
||||
defaultValue="software-catalog"
|
||||
types={[
|
||||
...
|
||||
{
|
||||
value: 'adrs',
|
||||
name: 'Architecture Decision Records',
|
||||
icon: <DocsIcon />,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
case 'adr':
|
||||
...
|
||||
|
||||
case 'adrs':
|
||||
return (
|
||||
<AdrSearchResultListItem
|
||||
key={document.location}
|
||||
result={document}
|
||||
result={document as AdrDocument}
|
||||
/>
|
||||
);
|
||||
```
|
||||
|
||||
> Note the `AdrDocument` might not be needed in newer versions https://github.com/backstage/backstage/issues/13723
|
||||
|
||||
## Custom ADR formats
|
||||
|
||||
By default, this plugin will parse ADRs according to the format specified by the [Markdown Architecture Decision Record (MADR) v2.x template](https://github.com/adr/madr/tree/2.1.2). If your ADRs are written using a different format, you can apply the following customizations to correctly identify and parse your documents:
|
||||
|
||||
Reference in New Issue
Block a user