chore(techdocs): add changeset files
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Create a menu in the sub header of documentation pages, it is responsible for rendering TechDocs addons that allow users to customize their reading experience.
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-react': patch
|
||||
---
|
||||
|
||||
Create a new addon location called "Settings", it is designed for addons that allow users to customize the reading experience in documentation pages.
|
||||
|
||||
Usage example:
|
||||
|
||||
```tsx
|
||||
const TextSize = techdocsModuleAddonsContribPlugin.provide(
|
||||
createTechDocsAddonExtension({
|
||||
name: 'TextSize',
|
||||
location: TechDocsAddonLocations.Settings,
|
||||
component: TextSizeAddon,
|
||||
}),
|
||||
);
|
||||
```
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-module-addons-contrib': patch
|
||||
---
|
||||
|
||||
Create a TechDocs `<TextSize/>` addon that allows users to set a font size in the browser's local storage for the text of documentation pages.
|
||||
|
||||
Here's an example on how to use it in a Backstage app:
|
||||
|
||||
```diff
|
||||
import {
|
||||
DefaultTechDocsHome,
|
||||
TechDocsIndexPage,
|
||||
TechDocsReaderPage,
|
||||
} from '@backstage/plugin-techdocs';
|
||||
import { TechDocsAddons } from '@backstage/plugin-techdocs-react/alpha';
|
||||
+import { TextSize } from '@backstage/plugin-techdocs-module-addons-contrib';
|
||||
|
||||
const AppRoutes = () => {
|
||||
<FlatRoutes>
|
||||
// other plugin routes
|
||||
<Route path="/docs" element={<TechDocsIndexPage />}>
|
||||
<DefaultTechDocsHome />
|
||||
</Route>
|
||||
<Route
|
||||
path="/docs/:namespace/:kind/:name/*"
|
||||
element={<TechDocsReaderPage />}
|
||||
>
|
||||
<TechDocsAddons>
|
||||
+ <TextSize />
|
||||
</TechDocsAddons>
|
||||
</Route>
|
||||
</FlatRoutes>;
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user