Skip to content

Flatten Bridgetown to project root, delete legacy Jekyll tree#2

Merged
rickychilcott merged 5 commits intomainfrom
flatten-bridgetown-to-root
Apr 27, 2026
Merged

Flatten Bridgetown to project root, delete legacy Jekyll tree#2
rickychilcott merged 5 commits intomainfrom
flatten-bridgetown-to-root

Conversation

@rickychilcott
Copy link
Copy Markdown
Member

Summary

  • Resolves the 7 bridgetown/src/* symlinks (_data, _drafts, _pages, _posts, _staff_members, images, uploads) into real content via git mv from the legacy site/ tree
  • Flattens every file under bridgetown/ up to the repo root — the project now has a single source-of-truth (src/, plugins/, config/, Gemfile, package.json, etc. all at the top level)
  • Updates every path reference (cloudcannon.config.yml, .cloudcannon/initial-site-settings.json, GHA workflow working-directory, Procfile, bookshop_locations, verification/scripts)
  • Deletes the legacy Jekyll tree: site/, _site/, _plugins/, .jekyll-cache/, Procfile.dev
  • Drops @bookshop/jekyll-engine from devDependencies (replaced by our Ruby port at plugins/builders/bridgetown_bookshop.rb); merges the rest of root + bridgetown/ package.json into one and regenerates package-lock.json

Verification

Re-ran the parity harness against https://www.causey.app after the move:

  • Pixel parity: 192/198 PASS. The 6 fails are all ≤ 0.4% pixel diff — the same noise as the migration PR (1 animated GIF post × 3 viewports + 3 category index pages × mobile only). No functional regressions.
  • Redirects: 52/52 match
  • Sitemap: 68/68 URLs identical
  • robots.txt: byte-identical
  • Build: BRIDGETOWN_ENV=production bundle exec bridgetown build → 119 HTML routes, identical to pre-flatten output

Test plan

  • CI: .github/workflows/pages.yml builds and deploys green on this branch (no working-directory overrides; artifact path is now output)
  • CloudCannon: confirm staging build picks up source: src and the new prebuild paths
  • Local: npm install && bundle install && npm start → dev server on 6061 + bookshop-browser

🤖 Generated with Claude Code

rickychilcott and others added 5 commits April 27, 2026 06:21
The Apr migration kept content in site/ and symlinked it into bridgetown/
so both engines could share a single source. Now that Bridgetown owns the
build, git-mv the seven content trees up to where the symlinks pointed
and drop the symlinks. site/ still has _layouts, _includes, _config.yml,
Gemfile, etc. — those go in a follow-up commit once the flatten lands.

Build verified: 119 HTML routes (same as pre-move).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move every file out of bridgetown/ to the repository root so the project
has a single source-of-truth for the Bridgetown app. Conflicts with
existing root files merged rather than overwritten:

- .gitignore: kept project-wide entries (.screenshots/, .playwright-mcp/),
  added Bridgetown's tempfile/output entries (output/, .bridgetown-cache/,
  .bridgetown-metadata, /tmp/*, etc.), dropped the now-irrelevant
  Jekyll-only entries (_site, .jekyll-cache, vendor, bookshop,
  bookshop-dev.js, assets/js/site.js, __BOOKSHOP_VENDOR__, site/.bundle,
  Procfile.dev) and the bridgetown/<name>/ paths that no longer exist.
- .ruby-version: 3.2.0 → 3.4.4 (bridgetown-sitemap requires 3.4).
- package.json: merged scripts (drop the `cd bridgetown &&` prefixes) and
  devDependencies. Drop @bookshop/jekyll-engine (dead — replaced by our
  Ruby port at plugins/builders/bridgetown_bookshop.rb). package-lock.json
  and yarn.lock regenerated cleanly from the merged manifest.
- README.md: replaced the stale Hydra/Jekyll template README with the
  Bridgetown one (CLAUDE.md remains the project's actual documentation).

Plus the bookshop_locations path in config/initializers.rb drops one ../
since src/ is now at the root rather than inside bridgetown/.

Build verified: 119 HTML routes, same as pre-flatten.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Now that the Bridgetown app lives at the repo root, every config that
pointed at bridgetown/ or site/ needs a one-level adjustment:

- cloudcannon.config.yml: source is now `src` (was `bridgetown/src`).
- .cloudcannon/initial-site-settings.json: rewritten — was carrying the
  original Jekyll bootstrap (`ssg: jekyll`, `source: site`,
  `BUNDLE_GEMFILE: site/Gemfile`). Now declares Bridgetown source `src`
  with `BRIDGETOWN_ENV=production`.
- .github/workflows/pages.yml: drop `working-directory: bridgetown` from
  setup-ruby + build steps; artifact path is now `output`.
- Procfile: drop `cd bridgetown && ` prefix so the dev process runs from
  the project root directly.
- verification/scripts/{routes,capture}.js: route discovery now reads
  the single Bridgetown `output/` tree for both --baseline and
  --bridgetown captures (the Jekyll _site/ baseline no longer exists;
  --baseline is for production captures via --base-url).
- verification/README.md: rewrite the workflow steps to match.
- CLAUDE.md: drop the now-irrelevant migration-status / symlink sections;
  describe the single-tree layout and update the parity numbers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove the entire site/ directory (44 tracked files: _config.yml,
_layouts, _includes, collections/, Gemfile, etc.) plus the untracked
Jekyll-era cruft at the repo root: _plugins/, _site/, .jekyll-cache/,
.bundle/ (rbenv installs gems centrally; this was a stale Jekyll-era
bundler config), and Procfile.dev (root .gitignore had been ignoring it
since the migration; the active dev process is in Procfile).

After this commit there is no Jekyll source in the tree. Production
build verified: 119 HTML routes, identical to pre-deletion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…to bridgetown start

- bin/bridgetown: bundler binstub generated via
  `bundle binstubs bridgetown-core`, so we can run `bin/bridgetown serve`
  etc. without the `bundle exec` prefix.
- bin/bt: hand-written shim that exec's bin/bridgetown. Bridgetown 1.3.4
  doesn't actually ship a `bt` executable (added in 2.x), even though
  its gemspec lists it. This keeps the short alias working until we
  upgrade.
- Procfile + Procfile.dev: `web: bin/bridgetown start`. `bridgetown start`
  runs the Puma server, frontend bundler, and watcher in-process — it
  doesn't shell out to a Procfile, so reusing the same line in both
  files is non-circular.
- verification/: removed. The harness shipped in PR #1 was used twice
  (migration cutover + this consolidation) and PR #2's parity report
  is the last receipt we need. Easy to reinstate from git history if a
  future change wants to re-validate against production.
- CLAUDE.md: drop the now-stale Verification section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rickychilcott rickychilcott merged commit 808372a into main Apr 27, 2026
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.

1 participant