Skip to content

Commit cf0c74b

Browse files
committed
Switch documentation rendering to new style
1 parent 0e02b4e commit cf0c74b

File tree

1 file changed

+35
-12
lines changed

1 file changed

+35
-12
lines changed

charts/s3proxy/README.md.gotmpl

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,53 @@
2121

2222
## Installation
2323

24-
### Add the repository (if published)
25-
26-
```bash
27-
helm repo add s3proxy <REPO_URL>
28-
helm repo update
29-
```
30-
3124
### Install the chart
3225

3326
```bash
3427
# Install with default values (filesystem backend)
35-
helm install my-s3proxy ./{{ template "chart.name" . }}
28+
helm install my-s3proxy oci://ghcr.io/comet-ml/{{ template "chart.name" . }}
3629

3730
# Install with custom values
38-
helm install my-s3proxy ./{{ template "chart.name" . }} -f my-values.yaml
31+
helm install my-s3proxy oci://ghcr.io/comet-ml/{{ template "chart.name" . }} -f override-values.yaml
3932
```
4033

4134
## Configuration
4235

4336
The following section lists the configurable parameters of the {{ template "chart.name" . }} chart and their default values.
4437

45-
### General Parameters
46-
47-
{{ template "chart.valuesSection" . }}
38+
{{- define "renderMarkdownLine" }}
39+
{{- $code := (mustRegexReplaceAll "\x60([^\x60]*)\x60" . "<code>${1}</code>") }}
40+
{{- $italStar := (mustRegexReplaceAll `([^\*]|\*\*)\*([^ \*].*[^ \*]|[^ \*])\*([^\*]|\*\*)` $code "${1}<i>${2}</i>${3}") }}
41+
{{- $italScore := (mustRegexReplaceAll "( |__)_([^ _].*[^ _]|[^ _])_( |__)" $italStar "${1}<i>${2}</i>${3}") }}
42+
{{- $boldStar := (mustRegexReplaceAll `\*\*([^ \*].*[^ \*]|[^ \*])\*\*` $italScore "<b>${1}</b>") }}
43+
{{- $boldScore := (mustRegexReplaceAll "__([^ _].*[^ _]|[^ _])__" $boldStar "<b>${1}</b>") }}
44+
{{- $boldScore }}
45+
{{- end -}}
46+
47+
{{- define "chart.valuesTableHtml" }}
48+
*Scroll sideways to see all columns.*
49+
50+
<table>
51+
<thead>
52+
<th>Key</th>
53+
<th>Description</th>
54+
<th>Type</th>
55+
<th>Default</th>
56+
</thead>
57+
<tbody>
58+
{{- range .Values }}
59+
<tr>
60+
<td><code>{{ .Key }}</code></td>
61+
<td>{{ template "renderMarkdownLine" (default .AutoDescription .Description) }}</td>
62+
<td><code>{{ .Type }}</code></td>
63+
<td>{{ template "renderMarkdownLine" (default .AutoDefault .Default) }}</td>
64+
</tr>
65+
{{- end }}
66+
</tbody>
67+
</table>
68+
{{- end }}
69+
70+
{{ template "chart.valuesSectionHtml" . }}
4871

4972
## Usage Examples
5073

0 commit comments

Comments
 (0)