diff --git a/.changeset/nine-bags-dream.md b/.changeset/nine-bags-dream.md new file mode 100644 index 0000000000..f0967775db --- /dev/null +++ b/.changeset/nine-bags-dream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr': patch +--- + +Render table of front matter metadata when displaying MADR v3 formatted ADR diff --git a/.changeset/real-donuts-brush.md b/.changeset/real-donuts-brush.md new file mode 100644 index 0000000000..b6a875bd64 --- /dev/null +++ b/.changeset/real-donuts-brush.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr-backend': patch +--- + +Use front matter parser for MADR v3 formatted ADRs when indexing status/date diff --git a/.changeset/strange-geese-argue.md b/.changeset/strange-geese-argue.md new file mode 100644 index 0000000000..7be0886abb --- /dev/null +++ b/.changeset/strange-geese-argue.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr-common': patch +--- + +Add utility function for parsing MADR front matter diff --git a/plugins/adr-common/api-report.md b/plugins/adr-common/api-report.md index 0236b355a5..a36854f0e7 100644 --- a/plugins/adr-common/api-report.md +++ b/plugins/adr-common/api-report.md @@ -35,4 +35,15 @@ export const MADR_DATE_FORMAT = 'yyyy-MM-dd'; // @public export const madrFilePathFilter: AdrFilePathFilterFn; + +// @public +export interface ParsedMadr { + attributes: Record; + content: string; + date?: string; + status?: string; +} + +// @public +export const parseMadrWithFrontmatter: (content: string) => ParsedMadr; ``` diff --git a/plugins/adr/api-report.md b/plugins/adr/api-report.md index dceca2411c..4cec5047fc 100644 --- a/plugins/adr/api-report.md +++ b/plugins/adr/api-report.md @@ -80,6 +80,7 @@ export const AdrReader: { decorators: Readonly<{ createRewriteRelativeLinksDecorator(): AdrContentDecorator; createRewriteRelativeEmbedsDecorator(): AdrContentDecorator; + createFrontMatterFormatterDecorator(): AdrContentDecorator; }>; };