Skip to content

Commit

Permalink
Sort SPEC endorsers (#690)
Browse files Browse the repository at this point in the history
* Sort SPEC endorsers

* Also sort endorsed-by logos
  • Loading branch information
stefanv authored Oct 30, 2024
1 parent 20a8046 commit 1c4f1ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions layouts/partials/specs/spec_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
DRAFT
{{ else }}
{{- $endorsed_by := index .Params "endorsed-by" }}
{{- range $idx, $el := $endorsed_by }}
{{ $project_page := $.GetPage (printf "core-projects/%s" $el) }}
{{ $url := $project_page.RelPermalink }}
<a href="{{ $url }}">
<img title="{{ $project_page.Title }}" src="{{ $project_page.Params.avatar }}" class="icon"/>
</a>
{{ with $endorsed_by }}
{{- range $idx, $el := sort $endorsed_by }}
{{ $project_page := $.GetPage (printf "core-projects/%s" $el) }}
{{ $url := $project_page.RelPermalink }}
<a href="{{ $url }}">
<img title="{{ $project_page.Title }}" src="{{ $project_page.Params.avatar }}" class="icon"/>
</a>
{{- end }}
{{- end }}
{{- end }}
</td>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/specs/spec_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{{- else if (eq $term "history") }}
{{- $def = printf "https://github.com/scientific-python/specs/commits/main/%s" $filename | markdownify }}
{{- else if and (eq $term "endorsed-by") (reflect.IsSlice $def) }}
{{- $def = apply $def "printf" "[%s](../core-projects/%s)" "." "." }}
{{- $def = apply (sort $def) "printf" "[%s](../core-projects/%s)" "." "." }}
{{- $def = delimit $def ", " }}
{{- $def = $def | markdownify }}
{{- if ge (len $def) 1 -}}
Expand Down

0 comments on commit 1c4f1ac

Please sign in to comment.