Repository navigation
feat(site): show recent releases on the home page - #779
Conversation
A build step reads the six latest GitHub releases into site/releases.json. The home page renders them as a dated list with the release subtitle and its first prose paragraph, and stays hidden when the file is empty. The build never fails on a network error. The section also links to all releases and to the Google preferred source setting for the site.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…ease parsing The added step pushed the build command to 278 characters and the deploy was rejected at 256. A prebuild script now runs both fetch steps, which brings the command to 229. The release fetch asks for 30 entries so prereleases cannot crowd out published releases, and a summary paragraph that starts with a link is kept unless the paragraph holds only links.
The prose check accepts Unicode letters and digits. Reference-style links count as links, so a row of them is skipped and their labels read as plain text. Fenced code blocks are removed before the paragraph split, and quotes and numbered lists are not summaries.
The fence pattern tracks the opening character and length. A closing line must use the same character, be at least as long, and carry only trailing whitespace, so a shorter inner fence or a fence line with text no longer ends the block early.
What changes
site/fetch-releases.jsreads the six latest published GitHub releases and writessite/releases.json(gitignored, like the other build outputs).hiddenand shows only when the JSON has at least one release.google.com/preferences/source?q=aiengineeringfromscratch.com).Failure behavior
{"releases": []}and logs a warning. The build continues and the section stays hidden.Authorizationonly whenGITHUB_TOKENis set in the build environment. Without it, the GitHub API limit is 60 requests per hour per address, so a build can sometimes get an empty list. SettingGITHUB_TOKENin the Vercel project removes that risk.Tests
site/test_releases.js(5 tests): entry shape, filtering, summary clipping, token handling, and the home page and build command hooks.node --test site/test_*.js: 642 pass, 4 fail.node --test scripts/test_*.js: 94 pass, 1 fail. Three site failures also fail onmainata509402c0(cheat sheet topic coverage, twoshotbrowser tests). The cache key test fails only with local build output present.scripts/test_function_bundles.jsfails locally on a missing@vercel/nftmodule.To check on the preview
releases.json: 6 releasesNotes
site/ui-strings.jsonyet.site/index.htmlandsite/app.jsin different places.