Files
terraform-docs/scripts/docs/format.tmpl
Khosrow Moossavi 304bce9bb0 Refactor docs to be published on website
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-02-23 17:28:12 -05:00

67 lines
1.0 KiB
Cheetah

---
title: "{{ .Name }}"
description: "{{ .Description }}."
menu:
docs:
parent: "{{ .Parent }}"
weight: {{ .Weight }}
toc: true
---
## Synopsis
{{ .Synopsis }}.
{{- if .Runnable -}}
{{ printf "\n" }}
```console
{{ .UseLine }}
```
{{- end }}
{{- if .Options -}}
{{ printf "\n" }}
## Options
```console
{{ .Options -}}
```
{{- end }}
{{- if .InheritedOptions -}}
{{ printf "\n" }}
## Inherited Options
```console
{{ .InheritedOptions -}}
```
{{- end }}
{{- if not .HasChildren -}}
{{ printf "\n" }}
## Example
Given the [`examples`][examples] module:
```shell
{{ .Usage }}
```
generates the following output:
{{ .Example }}
[examples]: https://github.com/terraform-docs/terraform-docs/tree/master/examples
{{- else -}}
{{ printf "\n" }}
## Subcommands
{{- printf "\n" -}}
{{- range .Subcommands -}}
{{- printf "\n" -}}
- [{{ .Name }}]({{"{{"}}< ref "{{ .Link }}" >{{"}}"}})
{{- range .Children -}}
{{ printf "\n " }}- [{{ .Name }}]({{"{{"}}< ref "{{ .Link }}" >{{"}}"}})
{{- end -}}
{{- end -}}
{{- end }}