ytt icon indicating copy to clipboard operation
ytt copied to clipboard

Document how comments can be used with text templating.

Open GrahamDumpleton opened this issue 3 years ago • 1 comments

Describe the problem/challenge you have

I wanted to be able to have comments in file when using text templating, but couldn't find an example in the documentation. I therefore had to make an educated guess as to whether it was even possible and then work out how to do it.

Describe the solution you'd like

Add some documentation to:

  • https://carvel.dev/ytt/docs/v0.40.0/ytt-text-templating/

The example should include use of the space trim character so that don't get extraneous blank lines in the output.

(@ load("@ytt:data", "data") -@)
(@= data.values.workshop.title @)
(@= "="*len(data.values.workshop.title) @)

(@# Comment -@)
(@# Comment -@)
(@# Comment -@)

(@= data.values.workshop.description @)

Anything else you would like to add:

Nope.


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

GrahamDumpleton avatar Mar 15 '22 05:03 GrahamDumpleton

Recently, the same request came through as a question: https://kubernetes.slack.com/archives/CH8KCCKA5/p1646377927106589

pivotaljohn avatar Mar 17 '22 19:03 pivotaljohn