chore(demo): render records card and count org repos

The per-theme gallery pages embedded 15 SVGs and skipped records.svg,
which the render step has produced since the card landed, while the
index claimed every card was shown. Pair records with streak to match
the profile README layout at tiennm99/tiennm99.

Pass -include-org-repos so the gallery reflects repos under the author's
orgs.
This commit is contained in:
tiennm99 committed 2026-08-13 13:20:48 +07:00
1 parent 30ba70d8ea
commit 6be18b42b1
1 file changed
+7 -9
+7 -9
View File
@@ -41,6 +41,7 @@ jobs:
-themes all \ -themes all \
-tz Asia/Saigon \ -tz Asia/Saigon \
-start-of-week monday \ -start-of-week monday \
-include-org-repos \
-out demo -out demo
- name: Write demo READMEs (index + per-theme) - name: Write demo READMEs (index + per-theme)
@@ -54,7 +55,7 @@ jobs:
{ {
echo "# ghstats demo gallery" echo "# ghstats demo gallery"
echo echo
echo "Every card rendered for [\`$OWNER\`](https://github.com/$OWNER) in every supported theme. Click a theme to open its gallery page — each page embeds 15 SVGs, so only the theme you're reviewing is fetched." echo "Every card rendered for [\`$OWNER\`](https://github.com/$OWNER) in every supported theme. Click a theme to open its gallery page — each page embeds 16 SVGs, so only the theme you're reviewing is fetched."
echo echo
echo "Auto-generated by [\`.github/workflows/demo.yml\`](../.github/workflows/demo.yml) on each push to \`main\`. Do not edit by hand." echo "Auto-generated by [\`.github/workflows/demo.yml\`](../.github/workflows/demo.yml) on each push to \`main\`. Do not edit by hand."
echo echo
@@ -68,9 +69,9 @@ jobs:
} > demo/README.md } > demo/README.md
# Per-theme page mirrors the author profile README table layout at # Per-theme page mirrors the author profile README table layout at
# tiennm99/tiennm99 — singletons stacked two-per-row, streak spans # tiennm99/tiennm99 — singletons stacked two-per-row, then the four
# the full width, then the four last-year/all-time pairs sit in # last-year/all-time pairs sit in consecutive rows under a shared
# consecutive rows under a shared header. # header.
for theme in $themes; do for theme in $themes; do
dir="demo/$theme" dir="demo/$theme"
[ -d "$dir" ] || continue [ -d "$dir" ] || continue
@@ -85,19 +86,16 @@ jobs:
cell "$2" cell "$2"
printf '</tr>\n' printf '</tr>\n'
} }
row_span() {
printf '<tr><td colspan="2" align="center"><img src="./%s.svg" alt="%s" /></td></tr>\n' "$1" "$1"
}
{ {
printf '# ghstats — %s\n\n' "$theme" printf '# ghstats — %s\n\n' "$theme"
printf '[← back to index](../README.md)\n\n' printf '[← back to index](../README.md)\n\n'
printf 'Rendered for [`%s`](https://github.com/%s). 15 SVGs laid out to ' "$OWNER" "$OWNER" printf 'Rendered for [`%s`](https://github.com/%s). 16 SVGs laid out to ' "$OWNER" "$OWNER"
printf 'match the author profile README table.\n\n' printf 'match the author profile README table.\n\n'
printf '<div align="center">\n\n<table>\n' printf '<div align="center">\n\n<table>\n'
row_pair profile-details stats row_pair profile-details stats
row_pair repos-per-language top-starred-repos row_pair repos-per-language top-starred-repos
row_pair contributions-by-year contributions-heatmap row_pair contributions-by-year contributions-heatmap
row_span streak row_pair records streak
printf '<tr><th>Last year</th><th>All time</th></tr>\n' printf '<tr><th>Last year</th><th>All time</th></tr>\n'
row_pair most-commit-language most-commit-language-all-time row_pair most-commit-language most-commit-language-all-time
row_pair contributions contributions-all-time row_pair contributions contributions-all-time