Skip to content

Commit 20c8004

Browse files
committed
docs: mermaid support
1 parent c4f031b commit 20c8004

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

docs/_layouts/docs.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title | escape }}{% endif %}</title>
77
{% include links.html %}
88
{% include analytics.html %}
9+
910
</head>
1011
<body class="page">
1112
{% include navbar.html %}
@@ -20,6 +21,7 @@
2021
<article class="uk-article">
2122
{{ content }}
2223
</article>
24+
<script src="/assets/js/mermaid.min.js"></script>
2325
</div>
2426
</div>
2527
</div>

docs/assets/js/mermaid.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/js/mermaid.min.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/documentation/dependent-resources.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Dependent Resources Feature
33
description: Dependent Resources Feature
44
layout: docs
55
permalink: /docs/dependent-resources
6+
use_mermaid: true
67
---
78

89
# Dependent Resources
@@ -23,19 +24,7 @@ the `Deployment` controller.
2324
Controllers that deal with secondary resources typically need to perform the following steps, for
2425
each secondary resource:
2526

26-
```mermaid
27-
flowchart TD
28-
29-
A{Secondary resource exists?}
30-
A -- Yes --> match
31-
A -- No --> compute
32-
33-
compute[Compute desired state based on primary state] --> Create --> Done
34-
match{Matches desired state as defined by primary?}
35-
match -- Yes --> Done
36-
match -- No --> Update
37-
38-
```
27+
<div class="mermaid"> graph TD; A-->B; A-->C; </div>
3928

4029
While these steps are not difficult in and of themselves, there are some subtleties that can lead to
4130
bugs or sub-optimal code if not done right. As this process is pretty much similar for each

0 commit comments

Comments
 (0)