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

Make use of text/template blocks in templates for easier overriding #706

Open
jason-johnson opened this issue Sep 14, 2023 · 0 comments
Open

Comments

@jason-johnson
Copy link

jason-johnson commented Sep 14, 2023

What problem are you facing?

The templates are very strictly hard coded and if you want to change something simple you have to completely rewrite most of the template. I believe a very large portion of the issues and pull requests are actually symptoms of this issue. People are trying to add code or modify the default templates to add things because there is no simple way to do simple overrides.

I think the concept of the tool and usage of golang text/templates is really great but it's missing a few things to help people make more powerful use of the mechanism.

EDIT: Further, if blocks were set up nicely, it would be possible for the user to define override blocks once that would work with all formatters.

How could terraform-docs help solve your problem?

Change the templates to make use of blocks in places that are likely to want to be overridden (e.g. how is a resource displayed?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant