Skip to content

Add GitHub Pages project site (Astro): readable + searchable book, blog, history - #8

Merged
schacon merged 1 commit into
mainfrom
cursor/github-pages-site-ba0d
Aug 2, 2026
Merged

Add GitHub Pages project site (Astro): readable + searchable book, blog, history#8
schacon merged 1 commit into
mainfrom
cursor/github-pages-site-ba0d

Conversation

@schacon

@schacon schacon commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

Adds a project website under site/, built with Astro, plus a workflow that deploys it to the gh-pages branch on every push to main.

What's on the site

  • Homepage — hero with the book cover, chapter grid, third-edition callout, latest blog posts.
  • The book, readable online — the full text rendered from the AsciiDoc sources at build time with Asciidoctor.js, split into one page per section (same strategy as builder/src/site.rs) with a sidebar table of contents, breadcrumbs, and prev/next navigation. Cross-references and image paths are rewritten to the new page URLs; the book source is never duplicated in the repo (generated output is git-ignored).
  • Full-text searchPagefind indexes the book and blog after each build; search UI at /search/.
  • Blog in MDX — content collection at site/src/content/blog/ for updates and progress; two starter posts included.
  • History of the book — timeline from Git's creation through the 2009 and 2014 editions to the third-edition work.
  • Design — custom warm "book" theme with serif headings, styled Asciidoctor content (admonitions, callouts, sidebars, listings), dark-mode support, responsive layout.

Deployment

.github/workflows/deploy-site.yml builds the site on push to main (Node 22, npm ci, npm run build) and publishes site/dist/ to the gh-pages branch via peaceiris/actions-gh-pages. After merging, point Settings → Pages at the gh-pages branch; the site serves at https://progit.github.io/progit3/. Base path and canonical URL are overridable via BASE_PATH / SITE_URL.

Verification

  • npm run build succeeds: 112 pages built, 109 indexed by Pagefind.
  • Offline link check over dist/: 5,265 internal refs across 112 pages, 0 broken (the one flagged jam.html is escaped text inside a Perforce diff code listing, not a real link).
  • Manual browser walkthrough of the built site (homepage → book TOC → reader pages with images and code listings → search for "rebase" with instant results → blog → history):

progit_site_walkthrough_book_search_blog_history.mp4

Homepage of the Pro Git site

Note on the prose rule

The book text is rendered verbatim from the AsciiDoc sources — no book prose was touched. The site's own copy (homepage, history timeline, blog posts) is new website text written to fulfill this request; please review it as you would a draft, since it carries the project's voice.

Open in Web Open in Cursor 

- site/: Astro 7 project — homepage, MDX blog, history page, and the full
  book rendered one page per section from the AsciiDoc sources via
  Asciidoctor.js (same splitting strategy as builder/src/site.rs)
- Full-text search over book and blog with Pagefind
- .github/workflows/deploy-site.yml: build on push to main and publish
  site/dist to the gh-pages branch

Co-authored-by: Scott Chacon <schacon@gmail.com>
@schacon
schacon marked this pull request as ready for review August 2, 2026 09:10
@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@schacon
schacon merged commit 563eb41 into main Aug 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants