Make the site easier to build and test in container environments - #89
Merged
Conversation
- Add a unix build_and_run script (counterpart to build_and_run.cmd) that installs gems and serves the site with livereload - Prepend the gem bin directory to PATH in both scripts, since some environments don't have it on PATH and `bundle exec jekyll` fails with "command not found" - Let the search bar tests pick up the browser binary from CHROME_BIN for environments without a standard Chrome install - Serve simple-jekyll-search from assets/js instead of the jsdelivr CDN, so search works offline and in network-restricted environments - Document all of this in AGENTS.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JfzDDfEyxHvnEoQKJvdcLV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes
./build_and_run/./build_and_testwork out of the box in container environments (remote dev containers, CI sandboxes) where they previously failed, and fixes the site's search in offline/network-restricted setups.Changes
build_and_runscript — counterpart to the existing Windows-onlybuild_and_run.cmd. Runsbundle installand serves the site with livereload, binding to0.0.0.0so it's reachable from outside a container.build_and_runandbuild_and_test, via$(ruby -e 'print Gem.bindir'). In some environments the gem binstubs aren't on PATH, makingbundle exec jekyllfail with "command not found".CHROME_BIN— environments without a standard Chrome install can point Selenium at their browser binary (e.g.CHROME_BIN=/opt/pw-browsers/chromium). No behavior change when the variable is unset.simple-jekyll-search.min.jsvendored intoassets/js/(4 KB, MIT-licensed, unchanged from the jsdelivr 1.10.0 build) instead of loading it from the CDN. Search now works offline and in network-restricted environments, and the site drops an external dependency. This also fixestest_search_bar_shows_resultshanging for 100 s where the CDN is unreachable.AGENTS.mddocuments./build_and_runand theCHROME_BINconvention.Testing
./build_and_runserves the site on port 4000 from a clean shell in a restricted container../build_and_testpasses all 6 tests in ~9 s (previously: 2 Selenium errors, and after fixing those, a 2-minute CDN timeout).🤖 Generated with Claude Code
https://claude.ai/code/session_01JfzDDfEyxHvnEoQKJvdcLV
Generated by Claude Code