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

custom template not defined error #180

Open
podleaper opened this issue Apr 21, 2023 · 1 comment
Open

custom template not defined error #180

podleaper opened this issue Apr 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@podleaper
Copy link

I'm struggling to get custom template to work. I'm not sure if made a mistake somewhere or if this is a bug. I'm testing with the repo provided extra.flower.

podleaper@ml ~/dev
$ git clone https://github.com/norwoodj/helm-docs.git
Cloning into 'helm-docs'...
remote: Enumerating objects: 1549, done.
remote: Counting objects: 100% (512/512), done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 1549 (delta 351), reused 463 (delta 330), pack-reused 1037
Receiving objects: 100% (1549/1549), 3.78 MiB | 6.29 MiB/s, done.
Resolving deltas: 100% (837/837), done.

podleaper@ml ~/dev
$ cd helm-docs

podleaper@ml ~/dev/helm-docs (master)
$ cd example-charts/custom-template/

podleaper@ml ~/dev/helm-docs/example-charts/custom-template (master)
$ ls
Chart.yaml  README.md  README.md.gotmpl  requirements.yaml  values.yaml

podleaper@ml ~/dev/helm-docs/example-charts/custom-template (master)
$ rm README.md

podleaper@ml ~/dev/helm-docs/example-charts/custom-template (master)
$ helm-docs
INFO[2023-04-21T12:47:24-07:00] Found Chart directories [.]
INFO[2023-04-21T12:47:24-07:00] Generating README Documentation for chart .
WARN[2023-04-21T12:47:24-07:00] Error generating documentation for chart .: template: .:8:12: executing "." at <{{template "extra.flower" .}}>: template "extra.flower" not defined

podleaper@ml ~/dev/helm-docs/example-charts/custom-template (master)
$ cat README.md
# custom-template

Basically the same as the nginx-ingress chart, but using a custom template to include some other content

![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square)

## Additional Information
@Nepo26 Nepo26 added the bug Something isn't working label Jun 29, 2023
@Nepo26 Nepo26 added this to the General Cleanup milestone Jul 25, 2023
@dalwar23
Copy link

dalwar23 commented Feb 24, 2024

I had the same issue. I had to read the documentation again. Try the following, see if this helps

from helm-docs directory

helm-docs -c example-charts/ -t ./_templates.gotmpl -t README.md.gotmpl -g example-charts/custom-template

Or from example-cahrts directory

helm-docs -c . -t ./_templates.gotmpl -t README.md.gotmpl -g custom-template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants