Stack:
- Blog: Jekyll (Ruby)
- CLI scripts to help manage the theme: Node.js (TypeScript + Playwright e2e tests)
- Sass
@importdeprecation: The theme intentionally uses@import(not@use). This is blocked by GitHub Pages / jekyll-sass-converter 1.5.2 using Ruby Sass 3.7.4. Do not migrate to@useyet.quiet_deps: truein_config.ymlsilences Font Awesome's own warnings. - Jest virtual mocks: External packages not in
.github/cli/node_modulesmust be mocked withjest.mock('pkg', factory, { virtual: true }). - CSS variables for theming: Light/dark mode and skin colors are all CSS custom properties defined in
_sass/base/_variables.scss. Thedata-themeattribute is set by JavaScript inhead.liquidon page load. - Remote theme vs gem:
_config.ymlhas bothremote_themeandtheme(commented). For local dev the gem is used; for GitHub Pages the remote_theme is used. - Jekyll exclude list:
package.json,package-lock.json, and.github/are excluded from Jekyll build. Any new tooling files at root should be added to theexclude:list in_config.yml. - Gem includes: The gemspec in
type-on-strap.gemspeconly includesassets/(js|css|fonts|data)/,_(includes|layouts|sass)/, and_data/(icons_builder|language).yml. Content files (_posts/,_portfolio/,pages/) are NOT shipped in the gem.
- 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 installUsing bundler instead of Jekyll directly.
bundle exec jekyll serve # Serve locally at http://localhost:4000
bundle exec jekyll build # Build to _site/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