From 27740caa2df15f499ebab45106eca3b194628b98 Mon Sep 17 00:00:00 2001 From: Philipp Hugenroth Date: Wed, 27 Sep 2023 14:18:42 +0200 Subject: [PATCH] Add changeset & add to app-next Signed-off-by: Philipp Hugenroth --- .changeset/modern-owls-mate.md | 5 +++++ packages/app-next/src/App.tsx | 2 ++ plugins/techdocs/src/alpha.tsx | 11 ++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .changeset/modern-owls-mate.md diff --git a/.changeset/modern-owls-mate.md b/.changeset/modern-owls-mate.md new file mode 100644 index 0000000000..73d98f426c --- /dev/null +++ b/.changeset/modern-owls-mate.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': minor +--- + +Added experimental support for declarative integration. diff --git a/packages/app-next/src/App.tsx b/packages/app-next/src/App.tsx index 2ab447c68f..f19fb1c109 100644 --- a/packages/app-next/src/App.tsx +++ b/packages/app-next/src/App.tsx @@ -25,6 +25,7 @@ import { createPageExtension, } from '@backstage/frontend-plugin-api'; import { entityRouteRef } from '@backstage/plugin-catalog-react'; +import techdocsPlugin from '@backstage/plugin-techdocs/alpha'; /* @@ -67,6 +68,7 @@ const app = createApp({ graphiqlPlugin, pagesPlugin, techRadarPlugin, + techdocsPlugin, userSettingsPlugin, createExtensionOverrides({ extensions: [entityPageExtension], diff --git a/plugins/techdocs/src/alpha.tsx b/plugins/techdocs/src/alpha.tsx index 864780afff..2f991f2fcc 100644 --- a/plugins/techdocs/src/alpha.tsx +++ b/plugins/techdocs/src/alpha.tsx @@ -25,6 +25,7 @@ import { createSearchResultListItemExtension } from '@backstage/plugin-search-re import { configApiRef, createApiFactory, + createRouteRef, discoveryApiRef, fetchApiRef, identityApiRef, @@ -34,7 +35,15 @@ import { techdocsStorageApiRef, } from '@backstage/plugin-techdocs-react'; import { TechDocsClient, TechDocsStorageClient } from './client'; -import { rootDocsRouteRef, rootRouteRef } from './routes'; + +const rootRouteRef = createRouteRef({ + id: 'plugin.techdocs.indexPage', +}); + +const rootDocsRouteRef = createRouteRef({ + id: 'plugin.techdocs.readerPage', + params: ['namespace', 'kind', 'name'], +}); /** @alpha */ export const TechDocsSearchResultListItemExtension =