Skip to content

Commit 90056b2

Browse files
authored
Merge pull request #1297 from awanlin/topic/more-mermaid
Add back Mermaid and add ore examples
2 parents cb2155d + 212c015 commit 90056b2

File tree

9 files changed

+1379
-41
lines changed

9 files changed

+1379
-41
lines changed

docs/examples/mermaid-github.md

Lines changed: 626 additions & 0 deletions
Large diffs are not rendered by default.

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Current examples:
1414
- [iframe](./examples/iframe.md): this shows how you can use an iframe in your TechDocs
1515
- [Lists](./examples/lists.md): this showcases how to setup your lists in TechDocs
1616
- [Mermaid](./examples/mermaid.md): this showcases how to use Mermaid diagrams in your TechDocs
17+
- [Mermaid GitHub](./examples/mermaid-github.md): this showcases how to use Mermaid diagrams supported by GitHub in your TechDocs
1718
- [PlantUML](./examples/plantuml.md): this showcases how to use PlantUML diagrams in your TechDocs

packages/app-migrated/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@backstage/ui": "backstage:^",
4444
"@material-ui/core": "^4.11.0",
4545
"@material-ui/icons": "^4.9.1",
46+
"backstage-plugin-techdocs-addon-mermaid": "^0.25.0",
4647
"react": "^18.2.0",
4748
"react-dom": "^18.2.0",
4849
"react-router": "^6.3.0",

packages/app-migrated/src/App.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ import {
5656
ReportIssue,
5757
TextSize,
5858
} from '@backstage/plugin-techdocs-module-addons-contrib';
59-
// TODO:(awanlin) enabled once TypeScript errors are resolved
60-
// https://github.com/johanneswuerbach/backstage-plugin-techdocs-addon-mermaid/issues/78
61-
// import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
59+
import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
6260
import { SignalsDisplay } from '@backstage/plugin-signals';
6361
import { NotificationSettings } from './components/settings/NotificationSettings';
6462

@@ -129,6 +127,7 @@ const routes = (
129127
<LightBox />
130128
<ReportIssue />
131129
<TextSize />
130+
<Mermaid />
132131
</TechDocsAddons>
133132
</Route>
134133

packages/app-migrated/src/components/catalog/EntityPage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ import {
7171
TextSize,
7272
} from '@backstage/plugin-techdocs-module-addons-contrib';
7373
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
74-
// TODO:(awanlin) enabled once TypeScript errors are resolved
75-
// https://github.com/johanneswuerbach/backstage-plugin-techdocs-addon-mermaid/issues/78
76-
// import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
74+
import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
7775

7876
const EntityLayoutWrapper = (props: { children?: React.ReactNode }) => {
7977
const [badgesDialogOpen, setBadgesDialogOpen] = useState(false);
@@ -171,6 +169,7 @@ const techdocsContentWithAddons = (
171169
<LightBox />
172170
<ReportIssue />
173171
<TextSize />
172+
<Mermaid />
174173
</TechDocsAddons>
175174
</EntityTechdocsContent>
176175
);

packages/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@backstage/ui": "backstage:^",
4141
"@material-ui/core": "^4.11.0",
4242
"@material-ui/icons": "^4.9.1",
43+
"backstage-plugin-techdocs-addon-mermaid": "^0.25.0",
4344
"react": "^18.2.0",
4445
"react-dom": "^18.2.0",
4546
"react-router": "^6.3.0",

packages/app/src/App.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ import {
5757
ReportIssue,
5858
TextSize,
5959
} from '@backstage/plugin-techdocs-module-addons-contrib';
60-
// TODO:(awanlin) enabled once TypeScript errors are resolved
61-
// https://github.com/johanneswuerbach/backstage-plugin-techdocs-addon-mermaid/issues/78
62-
// import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
60+
import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
6361
import { SignalsDisplay } from '@backstage/plugin-signals';
6462
import { NotificationSettings } from './components/settings/NotificationSettings';
6563
import {
@@ -186,6 +184,7 @@ const routes = (
186184
<LightBox />
187185
<ReportIssue />
188186
<TextSize />
187+
<Mermaid />
189188
</TechDocsAddons>
190189
</Route>
191190
;

packages/app/src/components/catalog/EntityPage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ import {
7171
TextSize,
7272
} from '@backstage/plugin-techdocs-module-addons-contrib';
7373
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
74-
// TODO:(awanlin) enabled once TypeScript errors are resolved
75-
// https://github.com/johanneswuerbach/backstage-plugin-techdocs-addon-mermaid/issues/78
76-
// import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
74+
import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
7775

7876
const EntityLayoutWrapper = (props: { children?: React.ReactNode }) => {
7977
const [badgesDialogOpen, setBadgesDialogOpen] = useState(false);
@@ -171,6 +169,7 @@ const techdocsContentWithAddons = (
171169
<LightBox />
172170
<ReportIssue />
173171
<TextSize />
172+
<Mermaid />
174173
</TechDocsAddons>
175174
</EntityTechdocsContent>
176175
);

0 commit comments

Comments
 (0)