Skip to content

Commit 8bcb458

Browse files
committed
feat: thanks shortcode
1 parent 6d6f2fc commit 8bcb458

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

docs/content/docs/product/thanks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Thanks to all [contributors](https://github.com/golangci/golangci-lint/graphs/co
99

1010
Thanks to developers and authors of used linters:
1111

12-
{.ThanksList}
12+
{{< thanks >}}
1313

1414
Thanks to [alecthomas/gometalinter](https://github.com/alecthomas/gometalinter) for inspiration and amazing work.
1515

docs/layouts/_shortcodes/thanks.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{- $thanks := index $.Site.Data.thanks -}}
2+
3+
<table>
4+
<thead>
5+
<tr>
6+
<th>Author</th>
7+
<th>Linter(s)</th>
8+
</tr>
9+
</thead>
10+
<tbody>
11+
{{- range $thanks }}
12+
<tr>
13+
<td>
14+
<a href="{{.profile}}">
15+
<figure>
16+
<img src="{{.avatar}}" style="max-width: 100%;" width="50px;" title="{{.name}}" alt="{{.name}}" loading="lazy">
17+
<figcaption>{{.name}}</figcaption>
18+
</figure>
19+
</a>
20+
</td>
21+
<td>
22+
{{ $len := (len .linters) }}
23+
{{- range $i, $v := .linters -}}
24+
<code>{{ $v }}</code>{{ if not (eq (add $i 1) $len) -}}, {{ end -}}
25+
{{- end -}}
26+
</td>
27+
</tr>
28+
{{- end -}}
29+
</tbody>
30+
</table>

0 commit comments

Comments
 (0)