Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect indentations in terraform registry doc #953

Closed
zmingxie opened this issue Jan 23, 2024 · 3 comments · Fixed by #961
Closed

Incorrect indentations in terraform registry doc #953

zmingxie opened this issue Jan 23, 2024 · 3 comments · Fixed by #961
Labels
👶 good first issue Good for newcomers 🐛 bug Something isn't working 🙏 help wanted Extra attention is needed

Comments

@zmingxie
Copy link
Contributor

Describe the bug

I'm trying to follow the documentation on Terraform Registry, and I found some sections aren't indented correctly. E.g. https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_container#type
image

However, when I check the code here, it looks correct: https://github.com/bpg/terraform-provider-proxmox/blob/main/docs/resources/virtual_environment_container.md?plain=1#L188-L197

It seems to be an issue with the doc-gen tool, but I'm not sure how the CI is set up for publishing this. The wrong indentations are making the documentation more difficult to follow.

Hopefully, we can find a quick fix for it. Thanks!

To Reproduce
Steps to reproduce the behavior:

  • Already included within the description
@zmingxie zmingxie added the 🐛 bug Something isn't working label Jan 23, 2024
@bpg
Copy link
Owner

bpg commented Jan 24, 2024

Thanks @zmingxie, good catch!

I noticed wrong rendering in few other places as well.

The documentation pages are rendered from the markdown by Terraform Registry itself. And the syntax they are using is a bit different from a standard (or GitHub :) markdown.

Based on testing via https://registry.terraform.io/tools/doc-preview it looks like lists should be using double indentation.

@bpg bpg added 👶 good first issue Good for newcomers 🙏 help wanted Extra attention is needed labels Jan 24, 2024
@zmingxie
Copy link
Contributor Author

Thanks @zmingxie, good catch!

I noticed wrong rendering in few other places as well.

The documentation pages are rendered from the markdown by Terraform Registry itself. And the syntax they are using is a bit different from a standard (or GitHub :) markdown.

Based on testing via https://registry.terraform.io/tools/doc-preview it looks like lists should be using double indentation.

Yes, I can reproduce the issue using the doc-preview too. However, I'm not sure what you mean by "double indentation" to fix it. Could you give me an example? I'm happy to review the doc and update all if you can show me the proper way. Thanks!

@bpg
Copy link
Owner

bpg commented Jan 26, 2024

Thanks for offering help! ❤️

This change did the trick:

 ## Argument Reference
 
 - `clone` - (Optional) The cloning configuration.
-  - `datastore_id` - (Optional) The identifier for the target datastore.
-  - `node_name` - (Optional) The name of the source node (leave blank, if
-      equal to the `node_name` argument).
-  - `vm_id` - (Required) The identifier for the source container.
+    - `datastore_id` - (Optional) The identifier for the target datastore.
+    - `node_name` - (Optional) The name of the source node (leave blank, if
+        equal to the `node_name` argument).
+    - `vm_id` - (Required) The identifier for the source container.
 - `console` - (Optional) The console configuration.
-  - `enabled` - (Optional) Whether to enable the console device (defaults
-      to `true`).
-  - `mode` - (Optional) The console mode (defaults to `tty`).
-    - `console` - Console.
-    - `shell` - Shell.
-    - `tty` - TTY.
-  - `tty_count` - (Optional) The number of available TTY (defaults to `2`).
+    - `enabled` - (Optional) Whether to enable the console device (defaults
+        to `true`).
+    - `mode` - (Optional) The console mode (defaults to `tty`).
+        - `console` - Console.
+        - `shell` - Shell.
+        - `tty` - TTY.
+    - `tty_count` - (Optional) The number of available TTY (defaults to `2`).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👶 good first issue Good for newcomers 🐛 bug Something isn't working 🙏 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants