Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,24 @@ jobs:
url=$(echo "$user_info" | jq -r '.html_url')

if [[ "$OUTPUT_FORMAT" == "html" ]]; then
# HTML format with enforced size
contributor_output="$contributor_output<a href=\"$url\"><img src=\"${avatar}&s=64\" width=\"64\" height=\"64\" alt=\"$login\"></a> "
# HTML format with enforced size (table cells prevent GitHub's display:block from stacking images)
contributor_output="$contributor_output<td><a href=\"$url\"><img src=\"${avatar}&s=64\" width=\"64\" height=\"64\" alt=\"$login\"></a></td>"
else
# Markdown format (default)
contributor_output="$contributor_output[![$login](${avatar}&s=64)]($url) "
fi
done

# Build the contributors section
contrib_section="<!-- readme: contributors -start -->
$contributor_output
<!-- readme: contributors -end -->"
if [[ "$OUTPUT_FORMAT" == "html" ]]; then
contrib_section="<!-- readme: contributors -start -->
<table><tr>$contributor_output</tr></table>
<!-- readme: contributors -end -->"
else
contrib_section="<!-- readme: contributors -start -->
$contributor_output
<!-- readme: contributors -end -->"
fi

# Update README between the markers
awk -v contrib="$contrib_section" '
Expand Down