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
The problem is that *.gotmpl is a go-template format, using {{...}} delimiters for template language.
And since helm charts are also go templates, and their documentation often lists helm/go template usage examples, during helm-docs processing a collision occurs between the actual helm-docs commands and the usual Markdown documentation of the helm charts.
In this case, helm-docs will dump on the first documentation yaml example.
The only solution is escaping, and it is abnormally complex/verbose/unreadable in go-template.
Although this solution works reliably, writing such a more complex documentation is unthinkable.
Expected Behavior
There can be several potential solutions:
(1)
In go-template those {{...}} delimiters are programmable, it should be possible to configure helm-docs to use other delimiters for the *.gotmpl source, and leave the {{...}} free for documentation purposes.
However, this option is not yet supported in helm-docs.
It should be relatively easy to add it to the helm-docs code and configuration.
(2)
Another option is to add support for including an external file to helm-docs, for example:
`this will load and include the file:
{{ template "helm-docs.include" "README.include.md" }}
tthis will generate the values section:
{{ template "chart.valuesSection" . }}`
Thank you.
Best regards,
Erik
The text was updated successfully, but these errors were encountered:
I think this is a reasonable ask. All that would be needed is to add a new command line argument for specifying the custom delimiters and then calling https://pkg.go.dev/text/template#Template.Delims on the template as we build it. Happy to look at a PR.
The problem is that *.gotmpl is a go-template format, using {{...}} delimiters for template language.
And since helm charts are also go templates, and their documentation often lists helm/go template usage examples, during helm-docs processing a collision occurs between the actual helm-docs commands and the usual Markdown documentation of the helm charts.
In this case, helm-docs will dump on the first documentation yaml example.
The only solution is escaping, and it is abnormally complex/verbose/unreadable in go-template.
Although this solution works reliably, writing such a more complex documentation is unthinkable.
Expected Behavior
There can be several potential solutions:
(1)
In go-template those {{...}} delimiters are programmable, it should be possible to configure helm-docs to use other delimiters for the *.gotmpl source, and leave the {{...}} free for documentation purposes.
However, this option is not yet supported in helm-docs.
It should be relatively easy to add it to the helm-docs code and configuration.
(2)
Another option is to add support for including an external file to helm-docs, for example:
`this will load and include the file:
{{ template "helm-docs.include" "README.include.md" }}
tthis will generate the values section:
{{ template "chart.valuesSection" . }}`
Thank you.
Best regards,
Erik
The text was updated successfully, but these errors were encountered: