{{ define "helm-metadata" }} {{/* Renders parsed Chart.yaml metadata as a description list. Expects a HelmChartMeta value. Rows are skipped silently when fields are empty so sparse charts don't render with a wall of "—" cells. */}}
{{ if .Description }}

Description

{{ .Description }}

{{ end }}
{{ if .Type }}
Type
{{ .Type }}
{{ end }} {{ if .AppVersion }}
App version
{{ .AppVersion }}
{{ end }} {{ if .KubeVersion }}
Kube version
{{ .KubeVersion }}
{{ end }} {{ if .Home }}
Home
{{ if or (hasPrefix .Home "http://") (hasPrefix .Home "https://") }} {{ .Home }} {{ else }} {{/* Non-http schemes (oci://, etc.) get sanitized to #ZgotmplZ in href context. Render as plain text so the user can still see and copy the value. */}} {{ .Home }} {{ end }}
{{ end }} {{ if .Sources }}
Sources
{{ range .Sources }}
{{ if or (hasPrefix . "http://") (hasPrefix . "https://") }} {{ . }} {{ else }} {{ . }} {{ end }}
{{ end }}
{{ end }} {{ if .Keywords }}
Keywords
{{ range .Keywords }}{{ . }}{{ end }}
{{ end }} {{ if .Maintainers }}
Maintainers
{{ range .Maintainers }}
{{ if and .URL (or (hasPrefix .URL "http://") (hasPrefix .URL "https://")) }} {{ if .Name }}{{ .Name }}{{ else }}{{ .URL }}{{ end }} {{ else if .Name }} {{ .Name }} {{ else if .URL }} {{ .URL }} {{ end }} {{ if .Email }}<{{ .Email }}>{{ end }}
{{ end }}
{{ end }}
{{ if .Dependencies }}

Dependencies

{{ range .Dependencies }} {{ end }}
Name Version Repository
{{ .Name }}{{ if .Alias }} ({{ .Alias }}){{ end }} {{ .Version }} {{ if .Repository }} {{ if or (hasPrefix .Repository "http://") (hasPrefix .Repository "https://") }} {{ .Repository }} {{ else }} {{/* oci://, file://, etc. — render as code so it's copyable. */}} {{ .Repository }} {{ end }} {{ end }}
{{ end }}
{{ end }}