You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/cli/commands/docs/docs-generate.mdx
+51-39
Original file line number
Diff line number
Diff line change
@@ -10,40 +10,40 @@ import Screengrab from '@site/src/components/Screengrab'
10
10
:::note Purpose
11
11
12
12
Use this command to generate one of your documentation artifacts (e.g. a README) as defined by the **named** section under `docs.generate.<KEY>` in `atmos.yaml`.
13
+
13
14
Replace `<KEY>` with the name of the section you want to run (for example, `readme`, `release-notes`, etc.).
14
15
15
16
:::
16
17
17
18
In `atmos.yaml`, you can define **one or more** documentation‐generation blocks under `docs.generate`. Each top‐level key becomes a CLI argument:
18
19
19
-
```yaml
20
-
docs:
21
-
generate:
22
-
readme:
23
-
base-dir: .
24
-
input:
25
-
- "./README.yaml"
26
-
template: "https://…/README.md.gotmpl"
27
-
output: "./README.md"
28
-
terraform:
29
-
source: src/
30
-
enabled: false
31
-
format: "markdown"
32
-
show_providers: false
33
-
show_inputs: true
34
-
show_outputs: true
35
-
sort_by: "name"
36
-
hide_empty: false
37
-
indent_level: 2
38
-
39
-
release-notes:
40
-
base-dir: .
41
-
input:
42
-
- "./CHANGELOG.yaml"
43
-
template: "./release-notes.gotmpl"
44
-
output: "./RELEASE_NOTES.md"
45
-
46
-
```
20
+
```yaml
21
+
docs:
22
+
generate:
23
+
readme:
24
+
base-dir: .
25
+
input:
26
+
- "./README.yaml"
27
+
template: "https://.../README.md.gotmpl"
28
+
output: "./README.md"
29
+
terraform:
30
+
source: src/
31
+
enabled: false
32
+
format: "markdown"
33
+
show_providers: false
34
+
show_inputs: true
35
+
show_outputs: true
36
+
sort_by: "name"
37
+
hide_empty: false
38
+
indent_level: 2
39
+
40
+
release-notes:
41
+
base-dir: .
42
+
input:
43
+
- "./CHANGELOG.yaml"
44
+
template: "./release-notes.gotmpl"
45
+
output: "./RELEASE_NOTES.md"
46
+
```
47
47
48
48
For each CLI argument the command combines all local or remote YAML files specified at `input` and template file then generates the documentation artifact at the respective `output` folder. In case the template contains `terraform_docs` key, e.g.
49
49
@@ -66,8 +66,6 @@ Extra info: {{ $data.extra_info }}
66
66
```
67
67
the resultant file will also have a corresponding section rendered. By default `terraform.format` is set to `markdown table`, and can also be `markdown`, `tfvars hcl`, and `tfvars json`.
68
68
69
-
:::
70
-
71
69
## Dynamic Keys
72
70
73
71
If you add a new key under docs.generate—say readme2 or release-notes —you simply pass that key to the CLI:
0 commit comments