Skip to content

Commit 864d707

Browse files
authored
reorganizing docs navigation for 2.2.0 and 2.2.1 (#86)
Signed-off-by: Michael Hoang <[email protected]>
1 parent 0f139a3 commit 864d707

18 files changed

+192
-117
lines changed

apps/registry-viewer/navigation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const footerNavigation: FooterNavigation = {
4545
{ name: 'Cloud Native Computing Foundation', href: 'https://www.cncf.io' },
4646
{ name: 'Registry', href: '/' },
4747
{ name: 'Documentation', href: `https://devfile.io/docs/${defaultVersion}/what-is-a-devfile` },
48+
{ name: 'Community', href: `https://devfile.io/docs/${defaultVersion}/community` },
4849
],
4950
social: [
5051
{

libs/docs/src/docs/2.2.0/adding-a-container-component.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ configuration of a container in a workspace using the `container` component type
121121
`infinity` argument depend on the base image used in the particular
122122
images.
123123

124-
All tools will respect the specified `command`. When `command`
125-
is not defined, the container will use the default from the
126-
image specified. When `command` is defined, it will override
127-
the one present in the image as intended. Either the
128-
`command` defined by the image or by the container component
129-
within the devfile must be non-terminating, such as the case
124+
All tools will respect the specified `command`. When `command`
125+
is not defined, the container will use the default from the
126+
image specified. When `command` is defined, it will override
127+
the one present in the image as intended. Either the
128+
`command` defined by the image or by the container component
129+
within the devfile must be non-terminating, such as the case
130130
of setting `command` to `sleep` with the `infinity` argument.
131131

132132
```yaml {% filename="devfile.yaml" %}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Overview
3+
description: Authoring devfile - Overview
4+
---
5+
6+
## Creating a minimal devfile
7+
8+
The `schemaVersion` attribute is mandatory in a devfile.
9+
10+
### Procedure
11+
12+
- Define the `schemaVersion` attribute in the devfile and specify a static name for the workspace with the `name` attribute.
13+
14+
```yaml {% title="Minimal devfile with schema version and name" filename="devfile.yaml" %}
15+
schemaVersion: <version>
16+
metadata:
17+
name: devfile-sample
18+
version: 0.0.1
19+
```
20+
21+
## Adding to a minimal devfile
22+
23+
See the following documents to help you add to the minimal devfile to suit your development needs:
24+
25+
- [Adding projects](./adding-projects)
26+
27+
- [Adding components](./adding-components)
28+
29+
- [Adding commands](./adding-commands)
30+
31+
- [Defining variables](./defining-variables)
32+
33+
- [Defining attributes](./defining-attributes)
34+
35+
- [Referring to a parent devfile in a devfile](./referring-to-a-parent-devfile)

libs/docs/src/docs/2.2.0/create-devfiles-with-templates.md renamed to libs/docs/src/docs/2.2.0/create-devfiles.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Creating devfiles with templates
3-
description: Creating devfiles with templates
2+
title: Creating devfiles
3+
description: Creating devfiles
44
---
55

66
Most dev tools can utilize the devfile registry to
@@ -25,10 +25,10 @@ building sample templates for common use cases.
2525
- `metadata` is optional but it is recommended to have in your
2626
templates
2727
```yaml {% title="Minimal Devfile" filename="devfile.yaml" %}
28-
schemaVersion: 2.2.0
28+
schemaVersion: <version>
2929
```
3030
```yaml {% title="Minimal Devfile with Metadata" filename="devfile.yaml" %}
31-
schemaVersion: 2.2.0
31+
schemaVersion: <version>
3232
metadata:
3333
name: devfile-sample
3434
version: 2.0.0
@@ -46,7 +46,7 @@ building sample templates for common use cases.
4646
the template
4747
- For improved readability on devfile registries, set `displayName` to the title that will be the display text for this template and `icon` to tie a stack icon to the template:
4848
```yaml
49-
schemaVersion: 2.2.0
49+
schemaVersion: <version>
5050
metadata:
5151
name: web-service
5252
version: 1.0.0
@@ -131,7 +131,7 @@ building sample templates for common use cases.
131131
```
132132
5. Completing the content, the complete devfile should look like the following:
133133
```yaml {% title="Complete Web Service Template" filename="devfile.yaml" %}
134-
schemaVersion: 2.2.0
134+
schemaVersion: <version>
135135
metadata:
136136
name: web-service
137137
version: 1.0.0

libs/docs/src/docs/2.2.0/defining-attributes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ Attributes can be defined at the top level of the devfile, or in the following o
4444
----
4545
```
4646

47-
2. Define a custom attribute in the `metadata` object.
47+
2. Define a custom attribute at the devfile level.
4848

4949
When no editor is specified, a default editor is provided. To represent this user-defined example, use the `editorFree` attribute as shown in the following example:
5050

5151
```yaml {% title="A devfile without an editor" %}
5252
----
5353
schemaVersion: 2.2.0
54+
attributes:
55+
editorFree: true
5456
metadata:
5557
name: petclinic-dev-environment
56-
attributes:
57-
editorFree: true
5858
components:
5959
- name: myapp
6060
kubernetes:

libs/docs/src/docs/2.2.0/innerloop-vs-outerloop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In a devfile spec, there are two scopes of deployment: innerloop and outerloop.
1919
- This example will use `nodejs-18` UBI image
2020

2121
```yaml
22-
schemaVersion: 2.2.0
22+
schemaVersion: <version>
2323
metadata:
2424
name: nodejs
2525
components:
@@ -119,7 +119,7 @@ In a devfile spec, there are two scopes of deployment: innerloop and outerloop.
119119
```
120120

121121
```yaml {% title="Final innerloop devfile" filename="devfile.yaml" %}
122-
schemaVersion: 2.2.0
122+
schemaVersion: <version>
123123
metadata:
124124
name: nodejs
125125
components:
@@ -255,7 +255,7 @@ The component and commands here allow the developer to build, run, debug, and te
255255
```
256256

257257
```yaml {% title="Final outerloop devfile" filename="devfile.yaml" %}
258-
schemaVersion: 2.2.0
258+
schemaVersion: <version>
259259
metadata:
260260
name: nodejs
261261
components:

libs/docs/src/docs/2.2.0/overriding-pod-and-container-attributes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This attribute can be defined at the component level.
1414
### Procedure
1515
1. Specify "container-overrides" at the component level.
1616
```yaml {% title="Specify container-overrides to override security context for container at component level" filename="devfile.yaml" %}
17-
schemaVersion: 2.2.0
17+
schemaVersion: <version>
1818
components:
1919
- name: maven
2020
attributes:
@@ -43,7 +43,7 @@ This attribute can be defined at the component and devfile attributes levels. If
4343
### Procedure
4444
1. Specify "pod-overrides" at the component level.
4545
```yaml {% title="Specify pod-overrides to override security context for container at component level" filename="devfile.yaml" %}
46-
schemaVersion: 2.2.0
46+
schemaVersion: <version>
4747
components:
4848
- name: maven
4949
attributes:
@@ -56,7 +56,7 @@ This attribute can be defined at the component and devfile attributes levels. If
5656

5757
2. Specify "pod-overrides" at the devfile attributes level. It will be defined as a top-level attribute.
5858
```yaml {% title="Specify pod-overrides to override resources for container at the devfile level" filename="devfile.yaml" %}
59-
schemaVersion: 2.2.0
59+
schemaVersion: <version>
6060
attributes:
6161
pod-overrides:
6262
spec:

libs/docs/src/docs/2.2.0/packaging-devfile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Packaging devfile
55

66
## Creating a devfile
77

8-
To create a devfile, you can [start from scratch](./create-devfiles-with-templates) or use the [public community devfile registry](https://registry.devfile.io/viewer) to find predefined stacks for popular languages and frameworks. Once you have a devfile, save it as `.devfile.yaml` to your application’s root directory.
8+
To create a devfile, you can [start from scratch](./create-devfiles) or use the [public community devfile registry](https://registry.devfile.io/viewer) to find predefined stacks for popular languages and frameworks. Once you have a devfile, save it as `.devfile.yaml` to your application’s root directory.
99

1010
## Resources to include with your devfile
1111

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Overview
3+
description: Authoring devfile - Overview
4+
---
5+
6+
## Creating a minimal devfile
7+
8+
The `schemaVersion` attribute is mandatory in a devfile.
9+
10+
### Procedure
11+
12+
- Define the `schemaVersion` attribute in the devfile and specify a static name for the workspace with the `name` attribute.
13+
14+
```yaml {% title="Minimal devfile with schema version and name" filename="devfile.yaml" %}
15+
schemaVersion: <version>
16+
metadata:
17+
name: devfile-sample
18+
version: 0.0.1
19+
```
20+
21+
## Adding to a minimal devfile
22+
23+
See the following documents to help you add to the minimal devfile to suit your development needs:
24+
25+
- [Adding projects](./adding-projects)
26+
27+
- [Adding components](./adding-components)
28+
29+
- [Adding commands](./adding-commands)
30+
31+
- [Defining variables](./defining-variables)
32+
33+
- [Defining attributes](./defining-attributes)
34+
35+
- [Referring to a parent devfile in a devfile](./referring-to-a-parent-devfile)

libs/docs/src/docs/2.2.1-alpha/create-devfiles-with-templates.md renamed to libs/docs/src/docs/2.2.1-alpha/create-devfiles.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Creating devfiles with templates
3-
description: Creating devfiles with templates
2+
title: Creating devfiles
3+
description: Creating devfiles
44
---
55

66
Most dev tools can utilize the devfile registry to
@@ -25,10 +25,10 @@ building sample templates for common use cases.
2525
- `metadata` is optional but it is recommended to have in your
2626
templates
2727
```yaml {% title="Minimal Devfile" filename="devfile.yaml" %}
28-
schemaVersion: 2.2.1
28+
schemaVersion: <version>
2929
```
3030
```yaml {% title="Minimal Devfile with Metadata" filename="devfile.yaml" %}
31-
schemaVersion: 2.2.1
31+
schemaVersion: <version>
3232
metadata:
3333
name: devfile-sample
3434
version: 2.0.0
@@ -46,7 +46,7 @@ building sample templates for common use cases.
4646
the template
4747
- For improved readability on devfile registries, set `displayName` to the title that will be the display text for this template and `icon` to tie a stack icon to the template:
4848
```yaml
49-
schemaVersion: 2.2.1
49+
schemaVersion: <version>
5050
metadata:
5151
name: web-service
5252
version: 1.0.0
@@ -131,7 +131,7 @@ building sample templates for common use cases.
131131
```
132132
5. Completing the content, the complete devfile should look like the following:
133133
```yaml {% title="Complete Web Service Template" filename="devfile.yaml" %}
134-
schemaVersion: 2.2.1
134+
schemaVersion: <version>
135135
metadata:
136136
name: web-service
137137
version: 1.0.0

0 commit comments

Comments
 (0)