Skip to content
Open
Show file tree
Hide file tree
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
23 changes: 20 additions & 3 deletions .github/workflows/refresh-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,33 @@ jobs:
fi
fi

# Fetch README title (first H1 heading)
readme_title="null"
if readme_content=$(gh api "repos/DevExpGbb/${repo_name}/readme" --jq '.content' 2>/dev/null); then
if [ -n "$readme_content" ] && [ "$readme_content" != "null" ]; then
# Decode base64 content and extract first H1 heading
decoded_readme=$(echo "$readme_content" | base64 --decode 2>/dev/null || echo "")
if [ -n "$decoded_readme" ]; then
# Extract first # heading (supports # Title or #Title formats)
title=$(echo "$decoded_readme" | grep -m 1 -E '^#[[:space:]]*' | sed -E 's/^#+[[:space:]]*//' | sed 's/[[:space:]]*$//' || echo "")
if [ -n "$title" ]; then
# Escape the title for JSON
readme_title=$(echo "$title" | jq -Rs '.')
fi
fi
fi
fi

# Add comma separator for all but first
if [ "$first" = true ]; then
first=false
else
echo "," >> /tmp/repos_with_contributors.json
fi

# Add repo with contributor
echo "$repo_json" | jq --argjson tc "$top_contributor" --argjson topics "$topics_data" '
. + { topContributor: $tc, topics: $topics }
# Add repo with contributor and readme title
echo "$repo_json" | jq --argjson tc "$top_contributor" --argjson topics "$topics_data" --argjson rt "$readme_title" '
. + { topContributor: $tc, topics: $topics, readmeTitle: $rt }
' >> /tmp/repos_with_contributors.json
done

Expand Down
15 changes: 11 additions & 4 deletions src/components/RepoCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,17 @@ const isRecentlyUpdated = (new Date().getTime() - new Date(repo.updatedAt).getTi
)}
</div>

{/* Title */}
<h3 class="font-semibold text-sm text-gray-900 group-hover:text-blue-600 transition-colors line-clamp-1 mb-1 relative">
{repo.name}
</h3>
{/* Title - Shows README title if available, with repo name as subtitle */}
<div class="mb-1 relative">
<h3 class="font-semibold text-sm text-gray-900 group-hover:text-blue-600 transition-colors line-clamp-2 leading-tight">
{repo.readmeTitle || repo.name}
</h3>
{repo.readmeTitle && (
<p class="text-[10px] text-gray-400 font-mono mt-0.5 line-clamp-1">
{repo.name}
</p>
)}
</div>

{/* Description */}
<p class="text-xs text-gray-500 mb-2 line-clamp-2 flex-grow min-h-[2rem] leading-relaxed relative">
Expand Down
15 changes: 10 additions & 5 deletions src/data/repositories.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"topics": [
"github-platform",
"code"
]
],
"readmeTitle": null
},
{
"createdAt": "2026-02-05T12:55:35Z",
Expand Down Expand Up @@ -100,7 +101,8 @@
"topics": [
"ghas",
"code"
]
],
"readmeTitle": null
},
{
"createdAt": "2026-01-26T17:40:23Z",
Expand Down Expand Up @@ -173,7 +175,8 @@
"shell",
"github-platform",
"demo-deployable"
]
],
"readmeTitle": null
},
{
"createdAt": "2026-02-05T14:27:46Z",
Expand Down Expand Up @@ -204,7 +207,8 @@
"avatarUrl": "https://avatars.githubusercontent.com/u/18750956?v=4",
"login": "Frank802"
},
"topics": []
"topics": [],
"readmeTitle": null
},
{
"createdAt": "2026-01-29T15:13:57Z",
Expand Down Expand Up @@ -281,7 +285,8 @@
"topics": [
"github-copilot",
"demo-deployable"
]
],
"readmeTitle": null
},
{
"createdAt": "2024-11-12T20:09:00Z",
Expand Down
1 change: 1 addition & 0 deletions src/utils/categorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export interface Repository {
updatedAt: string;
stargazerCount: number;
topContributor: { login: string; avatarUrl: string } | null;
readmeTitle?: string | null;
}

export interface CategorizedRepository extends Repository {
Expand Down