Skip to content

Commit b679ebb

Browse files
committed
fix: compact footer stats with line breaks instead of paragraphs
Rename "Featured Repositories" to "Public Repositories" and use <br> within a single <p> block for tighter line spacing.
1 parent abfeb61 commit b679ebb

4 files changed

Lines changed: 10 additions & 16 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ghost-github-portfolio",
3-
"version": "0.3.3",
3+
"version": "0.3.4",
44
"description": "Auto-sync GitHub repositories to a Ghost CMS portfolio page. Fetches repos, sorts by stars, generates cards with banners and badges, and updates Ghost via the Admin API.",
55
"type": "module",
66
"bin": {

src/generator.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,22 +236,16 @@ export function generateFooter(
236236
.slice(0, 8)
237237
.map((t) => t.charAt(0).toUpperCase() + t.slice(1));
238238

239-
parts.push(
240-
`<p><strong>Total Stars (featured):</strong>&nbsp;${totalStars}+</p>`,
241-
);
242-
parts.push(
243-
`<p><strong>Featured Repositories:</strong>&nbsp;${totalRepos}</p>`,
244-
);
239+
const lines: string[] = [];
240+
lines.push(`<strong>Total Stars:</strong>&nbsp;${totalStars}+`);
241+
lines.push(`<strong>Public Repositories:</strong>&nbsp;${totalRepos}`);
245242
if (languages.length > 0) {
246-
parts.push(
247-
`<p><strong>Primary Languages:</strong>&nbsp;${languages.join(", ")}</p>`,
248-
);
243+
lines.push(`<strong>Primary Languages:</strong>&nbsp;${languages.join(", ")}`);
249244
}
250245
if (focusAreas.length > 0) {
251-
parts.push(
252-
`<p><strong>Focus Areas:</strong>&nbsp;${focusAreas.join(", ")}</p>`,
253-
);
246+
lines.push(`<strong>Focus Areas:</strong>&nbsp;${focusAreas.join(", ")}`);
254247
}
248+
parts.push(`<p>${lines.join("<br>")}</p>`);
255249
}
256250

257251
if (config.portfolio.footer.showViewAll) {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ program
1414
.description(
1515
"Auto-sync GitHub repositories to a Ghost CMS portfolio page. Fetches repos, sorts by stars, generates cards with banners and badges, and updates Ghost via the Admin API.",
1616
)
17-
.version("0.3.3");
17+
.version("0.3.4");
1818

1919
program
2020
.command("sync")

0 commit comments

Comments
 (0)