diff --git a/.changeset/light-vans-hide.md b/.changeset/light-vans-hide.md new file mode 100644 index 0000000000..ccc1339959 --- /dev/null +++ b/.changeset/light-vans-hide.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-api-docs': patch +--- + +Add organization name to the API Explorer page title diff --git a/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerLayout.tsx b/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerLayout.tsx index 0720ecf45b..b82166f4cd 100644 --- a/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerLayout.tsx +++ b/plugins/api-docs/src/components/ApiExplorerPage/ApiExplorerLayout.tsx @@ -14,20 +14,25 @@ * limitations under the License. */ -import { Header, Page } from '@backstage/core'; +import { Header, Page, useApi, configApiRef } from '@backstage/core'; import React from 'react'; type Props = { children?: React.ReactNode; }; - -export const ApiExplorerLayout = ({ children }: Props) => ( - -
- {children} - -); +export const ApiExplorerLayout = ({ children }: Props) => { + const configApi = useApi(configApiRef); + const generatedSubtitle = `${ + configApi.getString('organization.name') ?? 'Backstage' + } API Explorer`; + return ( + +
+ {children} + + ); +};