- Node.js >= 18 and npm — for the CLI tooling and tests
- Ruby and Bundler — for running Jekyll locally
Install Node dependencies from the project root:
npm installInstall Ruby dependencies:
bundle installbundle exec jekyll serveThe site will be available at http://localhost:4000.
All scripts live in .github/cli/src/ and are run from the project root.
Minify JS:
npm run build # minify JS
npm run build:js # minify JSnpm run compress # compress images in place
npm run thumbnails # create thumbnails for feature-img/ only
npm run thumbnails-all # create thumbnails for all images
npm run webp # convert images to WebPnpm run post 'title of the post'Creates _posts/YYYY-MM-DD-title-of-the-post.md with default frontmatter. Does nothing if the file already exists.
Validate that local vendor files match their upstream sources:
npm run validate # all vendors
npm run validate:katex
npm run validate:mermaid
npm run validate:fa
npm run validate:masonry
npm run validate:searchUpdate a vendor to its latest version:
npm run update:katex [version]
npm run update:mermaid [version]npm testnpm run typecheckRequires a built site (bundle exec jekyll build) and Playwright browsers (npm run playwright:install):
npm run test:e2eVisual tests are tagged @visual and run against 5 browser/device projects (desktop Chrome, Firefox, Safari, mobile Chrome, mobile Safari).
Run only the visual tests:
npm run test:e2e -- --grep @visualOr target a single browser:
npm run test:e2e -- --project=visual-chromiumUpdate the baseline screenshots when visual changes are intentional:
npm run test:e2e -- --grep @visual --update-snapshotsA pre-commit hook is provided that checks for non-staged assets before committing.
Enable it:
ln .github/hooks/pre-commit .git/hooks/pre-commitBypass it when needed:
git commit -n- PRs must remain compatible with GitHub Pages
- Include a screenshot if the change affects the layout or visual appearance
- Run
npm testandnpm run typecheckbefore submitting