Skip to content

Commit 64353a4

Browse files
better readme
1 parent 2213a6f commit 64353a4

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

scripts/update-links.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -497,28 +497,30 @@ async function sendNewVersionNotification(
497497
/**
498498
* Generate Markdown content for README.md
499499
*/
500-
function generateReadmeMarkdown(
501-
latestVersion: string,
502-
releaseDate: string,
503-
): string {
500+
function generateReadmeMarkdown(latestEntry: VersionHistoryEntry): string {
504501
const repoUrl = "https://github.com/accesstechnology-mike/downloadcursor.app";
505502
const liveSiteUrl = "https://downloadcursor.app";
506503

504+
// Build downloads table for all available platforms
505+
const platforms = latestEntry.platforms || {};
506+
const platformRows = Object.keys(platforms)
507+
.sort()
508+
.map((key) => `| ${key} | [Download](${platforms[key]}) |`)
509+
.join("\n");
510+
507511
return `# Cursor Download Hub
508512
509513
A simple, automatically updated site providing the latest download links for the [Cursor](https://cursor.com) code editor.
510514
511515
**Live Site:** [${liveSiteUrl.replace("https://", "")}](${liveSiteUrl})
512516
513-
**Latest Version:** v${latestVersion} (Released: ${releaseDate})
517+
**Latest Version:** v${latestEntry.version} (Released: ${latestEntry.date})
514518
515-
## Features
519+
## Downloads (latest)
516520
517-
- Displays download links for Windows, macOS, and Linux.
518-
- Version history for the last 3 major versions using an expandable UI.
519-
- Dark theme.
520-
- Automatically updates when new versions of Cursor are released (via GitHub Actions).
521-
- Hero section with direct download buttons for popular platforms.
521+
| Platform | Link |
522+
| --- | --- |
523+
${platformRows}
522524
523525
## Development
524526
@@ -633,10 +635,7 @@ async function main(): Promise<void> {
633635
// Update README.md with latest version information
634636
if (limitedHistory.versions.length > 0) {
635637
const latestEntry = limitedHistory.versions[0]; // The actual latest version after pruning and sorting
636-
const readmeContent = generateReadmeMarkdown(
637-
latestEntry.version,
638-
latestEntry.date,
639-
);
638+
const readmeContent = generateReadmeMarkdown(latestEntry);
640639
const readmePath = path.join(process.cwd(), "README.md");
641640
fs.writeFileSync(readmePath, readmeContent.trim(), "utf8");
642641
console.log("README.md updated successfully.");

0 commit comments

Comments
 (0)