diff --git a/docs/README.md.gotmpl b/docs/README.md.gotmpl index b097e3f898ecae5c3bf9386c66507f4636acb4a5..ac8b5f8b06c016e62bc86c7792585b030143f073 100644 --- a/docs/README.md.gotmpl +++ b/docs/README.md.gotmpl @@ -8,10 +8,10 @@ {{ if or .Home .Sources }} ## Upstream References -{{- if .Home }} +{{ if .Home }} - <{{ template "chart.homepage" . }}> {{- end }} -{{ template "chart.sourcesList" . }} +{{- template "chart.sourcesList" . -}} {{ end }} {{ template "extra.upstreamReleaseNotesMarkdown" . }} diff --git a/docs/_templates.gotmpl b/docs/_templates.gotmpl index 9f58ae8a10fcb54ca8562ad5c567c8141308a818..87020fabbd039f0d74a95d4896923ebb96e661ce 100644 --- a/docs/_templates.gotmpl +++ b/docs/_templates.gotmpl @@ -5,6 +5,13 @@ {{ end }} {{ end }} +{{- define "chart.sourcesList" }} +{{- $chartYaml := (.Files.Get "Chart.yaml") | fromYaml }} +{{- range $chartYaml.sources }} +- <{{ . }}> +{{- end }} +{{- end }} + {{ define "extra.upstreamReleaseNotesMarkdown" }} {{ $chartYaml := (.Files.Get "Chart.yaml") | fromYaml }} {{ $defaultNotes := "This package has no upstream release note links on file. Please add some to [chart/Chart.yaml](chart/Chart.yaml) under `annotations.bigbang.dev/upstreamReleaseNotesMarkdown`.\nExample:\n```yaml\nannotations:\n bigbang.dev/upstreamReleaseNotesMarkdown: |\n - [Find our upstream chart's CHANGELOG here](https://link-goes-here/CHANGELOG.md)\n - [and our upstream application release notes here](https://another-link-here/RELEASE_NOTES.md)\n```" }}