docs: address review feedback on route refs, typos, and installation steps
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -91,6 +91,19 @@ export default createFrontendModule({
|
||||
});
|
||||
```
|
||||
|
||||
Then register the module in your app:
|
||||
|
||||
```tsx title="packages/app/src/App.tsx"
|
||||
import { createApp } from '@backstage/frontend-defaults';
|
||||
import catalogCustomizations from './catalog/catalogCustomizations';
|
||||
|
||||
const app = createApp({
|
||||
features: [catalogCustomizations],
|
||||
});
|
||||
|
||||
export default app.createRoot();
|
||||
```
|
||||
|
||||
### Removing default filters
|
||||
|
||||
Default filters can be disabled through `app-config.yaml` by setting them to `false`:
|
||||
@@ -117,13 +130,17 @@ you can override the page extension using a frontend module:
|
||||
import {
|
||||
PageBlueprint,
|
||||
createFrontendModule,
|
||||
createRouteRef,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
|
||||
const customCatalogPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/catalog',
|
||||
loader: () =>
|
||||
import('./CustomCatalogPage').then(m => <m.CustomCatalogPage />),
|
||||
routeRef: createRouteRef({ aliasFor: 'catalog.catalogIndex' }),
|
||||
loader: async () => {
|
||||
const { CustomCatalogPage } = await import('./CustomCatalogPage');
|
||||
return <CustomCatalogPage />;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ export const MyCustomFieldWithOptionsExtension = FormFieldBlueprint.make({
|
||||
|
||||
We recommend using a library like [zod](https://github.com/colinhacks/zod) to define your schema
|
||||
and the provided `makeFieldSchemaFromZod` helper utility function to generate both the JSON schema
|
||||
and type for your field props to preventing having to duplicate the definitions:
|
||||
and type for your field props to prevent having to duplicate the definitions:
|
||||
|
||||
```tsx
|
||||
// packages/app/src/scaffolder/MyCustomExtensionWithOptions/MyCustomExtensionWithOptions.tsx
|
||||
|
||||
@@ -155,7 +155,7 @@ Please be aware that the version requirement could change, you need to check our
|
||||
|
||||
On a Debian-based Docker container, Python packages must be either installed using the OS package manager or within a virtual environment (see the [related PEP](https://peps.python.org/pep-0668/)). Alternative is to use e.g. [pipx](https://pypa.github.io/pipx/) for installing Python packages in an isolated environment.
|
||||
|
||||
The above Dockerfile snippet installs the latest `mkdocs-techdoc-core` package. Version numbers can be found in the corresponding [changelog](https://github.com/backstage/mkdocs-techdocs-core#changelog). In case you want to pin the version, use the example below:
|
||||
The above Dockerfile snippet installs the latest `mkdocs-techdocs-core` package. Version numbers can be found in the corresponding [changelog](https://github.com/backstage/mkdocs-techdocs-core#changelog). In case you want to pin the version, use the example below:
|
||||
|
||||
```Dockerfile
|
||||
RUN pip3 install mkdocs-techdocs-core==1.2.3
|
||||
|
||||
@@ -138,8 +138,11 @@ export default techdocsPlugin.withOverrides({
|
||||
PageBlueprint.make({
|
||||
params: {
|
||||
path: '/docs',
|
||||
loader: () =>
|
||||
import('./CustomTechDocsHome').then(m => <m.CustomTechDocsHome />),
|
||||
routeRef: techdocsPlugin.routes.root,
|
||||
loader: async () => {
|
||||
const { CustomTechDocsHome } = await import('./CustomTechDocsHome');
|
||||
return <CustomTechDocsHome />;
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user