Skip to content

Commit 2bbf261

Browse files
committed
update templates
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
1 parent 1bf8bf3 commit 2bbf261

File tree

2 files changed

+89
-38
lines changed

2 files changed

+89
-38
lines changed

content_templates/template-how-to.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,30 @@ toc: true
99

1010
One sentence: what you will achieve.
1111

12-
{{< callout type="note" >}}
13-
**You will end up with**
12+
## You'll end up with
1413

1514
- A concrete outcome (artifact/config/state)
1615
- A verifiable success condition
17-
{{< /callout >}}
1816

1917
**Estimated time:** ~X minutes
2018

19+
## Workflow (optional)
20+
21+
Include a diagram only if it clarifies the process. Keep it simple (3–5 nodes max).
22+
23+
```mermaid
24+
flowchart LR
25+
A[Input] --> B[ocm command] --> C[Output]
26+
27+
style A fill:#e1f5ff,color:#000
28+
style B fill:#fff4e6,color:#000
29+
style C fill:#e8f5e9,color:#000
30+
```
31+
32+
One sentence explaining what this diagram shows.
33+
34+
See [Diagram Color Guide]({{< relref "content_templates/template-tutorial.md#diagram-color-guide" >}}) for consistent styling across all documentation.
35+
2136
## Prerequisites
2237

2338
- [OCM CLI]({{< relref "docs/getting-started/install.md" >}}) installed
@@ -135,14 +150,7 @@ Remove resources created:
135150

136151
## Next steps
137152

138-
{{< card-grid >}}
139-
{{< card link="docs/concepts/signing" title="Signing Concept" icon="shield-check" >}}
140-
Understand signature verification in OCM
141-
{{< /card >}}
142-
{{< card link="docs/tutorials/secure-supply-chain" title="Secure Supply Chain Tutorial" icon="graduation-cap" >}}
143-
Build a complete signing workflow
144-
{{< /card >}}
145-
{{< /card-grid >}}
153+
- [How-to: <name>]({{< relref "docs/how-to/<file>.md" >}})
146154

147155
## Related documentation
148156

@@ -167,4 +175,3 @@ and ensure the following:
167175
- [ ] Use `{{< tabs >}}` for variants (different approaches, platforms, configurations)
168176
- [ ] Troubleshooting with symptom-cause-fix
169177
- [ ] Working relref links
170-
- [ ] `{{< card-grid >}}` for "Next steps" navigation

content_templates/template-tutorial.md

