Skip to content

Commit

Permalink
📝 Add chart icons to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jan 26, 2023
1 parent f148b0b commit d620ef5
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 10 deletions.
2 changes: 2 additions & 0 deletions charts/bookstack/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# bookstack

<img src="https://media.githubusercontent.com/media/BookStackApp/website/main/static/images/logo.png" align="right" width="92" height="92" alt="bookstack logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: version-v22.11.1](https://img.shields.io/badge/AppVersion-version--v22.11.1-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/borgmatic/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# borgmatic

<img src="https://raw.githubusercontent.com/borgmatic-collective/borgmatic/1.6.6/docs/static/borgmatic.svg" align="right" width="92" height="92" alt="borgmatic logo" style="padding-left: 20px">

![Version: 0.5.3](https://img.shields.io/badge/Version-0.5.3-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 1.7.5](https://img.shields.io/badge/AppVersion-1.7.5-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/changedetection-io/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# changedetection-io

<img src="https://raw.githubusercontent.com/gabe565/charts/main/charts/changedetection-io/icon.png" align="right" width="92" height="92" alt="changedetection-io logo" style="padding-left: 20px">

![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 0.40.1.1](https://img.shields.io/badge/AppVersion-0.40.1.1-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/flame/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# flame

<img src="https://raw.githubusercontent.com/pawelmalak/flame/4ed29fe276b4282c67415f9788660df2a3a69b5c/client/public/icons/apple-touch-icon-180x180.png" align="right" width="92" height="92" alt="flame logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: multiarch2.3.0](https://img.shields.io/badge/AppVersion-multiarch2.3.0-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/hammond/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# hammond

<img src="https://raw.githubusercontent.com/akhilrex/hammond/84cba2c7f26f6d3f81c49b132110b24ac97c7b49/ui/public/touch-icon.png" align="right" width="92" height="92" alt="hammond logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/headscale/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# headscale

<img src="https://raw.githubusercontent.com/juanfont/headscale/641c6fd439a915150db3c2e83928e289b7e0c9d2/docs/logo/headscale3-dots.png" align="right" width="92" height="92" alt="headscale logo" style="padding-left: 20px">

![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 0.18.0](https://img.shields.io/badge/AppVersion-0.18.0-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/homer/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# homer

<img src="https://raw.githubusercontent.com/bastienwirtz/homer/5418c6291a39d27aeee471673adba742080e1ccb/public/logo.png" align="right" width="92" height="92" alt="homer logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: v22.11.2](https://img.shields.io/badge/AppVersion-v22.11.2-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/miniflux/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# miniflux

<img src="https://raw.githubusercontent.com/miniflux/logo/40cb83cc5b190212ad29fb4d5db6b52b335e4dc2/icon.svg" align="right" width="92" height="92" alt="miniflux logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 2.0.41](https://img.shields.io/badge/AppVersion-2.0.41-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/mnemonic-ninja/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# mnemonic-ninja

<img src="https://raw.githubusercontent.com/gabe565/mnemonic-ninja/20b5c559fb0147c5f3c0c1cc5a3841d371259b78/frontend/src/assets/logo.svg" align="right" width="92" height="92" alt="mnemonic-ninja logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/monica/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# monica

<img src="https://raw.githubusercontent.com/monicahq/monica/main/public/img/monica.svg" align="right" width="92" height="92" alt="monica logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 3.7.0-fpm-alpine](https://img.shields.io/badge/AppVersion-3.7.0--fpm--alpine-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/nightscout/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# nightscout

<img src="https://raw.githubusercontent.com/nightscout/cgm-remote-monitor/71c2363b7be387cda899669be2bfd6ddbfe70198/static/images/large.png" align="right" width="92" height="92" alt="nightscout logo" style="padding-left: 20px">

![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 14.2.6](https://img.shields.io/badge/AppVersion-14.2.6-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/pictshare/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pictshare

<img src="https://camo.githubusercontent.com/6efdab1c63d518fafc5e735001c5ed45e7cbd4958952cdd972e2630eee881d97/68747470733a2f2f7069637473686172652e6e65742f706868796e6a2e706e67" align="right" width="92" height="92" alt="pictshare logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 72394f17](https://img.shields.io/badge/AppVersion-72394f17-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/portfolio/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# portfolio

<img src="https://raw.githubusercontent.com/gabe565/portfolio/0f0e80ce2f29e9382a64e7fc6fe2ed1a9993971b/public/android-chrome-512x512.png" align="right" width="92" height="92" alt="portfolio logo" style="padding-left: 20px">

![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/relax-sounds/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# relax-sounds

<img src="https://raw.githubusercontent.com/gabe565/relax-sounds/93681cad1585cd14203a39c6b3c5de525f30619e/frontend/public/img/icons/android-chrome-512x512.png" align="right" width="92" height="92" alt="relax-sounds logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/rss-bridge/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# rss-bridge

<img src="https://raw.githubusercontent.com/RSS-Bridge/rss-bridge/987f42d6d44cc18e5c33441e742d15ffff6feb72/static/favicon.png" align="right" width="92" height="92" alt="rss-bridge logo" style="padding-left: 20px">

![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/rsshub/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# rsshub

<img src="https://camo.githubusercontent.com/79f2dcf6fb41b71619186b12eed25495fa55e20d3f21355798a2cb22703c6f8b/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30342f32332f356362656237653431343134632e706e67" align="right" width="92" height="92" alt="rsshub logo" style="padding-left: 20px">

![Version: 0.2.3](https://img.shields.io/badge/Version-0.2.3-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/smarter-device-manager/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# smarter-device-manager

<img src="https://gitlab.com/uploads/-/system/group/avatar/6339043/ARM1636_Project_Logo_ST2_RGB_V1.png" align="right" width="92" height="92" alt="smarter-device-manager logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: v1.20.11](https://img.shields.io/badge/AppVersion-v1.20.11-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/tandoor/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# tandoor

<img src="https://raw.githubusercontent.com/vabene1111/recipes/master/docs/logo_color.svg" align="right" width="92" height="92" alt="tandoor logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 1.4.5](https://img.shields.io/badge/AppVersion-1.4.5-informational?style=flat-square)
Expand Down
2 changes: 2 additions & 0 deletions charts/vaultwarden/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# vaultwarden

<img src="https://raw.githubusercontent.com/dani-garcia/vaultwarden/7cb19ef767142b773ab44a457940844589432a74/src/static/images/vaultwarden-icon.png" align="right" width="92" height="92" alt="vaultwarden logo" style="padding-left: 20px">

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![AppVersion: 1.27.0-alpine](https://img.shields.io/badge/AppVersion-1.27.0--alpine-informational?style=flat-square)
Expand Down
31 changes: 21 additions & 10 deletions hack/gen-helm-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ command -v helm-docs >/dev/null 2>&1 || {
exit 1
}

# require yq
command -v yq >/dev/null 2>&1 || {
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
exit 1
}

# Absolute path of repository
repository="$(git rev-parse --show-toplevel)"
charts_folder="$repository/charts"

# Templates to copy into each chart directory
readme_template="$repository/hack/templates/README.md.gotmpl"
readme_config_template="$repository/hack/templates/README_CONFIG.md.gotmpl"
template_dir="$repository/hack/templates"
readme_config_template="$template_dir/README_CONFIG.md.gotmpl"
icon_template=$(<"$template_dir/icon.gotmpl")

# Gather all charts using the common library, excluding common-test
charts="$(find "$charts_folder" -name Chart.yaml)"
Expand All @@ -33,15 +40,19 @@ else
root="$charts_folder"
fi

for chart in $charts; do
for chart in $charts; do (
chart_directory="$(dirname "$chart")"
echo "-] Copying templates to $chart_directory"
icon="$(yq eval '.icon // ""' "$chart" 2>/dev/null)"

# Copy CONFIG template to each Chart directory, do not overwrite if exists
cp -n "$readme_config_template" "$chart_directory" || true
done

# Run helm-docs for charts using the common library and the common library itself
helm-docs \
--template-files="$readme_template" \
--template-files="$(basename "$readme_config_template")" \
--chart-search-root="$root"
# Run helm-docs for charts
helm-docs \
--log-level=warning \
--template-files="$template_dir/README.md.gotmpl" \
--template-files=<(echo "${icon_template/\$ICON/$icon}") \
--template-files="$(basename "$readme_config_template")" \
--chart-search-root="$root" \
--chart-to-generate="$chart_directory"
) done
1 change: 1 addition & 0 deletions hack/templates/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -
{{- end -}}

{{ template "chart.header" . }}
{{ template "custom.chart.icon" . -}}

{{ template "chart.versionBadge" . }}
{{ template "chart.typeBadge" . }}
Expand Down
7 changes: 7 additions & 0 deletions hack/templates/icon.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{- define "custom.chart.icon" -}}
{{- $icon := "$ICON" -}}
{{- if $icon -}}
<img src="{{ $icon }}" align="right" width="92" height="92" alt="{{ template "chart.name" . }} logo" style="padding-left: 20px">

{{ end -}}
{{- end -}}

0 comments on commit d620ef5

Please sign in to comment.