chore(techdocs): add changeset files

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2022-05-05 10:40:48 +02:00
parent c15fd74978
commit 52419be116
3 changed files with 56 additions and 0 deletions
+5
View File
@@ -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.
+17
View File
@@ -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,
}),
);
```
+34
View File
@@ -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>;
};
```