Lines changed: 70 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,82 @@ hasMermaid: true
1414
```
1515
{{< /callout >}}
1616

17-
## Overview
18-
19-
Write 2–4 sentences that set the scene and explain *why* you would do this.
17+
Write 1–2 sentences that set the scene and explain *why* you would do this.
2018
Avoid deep background. Link to the relevant concept(s) instead.
2119

22-
**Estimated time:** ~X minutes
20+
## What You'll Learn
2321

24-
{{< callout type="note" >}}
25-
**What you'll learn**
22+
By the end of this tutorial, you will:
2623

2724
- What you can do by the end (outcome #1)
2825
- One key concept you will understand (outcome #2)
2926
- How to validate your success (outcome #3)
30-
{{< /callout >}}
3127

32-
{{< callout type="note" >}}
33-
**Audience & assumptions**
28+
## How It Works
3429

35-
- Who this tutorial is for (e.g., "You're an OCM CLI user who has already created a component version")
36-
- What we assume you already know
37-
{{< /callout >}}
30+
```mermaid
31+
flowchart LR
32+
A[Input/Start] -- "command" --> B[OCM Artifact]
33+
B -- "command" --> C[(Output/Registry)]
34+
35+
style A fill:#e1f5ff,color:#000
36+
style B fill:#fff4e6,color:#000
37+
style C fill:#e8f5e9,color:#000
38+
```
39+
40+
Write 1–2 sentences explaining the workflow shown in the diagram.
41+
42+
**Estimated time:** ~X minutes
43+
44+
### Diagram Style Guide
45+
46+
Choose the appropriate style for your diagram based on complexity and purpose:
47+
48+
#### Style 1: Minimal (Recommended for simple workflows)
49+
50+
Use **no colors** for clean, professional diagrams. Only highlight success/failure states when relevant:
51+
52+
```mermaid
53+
flowchart LR
54+
A[Input] --> B[Process]
55+
B --> C[Output]
56+
57+
style C fill:#dcfce7,color:#166534
58+
```
59+
60+
**When to use:**
61+
- Simple linear workflows (3-5 steps)
62+
- Clear structure that speaks for itself
63+
- No need to categorize different types of nodes
64+
65+
#### Style 2: Categorical (For complex workflows)
66+
67+
Use consistent colors to categorize different types of nodes. **Always include `color:#000`** in every style declaration to ensure readable text in dark mode.
68+
69+
```mermaid
70+
flowchart LR
71+
A[Input] --> B[OCM Component]
72+
B --> C[Output]
73+
74+
style A fill:#e1f5ff,color:#000
75+
style B fill:#fff4e6,color:#000
76+
style C fill:#e8f5e9,color:#000
77+
```
78+
79+
| Category | Color | Hex | Text Color | Usage |
80+
|----------|-------|-----|------------|-------|
81+
| Input/Start | Light blue | `#e1f5ff` | `#000` | Files, configs, starting points |
82+
| OCM Artifacts | Light orange | `#fff4e6` | `#000` | CTF, Component, Resource, Repository |
83+
| Kubernetes/Flux | Light purple | `#f3e5f5` | `#000` | OCIRepository, HelmRelease, Controllers |
84+
| Output/Result | Light green | `#e8f5e9` | `#000` | Deployed App, Registry, final state |
85+
| Success | Green | `#dcfce7` | `#166534` | ✓ Valid, Verified, Passed |
86+
| Failure | Red | `#fee2e2` | `#991b1b` | ✗ Invalid, Failed, Error |
87+
| Security/Keys | Light yellow | `#fef9c3` | `#000` | Private/Public keys, signatures |
88+
89+
**When to use:**
90+
- Complex workflows with multiple node types (6+ steps)
91+
- Need to distinguish between different categories
92+
- Multiple parallel flows or decision trees
3893

3994
## How It Works
4095

@@ -51,7 +106,7 @@ This gives learners a mental model before diving into steps.
51106

52107
## Prerequisites
53108

54-
- [OCM CLI]({{< relref "docs/getting-started/install.md" >}}) installed
109+
- [OCM CLI]({{< relref "docs/getting-started/ocm-cli-installation.md" >}}) installed
55110
- Access to required repositories/services (example: `ghcr.io`)
56111
- Any required credentials (example: GitHub token with package write access)
57112

@@ -262,17 +317,7 @@ rm component-constructor.yaml
262317

263318
## Next steps
264319

265-
{{< card-grid >}}
266-
{{< card link="docs/tutorials/transfer-component" title="Transfer a Component Version" icon="arrow-right" >}}
267-
Learn how to transfer your component to remote repositories
268-
{{< /card >}}
269-
{{< card link="docs/concepts/versioning" title="Component Versioning" icon="book" >}}
270-
Understand OCM's versioning strategy
271-
{{< /card >}}
272-
{{< card link="docs/how-to/add-resources" title="Add Multiple Resources" icon="puzzle" >}}
273-
See how to add Helm charts, images, and more
274-
{{< /card >}}
275-
{{< /card-grid >}}
320+
- [How-to: <name>]({{< relref "docs/how-to/<file>.md" >}})
276321

277322
## Related documentation
278323

@@ -285,7 +330,7 @@ See how to add Helm charts, images, and more
285330
## ✓ Before publishing
286331

287332
Make sure to comply to our [CONTRIBUTING guide](../CONTRIBUTING.md),
288-
check the [Tutorial Writing Checklist](../CONTRIBUTING.md#turorial-guide-checklist),
333+
check the [Tutorial Writing Checklist](../CONTRIBUTING.md#tutorial-guide-checklist),
289334
and ensure the following:
290335

291336
- [ ] Title describes what learner will accomplish
@@ -299,5 +344,4 @@ and ensure the following:
299344
- [ ] Success indicators after major steps
300345
- [ ] "What you've learned" summary
301346
- [ ] Troubleshooting for tutorial-specific issues
302-
- [ ] `{{< card-grid >}}` for "Next steps" navigation
303347
- [ ] Working `relref` links to Concepts for "why" questions

0 commit comments

Comments
 (0)