Vendor assets
By Amr
How third-party CSS and JavaScript are bundled under assets/vendor for GitHub Pages and how to refresh them.
Estimated reading time: 1 minutes
Table of Contents
Vendor assets (local bundles)
Third-party libraries (Bootstrap, jQuery, Bootstrap Icons, MathJax, Mermaid, Font Awesome, GitHub Calendar, etc.) are committed under assets/vendor/. GitHub Pages’ default Jekyll build does not run npm or curl, so everything the theme needs at runtime must be present in the repository (or in the published gem).
Refreshing vendor files (maintainers)
- Manifest:
vendor-manifest.jsonlists curl-based assets (Bootstrap, MathJax, etc.) with SHA-256 checksums. -
Mermaid (npm only): The theme does not download Mermaid from jsDelivr. Install the package and copy the built
distfile:npm install npm run vendor:mermaidscripts/vendor-install.shalso runs this copy step after manifest downloads whennode_modules/mermaidis present. -
Full vendor refresh: From the repo root:
npm install ./scripts/vendor-install.shOptions:
--force(re-download manifest files),--dry-run,--verbose. -
Dependencies:
curl,jq, andsha256sumorshasum(macOS). Node/npm for Mermaid. The dev Docker image installsjqfor this workflow. -
npm shortcut for manifest-only downloads:
npm run vendor:install
After upgrading versions, update package.json / lockfile for Mermaid or the manifest for curl assets, then commit changes under assets/vendor/.
Optional npm Bootstrap build (advanced)
npm run css:bootstrap compiles Bootstrap SCSS into assets/css/vendor/bootstrap-from-npm.css. The default theme does not use this file; it uses assets/vendor/bootstrap/css/bootstrap.min.css. Do not link both full Bootstrap stylesheets.
Related includes
_includes/core/head.html— Bootstrap CSS, Bootstrap Icons, MathJax,main.css_includes/components/js-cdn.html— jQuery, Bootstrap bundle_includes/components/mermaid.html— Mermaid + Font Awesome (whenmermaid: true)_config.yml—mermaid.srcpoints at the localmermaid.min.jspath