5 Commits

Author SHA1 Message Date
christophe.vandekerchove
78e94da786 fix: Replace <br> with <br /> for markdown syntax
<br /> provides additional support for XHTML without breaking
compatibility with HTML. This can be useful when trying to publish
documentation generated by terraform-docs to XHTML based solutions

Signed-off-by: christophe.vandekerchove <christophe.vandekerchove@scalepad.com>
2024-07-05 14:30:50 -04:00
Khosrow Moossavi
465dd14cff Make terraform.Module available in content
Add one extra special variable the `content`:

- `{{ .Module }}`

As opposed to the other variables, which are generated sections based on
a selected formatter, the `{{ .Module }}` variable is just a `struct`
representing a Terraform module.

It can be used to build highly complex and highly customized content:

```yaml
content: |-
  ## Resources

  {{ range .Module.Resources }}
  - {{ .GetMode }}.{{ .Spec }} ({{ .Position.Filename }}#{{ .Position.Line }})
  {{- end }}
```

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-10-04 20:01:44 -04:00
Khosrow Moossavi
f3c92384a1 Extract leading comments for resources and modules
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-09-29 13:55:50 -04:00
Khosrow Moossavi
bb109711a1 Deprecate Settings and Options in favor of Config
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-09-28 15:47:27 -04:00
Khosrow Moossavi
90942f73b8 Move format package from internal to public
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-09-28 14:43:26 -04:00