skenny@scss.tcd.ie writes:
I've found that dropping files in to the templates directory is a simple and convenient way to make certain things happen. E.g. I can set a default footer for all posts by putting the desired content in a file called var/templates/site/en/list:member:generic:footer.txt.
I'm running Mailman 3 in maxking's Docker container. I'm also using Puppet to do as much configuration as possible, so I'd like to add a comment to the file that reads something like: # This file is managed by Puppet.
This is a pure comment, right? I mean, Puppet doesn't pay any attention to it, that's just so you don't go editing that file.
As Mark says, there's no supported way to add comments to a template. But as a horrifying hack, assuming a pure comment, one could add the key 'This_file_is_managed_by_Puppet' with value "" to the dict used for template rendering. Then your file would look like
${This_file_is_managed_by_Puppet}\
This is the original text of the template string.
I'm not sure if the \-newline hack would actually work. You might need to accept an initial newline in the rendered text, or have a long first line like
${This_file_is_managed_by_Puppet}This is the original text of the template string.
It's probably too ugly for prime time, but thinking about hacks like this give me joy. ;-)